From 4a5912e23ae8d58edad64931ed290779c0e1689c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Sat, 22 Sep 2018 20:33:17 -0700 Subject: please support for DumpGrobidMetaInsertableJob --- please | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/please b/please index 5322680..8fcfaee 100755 --- a/please +++ b/please @@ -248,6 +248,27 @@ def run_dumpfilemeta(args): env=args.env) subprocess.call(cmd, shell=True) +def run_dumpgrobidmetainsertable(args): + if args.rebuild: + rebuild_scalding() + print("Starting dumpgrobidmetainsertable job...") + output = "{}/output-{}/{}-dumpgrobidmetainsertable".format( + HDFS_DIR, + args.env, + datetime.strftime(datetime.now(), "%Y-%m-%d-%H%M.%S")) + cmd = """hadoop jar \ + scalding/target/scala-2.11/sandcrawler-assembly-0.2.0-SNAPSHOT.jar \ + com.twitter.scalding.Tool sandcrawler.DumpGrobidMetaInsertableJob \ + --hdfs \ + --app.conf.path scalding/ia_cluster.conf \ + --hbase-table wbgrp-journal-extract-0-{env} \ + --zookeeper-hosts {zookeeper_hosts} \ + --output {output}""".format( + output=output, + zookeeper_hosts=ZOOKEEPER_HOSTS, + env=args.env) + subprocess.call(cmd, shell=True) + def run_colcount(args): if args.rebuild: rebuild_scalding() @@ -390,6 +411,9 @@ def main(): sub_dumpfilemeta = subparsers.add_parser('dump-file-meta') sub_dumpfilemeta.set_defaults(func=run_dumpfilemeta) + sub_dumpgrobidmetainsertable = subparsers.add_parser('dump-grobid-meta-insertable') + sub_dumpgrobidmetainsertable.set_defaults(func=run_dumpgrobidmetainsertable) + sub_colcount = subparsers.add_parser('col-count') sub_colcount.set_defaults(func=run_colcount) sub_colcount.add_argument('column', -- cgit v1.2.3