Hbase-indexer常用命令
阿新 • • 發佈:2018-04-28
日誌文件 CP info pan col ucid dem hbase miss
1. 啟動hbase-indexer服務
nohup ./hbase-indexer server -z s1:2181,s2:2181,s3:2181,s4:2181,s5:2181 > /work/hbase-indexer.log &
- 參數說明
- -z hbase-indexer要用到的zooKeeper的鏈接信息
- /work/hbase-indexer.log 輸出日誌文件路徑
2. 添加索引
./hbase-indexer add-indexer -n indexer_vip -c /opt/lucidworks-hdpsearch/hbase-indexer/demo/vip_indexer_mapper.xml -cpsolr.zk=s1:2181,s2:2181,s3:2181,s4:2181,s5:2181/solr -cp solr.collection=collection_vip
- 參數說明
- -indexer 動作命令
- -n 要創建的索引名稱參數,indexer_vip 索引名稱
- -c 索引映射文件路徑
- solr.zk zooKeeper 鏈接信息
- solr.collection 索引映射的集合信息,collection_vip 集合名稱
- 映射文件示例
<xml version="1.0" encoding="UTF-8"?> <!-- /* * Copyright 2013 NGDATA nv * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
3. 刪除索引
./hbase-indexer delete-indexer --name ‘indexer_vip‘
- 參數說明
- delete-indexer 動作命令
- indexer_vip 要被刪除的索引名稱
4. 查看所有索引清單
./hbase-indexer list-indexers -dump
- 參數說明
- list-indexers 動作命令
- -dump 添加此參數可以顯示索引的配置詳情
Hbase-indexer常用命令