페이지

2014년 5월 8일 목요일

solr on hbase using ks_indexer

NRT searching on hadoop!!!



disable 'record'
drop 'record'
create 'record', {NAME => 'data', REPLICATION_SCOPE => 1}
disable 'record'
alter 'record', {NAME => 'data', REPLICATION_SCOPE => 1}
enable 'record'
describe 'record'


# remove solr collection
solrctl collection --list
# solrctl collection --delete hbase-collection-default



solrctl instancedir --generate ./hbase-collection-default
--##
edit ./hbase-collection-default/conf/schema.xml


#  solrctl instancedir --list
#  solrctl instancedir --delete hbase-collection-default
solrctl instancedir --create hbase-collection-default ./hbase-collection-default
solrctl collection --create hbase-collection-default


# remove hbase index
hbase-indexer list-indexers
hbase-indexer delete-indexer -n recordIndexer


--## solr metric vars
/*
hbase-indexer add-indexer \
--name recordIndexer \
--indexer-conf ./morphline-hbase-mapper.xml \
--connection-param solr.zk=host00.sylee.com:2181/solr \
--connection-param solr.collection=hbase-collection-default \
--zookeeper host00.sylee.com:2181
*/
hbase-indexer add-indexer -n recordIndexer \
-c ./indexer-config.xml \
-cp solr.zk=host00.sylee.com:2181/solr \
-cp solr.collection=hbase-collection-default \
--zookeeper host00.sylee.com:2181

hbase-indexer list-indexers



_____________ indexer-config.xml  ____________________
<?xml version="1.0"?>
<indexer table="record" mapper="com.ngdata.hbaseindexer.morphline.MorphlineResultToSolrMapper">
   <!-- The relative or absolute path on the local file system to the morphline configuration file. -->
   <!-- Use relative path "morphlines.conf" for morphlines managed by Cloudera Manager -->
   <param name="morphlineFile" value="morphlines.conf"/>

   <!-- The optional morphlineId identifies a morphline if there are multiple morphlines in morphlines.conf -->
   <!-- <param name="morphlineId" value="morphline1"/> -->
</indexer>

댓글 없음:

댓글 쓰기