You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by rubysina <ru...@sina.com> on 2016/12/09 01:51:09 UTC

diffent behavior for escape character backslash when bulk loading data

diffent behavior for escape character backslash when bulk loading data 

seems there's diffent behavior for escape character between Mapreduce JsonBulkLoadTool and psql.py

if lines end with backslash \ , 
psql.py can load it without any error,
 Mapreduce JsonBulkLoadTool fails with error java.io.IOException: EOF whilst processing escape sequence, even with -ignore-error parameter

if lines end with double backslash \\, 
psql.py can load it without any error, as \\
but Mapreduce JsonBulkLoadTool can load it differently ,  as \

so, the two loading tools work differently?

and I think the way psql.py is more better. it can load data ignoring any errors, and load data as its original state.

is there any method or parameter to make the Mapreduce loader work as psql.py ?

--------------------------------------------------
echo \\\\>a.csv
cat a.csv
\\
hdfs dfs -rm  a.csv  
hdfs dfs -put  a.csv  
...JsonBulkLoadTool -g -t a  -i a.csv  
phoenixload  -g -t a  -i a.csv  
-- success
select * from a;
\

psql.py -t A zoo a.csv 
select * from a;
\\

--------------------------------------------------