aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2018-09-13 21:14:22 -0700
committerBryan Newbold <bnewbold@archive.org>2018-09-13 21:14:22 -0700
commit52a88e314329ab5bac6217b2b3f2fcbe99740318 (patch)
tree71900455292eac63b0e28a9ff42f51e1784f3b9d
parent5521b1b520a550373369da8b9cbd36148e071115 (diff)
downloadsandcrawler-52a88e314329ab5bac6217b2b3f2fcbe99740318.tar.gz
sandcrawler-52a88e314329ab5bac6217b2b3f2fcbe99740318.zip
dumpfilemeta support in please
-rwxr-xr-xplease24
1 files changed, 24 insertions, 0 deletions
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',