aboutsummaryrefslogtreecommitdiffstats
path: root/please
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2018-08-24 18:03:13 -0700
committerBryan Newbold <bnewbold@archive.org>2018-08-24 18:03:13 -0700
commitcb563e890a8544fef1367d7b0f556cda6f0daca0 (patch)
treec3b70207027b580c14e634c04adb8f320b9df147 /please
parente64ba0f5dc5741c9940a2a8da8316f5e8b2baa24 (diff)
downloadsandcrawler-cb563e890a8544fef1367d7b0f556cda6f0daca0.tar.gz
sandcrawler-cb563e890a8544fef1367d7b0f556cda6f0daca0.zip
please support for DumpUnGrobidedJob
Diffstat (limited to 'please')
-rwxr-xr-xplease24
1 files changed, 24 insertions, 0 deletions
diff --git a/please b/please
index c888bbc..0c69bce 100755
--- a/please
+++ b/please
@@ -257,6 +257,27 @@ def run_keysmissingcol(args):
env=args.env)
subprocess.call(cmd, shell=True)
+def run_dumpungrobided(args):
+ if args.rebuild:
+ rebuild_scalding()
+ print("Starting dumpungrobided job...")
+ output = "{}/output-{}/{}-dumpungrobided".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.DumpUnGrobidedJob \
+ --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()
@@ -320,6 +341,9 @@ def main():
sub_keysmissingcol.add_argument('column',
help="column to SCAN for missing keys")
+ sub_dumpungrobided = subparsers.add_parser('dump-ungrobided')
+ sub_dumpungrobided.set_defaults(func=run_dumpungrobided)
+
args = parser.parse_args()
if not args.__dict__.get("func"):
print("tell me what to do! (try --help)")