diff options
author | Bryan Newbold <bnewbold@archive.org> | 2018-08-20 16:43:53 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2018-08-21 21:23:44 -0700 |
commit | 9d5df7b168ca7d6e5b95542de273dde1c4c6e5a9 (patch) | |
tree | 26eed48c4ccd8c92d1d054c9dcb9fdd5857f4882 /please | |
parent | b9faf4d90f630976deebad209ea2820e03281f87 (diff) | |
download | sandcrawler-9d5df7b168ca7d6e5b95542de273dde1c4c6e5a9.tar.gz sandcrawler-9d5df7b168ca7d6e5b95542de273dde1c4c6e5a9.zip |
please support for grobid-scorable-dump
Diffstat (limited to 'please')
-rwxr-xr-x | please | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -144,6 +144,27 @@ def run_matchcrossref(args): crossref_input=args.crossref_input) subprocess.call(cmd, shell=True) +def run_grobidscorabledump(args): + if args.rebuild: + rebuild_scalding() + print("Starting grobid-scorable-dump job...") + output = "{}/output-{}/{}-grobidscorabledump".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.GrobidScorableDumpJob \ + --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 main(): parser = argparse.ArgumentParser() @@ -182,6 +203,9 @@ def main(): help="number of reducers to run", type=int, default=30) + sub_grobidscorabledump = subparsers.add_parser('grobid-scorable-dump') + sub_grobidscorabledump.set_defaults(func=run_grobidscorabledump) + args = parser.parse_args() if not args.__dict__.get("func"): |