diff options
author | Bryan Newbold <bnewbold@archive.org> | 2018-07-24 18:01:14 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2018-07-24 18:01:14 -0700 |
commit | d71cc4e6cd7381f5f0596af1ce33c1bc744c8644 (patch) | |
tree | a9f1404b5ab919bb2cec948df2bd70fca4bfd7f3 /please | |
parent | cd0769abe2fc7e0a91942e618dd00809fd058a70 (diff) | |
download | sandcrawler-d71cc4e6cd7381f5f0596af1ce33c1bc744c8644.tar.gz sandcrawler-d71cc4e6cd7381f5f0596af1ce33c1bc744c8644.zip |
temporary please option for scala backfill
Diffstat (limited to 'please')
-rwxr-xr-x | please | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -116,6 +116,23 @@ def run_statuscount(args): env=args.env) subprocess.call(cmd, shell=True) +def run_sbackfill(args): + if args.rebuild: + rebuild_scalding() + print("Starting scalding backfill job...") + cmd = """hadoop jar \ + scalding/target/scala-2.11/sandcrawler-assembly-0.2.0-SNAPSHOT.jar \ + com.twitter.scalding.Tool sandcrawler.CdxBackfillJob \ + --hdfs \ + --app.conf.path scalding/ia_cluster.conf \ + --hbase-table wbgrp-journal-extract-0-{env} \ + --zookeeper-hosts {zookeeper_hosts} \ + --cdx-input-path {input_cdx}""".format( + input_cdx=args.input_cdx, + zookeeper_hosts=ZOOKEEPER_HOSTS, + env=args.env) + subprocess.call(cmd, shell=True) + def main(): parser = argparse.ArgumentParser() @@ -135,6 +152,11 @@ def main(): sub_backfill.add_argument('input_cdx', help="full HDFS path of CDX file to backfill") + sub_sbackfill = subparsers.add_parser('sbackfill') + sub_sbackfill.set_defaults(func=run_sbackfill) + sub_sbackfill.add_argument('input_cdx', + help="full HDFS path of CDX file to backfill") + sub_extract = subparsers.add_parser('extract') sub_extract.set_defaults(func=run_extract) sub_extract.add_argument('input_cdx', |