java - How to handle newline character in HIVE on HBase? -
i inserting data hbase
java program. need convert byte arrays insert hbase doing so. when there newline character in input string, storing hexadecimal values in hbase (eg: tried insert string "prasad\r\nchowdary"
in hbase
prasad\x0d\x0achowdary
).
my problem when data in hbase, when try query table hive, jdbc resultset been repeating 2 time single row.
so how avoid converting \r\n
hexadecimal when inserting hbase.
if want put new line or other set of characters in string modify them such java treats them string.
convert "prasad\r\nchowdary" "prasad\r\nchowdary"
that use escape character "\" before new line convert bytes. should like.
string name = "prasad\\r\\nchowdary"; put.add(bytes.tobytes("family"),bytes.tobytes("qualifier"),bytes.tobytes("name"));
Comments
Post a Comment