How to insert multiple values in hypertable using Hadoop Python streaming? I am able to insert values for single column, but not more than one column. While I'm trying, I get the following exception:
java.lang.RuntimeException: java.io.IOException: Unable to write cell - java.lang.Exception: incorrect output line format only 1 tabs
at org.apache.hadoop.streaming.PipeMapRed.waitOutputThreads(PipeMapRed.java:325)
at org.apache.hadoop.streaming.PipeMapRed.mapRedFinished(PipeMapRed.java:545)
at org.apache.hadoop.streaming.PipeReducer.close(PipeReducer.java:137)
at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:528)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:419)
at org.apache.hadoop.mapred.Child$4.run(Child.java:259)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)
at org.apache.hadoop.mapred.Child.main(Child.java:253)
Caused by: java.io.IOException: Unable to write cell - java.lang.Exception: incorrect output line format only 1 tabs
at org.hypertable.hadoop.mapred.TextTableOutputFormat$HypertableRecordWriter.write(TextTableOutputFormat.java:247)
at org.hypertable.hadoop.mapred.TextTableOutputFormat$HypertableRecordWriter.write(TextTableOutputFormat.java:69)
at org.apache.hadoop.mapred.ReduceTask$OldTrackingRecordWriter.write(ReduceTask.java:456)
at org.apache.hadoop.mapred.ReduceTask$3.collect(ReduceTask.java:496)
at org.apache.hadoop.streaming.PipeMapRed$MROutputThread.run(PipeMapRed.java:381)
map.py
import sys
for line in sys.stdin:
print line
reduce.py
import sys
for line in sys.stdin:
txt= line.split('\t')
print txt[0]+'\t'+txt[1]+'\t'+txt[2]
Input form hypertable will be tab separated values, ex : "this is text".
Output table contains three columns, I need to split the input text by tab and save it into hypertabel.
Hypertable output column names cc
, kw
and oc
.