Lily HBase Indexer使用整理

https://blog.csdn.net/kissmelove01/article/details/45196941

本人一直在用和这个文章一模一样,可以参考。

 

 

以下是本人笔记

#创建collection
solrctl instancedir --generate /home/solr/civlist/collectioncivlist 
solrctl instancedir --create collectioncivlist  /home/solr/civlist/collectioncivlist 
solrctl collection --create collectioncivlist  -s 3 -r 2 -m 2 -c collectioncivlist 
-------
solrctl instancedir --generate /home/solr/civlist/collpatient
solrctl instancedir --create collpatient /home/solr/civlist/collpatient
solrctl collection --create collpatient -s 1 -r 2 -c collpatient

#重新上传配置
solrctl instancedir --update collectioncivlist /home/solr/civlist/collectioncivlist  
solrctl collection --reload collectioncivlist 

solrctl instancedir --update collpatient /home/solr/civlist/collpatient  
solrctl collection --reload collpatient 

#查看刚刚创建好的配置实体
solrctl instancedir --list

#删除collection和实体配置
solrctl  collection --delete collectioncivlist
solrctl  config --delete collectioncivlist

solrctl  collection --delete collpatient
solrctl  config --delete collpatient

#删除hdfs上节点collection
hdfs dfs -rm -r /solr/collectioncivlist

#清空solr中数据的xml格式语句,慎用。
<delete><query>*:*</query></delete>
<commit/>

#创建实时索引
    collectionName $1; 项目路径  $2; ZK_HOST $3
    hbase-indexer add-indexer --name HDR_INP_SUMMARY --indexer-conf /usr/local/freeSearch/hbase_indexer_files/HDR_INP_SUMMARY.xml --connection-param solr.zk=192.168.7.108:2181,192.168.7.109:2181,192.168.7.110:2181/solr --connection-param solr.collection=HDR_INP_SUMMARY --zookeeper 192.168.7.108:2181,192.168.7.109:2181,192.168.7.110:2181
    
    创建索引器
    hbase-indexer add-indexer --name collpatient --indexer-conf /home/hdr/solr/hbase_indexer_files/solrPatient.xml --connection-param solr.zk=hadoop02:2181,hadoop03:2181,hadoop04:2181/solr --connection-param solr.collection=collpatient --zookeeper hadoop02:2181,hadoop03:2181,hadoop04:2181
   查看实时索引
        hbase-indexer list-indexers --zookeeper 192.168.7.108:2181,192.168.7.109:2181,192.168.7.110:2181
        hbase-indexer list-indexers --zookeeper hadoop02:2181,hadoop03:2181,hadoop04:2181
   删除实时索引
        hbase-indexer delete-indexer --name shealphySS --zookeeper 192.168.7.108:2181,192.168.7.109:2181,192.168.7.110:2181
        hbase-indexer delete-indexer --name collpatient --zookeeper hadoop02:2181,hadoop03:2181,hadoop04:2181
   

put ' HDR_PATIENT','123456789','cf:PERSON_NAME' ,'Jack'

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值