Github user haosdent commented on a diff in the pull request: https://github.com/apache/spark/pull/123#discussion_r10486674 --- Diff: core/src/main/scala/org/apache/spark/rdd/PairRDDFunctions.scala --- @@ -746,6 +747,23 @@ class PairRDDFunctions[K: ClassTag, V: ClassTag](self: RDD[(K, V)]) writer.commitJob() } + def saveAsHBaseTable(zkHost: String, zkPort: String, zkNode: String, + table: String, rowkeyType: String, columns: List[HBaseColumn], delimiter: Char) { + val conf = new HBaseConf(zkHost, zkPort, zkNode, table, rowkeyType, columns, delimiter) + + def writeToHBase(context: TaskContext, iter: Iterator[(K, V)]) { + val writer = new SparkHBaseWriter(conf) --- End diff -- Sorry, I forgot to add exception handle and close table later. As discussion in [SPARK-1127](https://spark-project.atlassian.net/browse/SPARK-1127), I would try to provide a higher-level abstraction for this.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---