GithubHelp home page GithubHelp logo

hbase-indexer's Introduction

HBase Indexer

Building the binary distribution

Use the following command to build the binary distribution (.tar.gz):

mvn -DskipTests install assembly:assembly

Getting Started

These steps assume a running HBase 0.94.x installation (preferably CDH 4.2), as well as a running Solr installation. For this example, the configured Solr schema will need to have a multi-valued field called "data", as well as a unique key field called "id".

  1. Enable replication and other settings that are outlined in the hbase-sep demo instructions

  2. Unzip the binary distribution (instructions for creating the binary distribution are listed above).

     $ tar zxvf hbase_indexer.tar.gz
    
  3. Copy the hbase-sep jar files from the lib directory of the binary distribution into the lib directory of HBase.

     $ cd hbase_indexer
     $ sudo cp lib/hbase-sep-* /usr/lib/hbase/lib
    
  4. Create a table in HBase that has replication enabled. For this example, we'll create a table called "record" with a single column family called 'data'.

     hbase> create 'record', {NAME => 'data', REPLICATION_SCOPE => 1}
    
  5. Start the hbase-indexer server

     $ ./bin/hbase-indexer server
    
  6. Create an indexer definition. For this example, we'll just index anything in the data column family into the "data" field in Solr. Save the below contents in a file called 'sample.xml'.

     <?xml version="1.0"?>
     <indexer table="record">
       <field name="data" value="data:*" type="string"/>
     </indexer>
    
  7. Add the indexer definition to the indexer server. The following command assumes that the Solr ZooKeeper is running on the current host, and the name of the collection to be used for indexing is "core0".

     $ ./bin/hbase-indexer add-indexer  -n sampleindex -c sample.xml --cp solr.collection=core0 
    
  8. Add some data to the record table in HBase. The data added to the data column family in the record table should show up in the Solr index.

     hbase> put 'record', 'row1', 'data:value', 'Test of HBase Indexer'
    

hbase-indexer's People

Contributors

bdumon avatar gabrielreid avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.