Created
July 6, 2015 19:32
-
-
Save lnicalo/e630139be2250f1cba9f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How would you do the same in python with pyspark? | |
I have written this piece of code but it does not work | |
keyConv = "org.apache.spark.examples.pythonconverters.ImmutableBytesWritableToStringConverter" | |
valueConv = "org.apache.spark.examples.pythonconverters.HBaseResultToStringConverter" | |
data_conf = { | |
"hbase.mapreduce.inputtable": "raw_signals", | |
"hbase.mapreduce.scan.columns": "family1:col1 family2:col2", | |
} | |
hbase_rdd = sc.newAPIHadoopRDD( | |
"org.apache.hadoop.hbase.mapreduce.TableInputFormat", | |
"org.apache.hadoop.hbase.io.ImmutableBytesWritable", | |
"org.apache.hadoop.hbase.client.Result", | |
keyConverter=keyConv, | |
valueConverter=valueConv, | |
conf=data_conf) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hello, I meet the same problem with you with python. I guess something goes wrong with the code " valueConv = "org.apache.spark.examples.pythonconverters.HBaseResultToStringConverter" ", have you solved this problem? thank you ~