大数据服务脚本化管理

HBASE

echo "create 'TEST', {NAME => 'cf1', VERSIONS => '3', COMPRESSION => 'SNAPPY'}, {NAME => 'cf2', VERSIONS => '3', COMPRESSION => 'SNAPPY'}, SPLITS_FILE => '/tmp/splits_file.txt'" | $HBASE_HOME/bin/hbase shell -n > /dev/null 2>&1

$HBASE_HOME/bin/hbase shell script1.sh

 

SPARK SQL建表

$SPARK_HOME/bin/beeline -u $SPARK-SQL-URL -n $USER -p PASSWORD -e "SQL CLAUSE"

 

KAFKA建主题

$KAFKA_HOME/bin/kafka-topics.sh --create --zookeeper $KAFKA_ZK --topic my_topic --config retention.ms=3600 --partitions 10 --replication-factor 1

 

posted on 2016-06-06 19:18  一笑之奈何  阅读(207)  评论(0编辑  收藏  举报