aboutsummaryrefslogtreecommitdiffstats
path: root/please
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2018-08-20 16:43:53 -0700
committerBryan Newbold <bnewbold@archive.org>2018-08-21 21:23:44 -0700
commit9d5df7b168ca7d6e5b95542de273dde1c4c6e5a9 (patch)
tree26eed48c4ccd8c92d1d054c9dcb9fdd5857f4882 /please
parentb9faf4d90f630976deebad209ea2820e03281f87 (diff)
downloadsandcrawler-9d5df7b168ca7d6e5b95542de273dde1c4c6e5a9.tar.gz
sandcrawler-9d5df7b168ca7d6e5b95542de273dde1c4c6e5a9.zip
please support for grobid-scorable-dump
Diffstat (limited to 'please')
-rwxr-xr-xplease24
1 files changed, 24 insertions, 0 deletions
diff --git a/please b/please
index 1a992f2..0cc4b72 100755
--- a/please
+++ b/please
@@ -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"):