Github user mateiz commented on a diff in the pull request:
https://github.com/apache/spark/pull/455#discussion_r13415006
--- Diff: examples/src/main/scala/org/apache/spark/examples/HBaseTest.scala
---
@@ -17,12 +17,21 @@
package org.apache.spark.examples
-import org.apache.hadoop.hbase.client.HBaseAdmin
+import org.apache.hadoop.hbase.client.{Result, HBaseAdmin}
import org.apache.hadoop.hbase.{HBaseConfiguration, HTableDescriptor}
import org.apache.hadoop.hbase.mapreduce.TableInputFormat
import org.apache.spark._
import org.apache.spark.rdd.NewHadoopRDD
+import org.apache.spark.api.python.Converter
+import org.apache.hadoop.hbase.util.Bytes
+
+class HBaseConverter extends Converter {
+ override def convert(obj: Any) = {
+ val result = obj.asInstanceOf[Result]
+ Bytes.toStringBinary(result.value())
+ }
+}
--- End diff --
Ditto on moving this to a separate file
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---