Skip to content
Snippets Groups Projects
Commit 51f46200 authored by Jihong MA's avatar Jihong MA Committed by Sean Owen
Browse files

[SPARK-7357] Improving HBaseTest example

Author: Jihong MA <linlin200605@gmail.com>

Closes #5904 from JihongMA/SPARK-7357 and squashes the following commits:

7d6153a [Jihong MA] SPARK-7357 Improving HBaseTest example
parent 4222da68
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,19 @@ object HBaseTest {
def main(args: Array[String]) {
val sparkConf = new SparkConf().setAppName("HBaseTest")
val sc = new SparkContext(sparkConf)
// please ensure HBASE_CONF_DIR is on classpath of spark driver
// e.g: set it through spark.driver.extraClassPath property
// in spark-defaults.conf or through --driver-class-path
// command line option of spark-submit
val conf = HBaseConfiguration.create()
if (args.length < 1) {
System.err.println("Usage: HBaseTest <table_name>")
System.exit(1)
}
// Other options for configuring scan behavior are available. More information available at
// http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/mapreduce/TableInputFormat.html
conf.set(TableInputFormat.INPUT_TABLE, args(0))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment