aboutsummaryrefslogtreecommitdiffstats
path: root/please
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2019-04-12 13:48:27 -0700
committerBryan Newbold <bnewbold@archive.org>2019-04-12 14:19:29 -0700
commitd93ebaa691f8b200a5761850b4533a153cb457ee (patch)
tree7cf0077764e9117afb3ccf3f318aac425be7d3ef /please
parent8ac10ab7fe310df55ab5a66d741ea25c24389418 (diff)
downloadsandcrawler-d93ebaa691f8b200a5761850b4533a153cb457ee.tar.gz
sandcrawler-d93ebaa691f8b200a5761850b4533a153cb457ee.zip
scalding dump-grobid-status-code job
Diffstat (limited to 'please')
-rwxr-xr-xplease24
1 files changed, 24 insertions, 0 deletions
diff --git a/please b/please
index f8e103d..8fb7f19 100755
--- a/please
+++ b/please
@@ -251,6 +251,27 @@ def run_dumpfilemeta(args):
env=args.env)
subprocess.call(cmd, shell=True)
+def run_dumpgrobidstatuscode(args):
+ if args.rebuild:
+ rebuild_scalding()
+ print("Starting dumpgrobidstatuscode job...")
+ output = "{}/output-{}/{}-dumpgrobidstatuscode".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.DumpGrobidStatusCodeJob \
+ --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_dumpgrobidmetainsertable(args):
if args.rebuild:
rebuild_scalding()
@@ -435,6 +456,9 @@ def main():
sub_dumpfilemeta = subparsers.add_parser('dump-file-meta')
sub_dumpfilemeta.set_defaults(func=run_dumpfilemeta)
+ sub_dumpgrobidstatuscode = subparsers.add_parser('dump-grobid-status-code')
+ sub_dumpgrobidstatuscode.set_defaults(func=run_dumpgrobidstatuscode)
+
sub_dumpgrobidmetainsertable = subparsers.add_parser('dump-grobid-meta-insertable')
sub_dumpgrobidmetainsertable.set_defaults(func=run_dumpgrobidmetainsertable)