From 52a88e314329ab5bac6217b2b3f2fcbe99740318 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 13 Sep 2018 21:14:22 -0700 Subject: dumpfilemeta support in please --- please | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'please') diff --git a/please b/please index 464f9dc..5322680 100755 --- a/please +++ b/please @@ -227,6 +227,27 @@ def run_grobidscorabledump(args): env=args.env) subprocess.call(cmd, shell=True) +def run_dumpfilemeta(args): + if args.rebuild: + rebuild_scalding() + print("Starting dumpfilemeta job...") + output = "{}/output-{}/{}-dumpfilemeta".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.DumpFileMetaJob \ + --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() @@ -366,6 +387,9 @@ def main(): sub_grobidscorabledump = subparsers.add_parser('grobid-scorable-dump') sub_grobidscorabledump.set_defaults(func=run_grobidscorabledump) + sub_dumpfilemeta = subparsers.add_parser('dump-file-meta') + sub_dumpfilemeta.set_defaults(func=run_dumpfilemeta) + sub_colcount = subparsers.add_parser('col-count') sub_colcount.set_defaults(func=run_colcount) sub_colcount.add_argument('column', -- cgit v1.2.3