Repository: spark Updated Branches: refs/heads/master 7078f6028 -> ef82bddc1
SPARK-7107 Add parameter for zookeeper.znode.parent to hbase_inputformat... ....py Author: tedyu <yuzhih...@gmail.com> Closes #5673 from tedyu/master and squashes the following commits: ab7c72b [tedyu] SPARK-7107 Adjust indentation to pass Python style tests 6e25939 [tedyu] Adjust line length to be shorter than 100 characters 18d172a [tedyu] SPARK-7107 Add parameter for zookeeper.znode.parent to hbase_inputformat.py Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/ef82bddc Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/ef82bddc Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/ef82bddc Branch: refs/heads/master Commit: ef82bddc11d1aea42e22d2f85613a869cbe9a990 Parents: 7078f60 Author: tedyu <yuzhih...@gmail.com> Authored: Mon Apr 27 14:42:40 2015 -0700 Committer: Reynold Xin <r...@databricks.com> Committed: Mon Apr 27 14:42:40 2015 -0700 ---------------------------------------------------------------------- examples/src/main/python/hbase_inputformat.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/ef82bddc/examples/src/main/python/hbase_inputformat.py ---------------------------------------------------------------------- diff --git a/examples/src/main/python/hbase_inputformat.py b/examples/src/main/python/hbase_inputformat.py index e17819d..5b82a14 100644 --- a/examples/src/main/python/hbase_inputformat.py +++ b/examples/src/main/python/hbase_inputformat.py @@ -54,8 +54,9 @@ if __name__ == "__main__": Run with example jar: ./bin/spark-submit --driver-class-path /path/to/example/jar \ - /path/to/examples/hbase_inputformat.py <host> <table> + /path/to/examples/hbase_inputformat.py <host> <table> [<znode>] Assumes you have some data in HBase already, running on <host>, in <table> + optionally, you can specify parent znode for your hbase cluster - <znode> """, file=sys.stderr) exit(-1) @@ -64,6 +65,9 @@ if __name__ == "__main__": sc = SparkContext(appName="HBaseInputFormat") conf = {"hbase.zookeeper.quorum": host, "hbase.mapreduce.inputtable": table} + if len(sys.argv) > 3: + conf = {"hbase.zookeeper.quorum": host, "zookeeper.znode.parent": sys.argv[3], + "hbase.mapreduce.inputtable": table} keyConv = "org.apache.spark.examples.pythonconverters.ImmutableBytesWritableToStringConverter" valueConv = "org.apache.spark.examples.pythonconverters.HBaseResultToStringConverter" --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org