Registering a Lily HBase Indexer Configuration with the Lily HBase Indexer Service
When the content of the Lily HBase Indexer configuration XML file is satisfactory, register it with the Lily HBase Indexer Service. Register the Lily HBase Indexer configuration file by uploading the Lily HBase Indexer configuration XML file to ZooKeeper. For example:
-
If your cluster has security enabled, create a Java Authentication and Authorization
Service (JAAS) configuration file named
jaas.confin your home directory with the following contents:Client { com.sun.security.auth.module.Krb5LoginModule required useKeyTab=false useTicketCache=true principal="jdoe@EXAMPLE.COM"; };Replace
jdoe@EXAMPLE.COMwith your user principal. Your user account must haveWRITEpermission to create an indexer. For more information, see Configuring Lily HBase Indexer Security. - If your cluster has security enabled, authenticate with the user principal specified in your
jaas.conffile:kinit jdoe@EXAMPLE.COM -
Run the following command to add the JAAS configuration to the system properties:
export HBASE_INDEXER_OPTS=-Djava.security.auth.login.config=jaas.conf - Run the following command to register your indexer configuration file with the indexer
service:
hbase-indexer add-indexer \ --name myIndexer \ --indexer-conf $HOME/morphline-hbase-mapper.xml \ --connection-param solr.zk=zk01.example.com,zk02.example.com,zk03.example.com/solr \ --connection-param solr.collection=hbase_collection \ --zookeeper zk01.example.com:2181,zk02.example.com:2181,zk03.example.com:2181 -
Verify that the indexer was successfully created as follows:
hbase-indexer list-indexers -zookeeper zk01.example.com:2181,zk02.example.com:2181,zk03.example.com:2181 Number of indexes: 1 myIndexer + Lifecycle state: ACTIVE + Incremental indexing state: SUBSCRIBE_AND_CONSUME + Batch indexing state: INACTIVE + SEP subscription ID: Indexer_myIndexer + SEP subscription timestamp: 2013-06-12T11:23:35.635-07:00 + Connection type: solr + Connection params: + solr.collection = hbase-collection1 + solr.zk = localhost/solr + Indexer config: 110 bytes, use -dump to see content + Batch index config: (none) + Default batch index config: (none) + Processes + 1 running processes + 0 failed processesUse the
update-indexeranddelete-indexercommand-line options of thehbase-indexerutility to manipulate existing Lily HBase Indexers.For more help, use the following commands:
hbase-indexer add-indexer --help hbase-indexer list-indexers --help hbase-indexer update-indexer --help hbase-indexer delete-indexer --helpMorphline configuration files can be changed without re-creating the indexer itself, but you must restart the Lily HBase Indexer service for the changes to take effect.
