Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Cannot Reproduce
-
Impala 1.4.1
-
None
-
CDH 5.1.2
Description
While executing query in delimited (batch) mode the impala-shell returns some escape sequence in front of response.
It creates difficulties while processing the response in shell scripts.
I have to use solution like this
# save output to variable
response=$(impala-shell -B -q "select version()")
# skip 8 char sequence in front
clear_text=${response:8}
impala-shell -k -i catdn008 -B -q 'select version()' | od -c Starting Impala Shell using Kerberos authentication Using service name 'impala' Connected to catdn008:21000 Server version: impalad version 1.4.1-cdh5 RELEASE (build 201c660b5b3effda534899e2ce461cc8e108af87) Query: select version() Returned 1 row(s) in 0.14s 0000000 033 [ ? 1 0 3 4 h " i m p a l a d 0000020 v e r s i o n 1 . 4 . 1 - c 0000040 d h 5 R E L E A S E ( b u i 0000060 l d 2 0 1 c 6 6 0 b 5 b 3 e f 0000100 f d a 5 3 4 8 9 9 e 2 c e 4 6 1 0000120 c c 8 e 1 0 8 a f 8 7 ) \n B u i 0000140 l t o n M o n , 2 5 A u 0000160 g 2 0 1 4 1 8 : 5 4 : 0 3 0000200 P S T " \n 0000205