aboutsummaryrefslogtreecommitdiffstats
path: root/python/kafka_grobid_hbase.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/kafka_grobid_hbase.py')
-rwxr-xr-xpython/kafka_grobid_hbase.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/kafka_grobid_hbase.py b/python/kafka_grobid_hbase.py
index f884558..5241920 100755
--- a/python/kafka_grobid_hbase.py
+++ b/python/kafka_grobid_hbase.py
@@ -153,8 +153,11 @@ def main():
parser.add_argument('--kafka-hosts',
default="localhost:9092",
help="list of Kafka brokers (host/port) to use")
+ parser.add_argument('--kafka-env',
+ default="qa",
+ help="eg, 'qa' or 'prod'")
parser.add_argument('--consume-topic',
- default="sandcrawler-qa.grobid-output",
+ default=None,
help="Kafka topic to consume from")
parser.add_argument('--hbase-table',
type=str,
@@ -166,6 +169,9 @@ def main():
help='HBase thrift API host to connect to')
args = parser.parse_args()
+ if args.consume_topic is None:
+ args.consume_topic = "sandcrawler-{}.ungrobided".format(args.kafka_env)
+
worker = KafkaGrobidHbaseWorker(**args.__dict__)
worker.run()