大数据服务脚本化管理

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

原文地址:https://www.cnblogs.com/warmingsun/p/5564847.html