storm:
打包:
maven clean install -P dev/pre/pro
提交拓扑:
./storm jar bi-daemon-itemmodel-0.0.1-SNAPSHOT-jar-with-dependencies.jar cn.com.gome.itemmodel.ItemModelTopology item-model
kill拓扑:
./storm kill item-model-local
kafka:
消费者(全)
./kafka-console-consumer.sh --zookeeper localhost:2181 --topic item-model-topic --from-beginning
生产者
./kafka-console-producer.sh --broker-list localhost:9092 --topic item-model-topic
集群启动:
./kafka-server-start.sh config/server.properties &
修改topic的partition
./kafka-topics.sh --zookeeper localhost:2181 --alter --partitions 1 --topic item-model-topic
创建topic
./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic item-model-topic
删除topic
./kafka-topics.sh --delete --zookeeper localhost:2181 --topic item-model-topic
查看topic
看列表:./kafka-topics.sh --list --zookeeper localhost:2181
看属性:./kafka-topics.sh --describe --zookeeper localhost:2181 --topic item-model-topic
查看comsumer
看列表: ./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
看属性: ./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group testConsumer
ES
mapping:
curl -XGET http://10.69.201.47:9200/item-index/_mapping/item-type
分组:
curl -XGET http://ec2-54-251-189-240.ap-southeast-1.compute.amazonaws.com:9200/item-index/item-type/_search?pretty -d '{"query": {"bool": {"must": [{"match_all": {}}],"must_not": [],"should": []}},"from": 0,"size": 10,"sort": [],"aggs": {"category": {"terms": {"field": "categoryId"}}}}'
创建别名:
curl -XPOST 'http://10.69.201.47:9200/_aliases' -d '
{
"actions": [
{"add": {"index": "item-index", "alias": "item-index-alias"}}
]
}'
移动别名:
curl -XPOST 'http://54.254.147.171:9200/_aliases' -d '
{
"actions": [
{"remove": {"index": "item-index", "alias": "item-index-alias"}},
{"add": {"index":"item-index-v1", "alias": "item-index-alias"}}
]
}'
查看别名:
curl -XGET 'http://10.69.201.47:9200/_alias/*'
网友评论