Github user GenTang commented on a diff in the pull request:
https://github.com/apache/spark/pull/3920#discussion_r24727321
--- Diff:
examples/src/main/scala/org/apache/spark/examples/pythonconverters/HBaseConverters.scala
---
@@ -18,20 +18,34 @@
package org.apache.spark.examples.pythonconverters
import scala.collection.JavaConversions._
+import scala.util.parsing.json._
import org.apache.spark.api.python.Converter
import org.apache.hadoop.hbase.client.{Put, Result}
import org.apache.hadoop.hbase.io.ImmutableBytesWritable
import org.apache.hadoop.hbase.util.Bytes
+import org.apache.hadoop.hbase.KeyValue.Type
+import org.apache.hadoop.hbase.CellUtil
/**
- * Implementation of [[org.apache.spark.api.python.Converter]] that
converts an
- * HBase Result to a String
+ * Implementation of [[org.apache.spark.api.python.Converter]] that
converts all
+ * the records in an HBase Result to an Array[String]
*/
-class HBaseResultToStringConverter extends Converter[Any, String] {
- override def convert(obj: Any): String = {
+class HBaseResultToStringConverter extends Converter[Any, Array[String]] {
--- End diff --
You are right.
Before, I test the code in local mode where the code passed. However, in
cluster mode, it doesn't
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]