aboutsummaryrefslogtreecommitdiffstats
path: root/please
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2018-10-30 14:43:47 -0700
committerBryan Newbold <bnewbold@archive.org>2018-10-30 14:43:57 -0700
commitee9230fd0fe96a07006b496d678681bae47cb943 (patch)
tree6b36a47f757e4103db56b7f48fbca0aba5de4603 /please
parent3105e9fc5799063027f3273048eea27f906d4c66 (diff)
downloadsandcrawler-ee9230fd0fe96a07006b496d678681bae47cb943.tar.gz
sandcrawler-ee9230fd0fe96a07006b496d678681bae47cb943.zip
please support DumpGrobidXmlJob
Diffstat (limited to 'please')
-rwxr-xr-xplease24
1 files changed, 24 insertions, 0 deletions
diff --git a/please b/please
index 8fcfaee..8b6c040 100755
--- a/please
+++ b/please
@@ -269,6 +269,27 @@ def run_dumpgrobidmetainsertable(args):
env=args.env)
subprocess.call(cmd, shell=True)
+def run_dumpgrobidxml(args):
+ if args.rebuild:
+ rebuild_scalding()
+ print("Starting dumpgrobidxml job...")
+ output = "{}/output-{}/{}-dumpgrobidxml".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.DumpGrobidXmlJob \
+ --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()
@@ -414,6 +435,9 @@ def main():
sub_dumpgrobidmetainsertable = subparsers.add_parser('dump-grobid-meta-insertable')
sub_dumpgrobidmetainsertable.set_defaults(func=run_dumpgrobidmetainsertable)
+ sub_dumpgrobidxml = subparsers.add_parser('dump-grobid-xml')
+ sub_dumpgrobidxml.set_defaults(func=run_dumpgrobidxml)
+
sub_colcount = subparsers.add_parser('col-count')
sub_colcount.set_defaults(func=run_colcount)
sub_colcount.add_argument('column',