Differences between revisions 8 and 9
Revision 8 as of 2013-07-11 20:34:05
Size: 4970
Editor: AaronMcCurry
Comment:
Revision 9 as of 2013-07-11 20:36:16
Size: 4952
Editor: AaronMcCurry
Comment:
Deletions are marked like this. Additions are marked like this.
Line 34: Line 34:
Clone the repo.
Line 40: Line 38:
Build the artifacts (if you want to run the tests remove the "-DskipTests") Build the artifacts (if you want to run the tests remove the "-!DskipTests")

Pseudo Distributed / Quick Start

Prerequisites

You will at a minimum need the following:

  • Java 6 installed (Java 7 has not been tested)

Setup passphraseless ssh

These instructions are taken from the Hadoop Quick Start Guide.

Now check that you can ssh to the localhost without a passphrase:

ssh localhost

If you cannot ssh to localhost without a passphrase, execute the following commands:

ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa 
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

NOTE: Also you will need to know what the JAVA_HOME directory.

Download

Download Blur from [[|here]]. (Sorry No Release Yet)

Compile

Clone master.

git clone https://git-wip-us.apache.org/repos/asf/incubator-blur.git

Build the artifacts (if you want to run the tests remove the "-DskipTests")

cd incubator-blur/
mvn install -DskipTests -P distribution

The binary artifact is located distribution/target/apache-blur-0.2.0-incubating-SNAPSHOT-bin.tar.gz.

Install

Extract the contents of the file.

tar -xzvf apache-blur-*-bin.tar.gz

While it's not required it is a good idea to set BLUR_HOME in your environment variables.

For bash edit .bash_profile and add:

export BLUR_HOME=<directory where Blur was extracted>

Minimum Configuration

For edit $BLUR_HOME/conf/blur-env.sh and set JAVA_HOME:

export JAVA_HOME=<Java Home Directory>

NOTE: If this variable is not set, then the script will attempt to locate JAVA_HOME by using the location of the "java" command.

Start

To start Blur run the following command:

$BLUR_HOME/bin/start-all.sh

This will start a single Controller server and a single Shard server on your localhost.

You should see:

blur@blurvm:~$ apache-blur-0.2.0-incubating/bin/start-all.sh 
localhost: ZooKeeper starting as process 6650.
localhost: Shard [0] starting as process 6783.
localhost: Controller [0] starting as process 6933.

If you run the start command again you should see:

blur@blurvm:~$ apache-blur-0.2.0-incubating/bin/stop-all.sh 
localhost: Stopping Controller [0] server with pid [6933].
localhost: Stopping Shard [0] server with pid [6783].
localhost: Stopping ZooKeeper with pid [6650].

If you see it starting the servers again, then there is likely some issue with startup. Look in the $BLUR_HOME/logs directory for log and out files.

Once the servers have been started, you can use the shell to interact with Blur.

Shell

To start the shell run blur shell in the bin directory.

Execute:

Auto detect the controller servers from the $BLUR_HOME/conf/controllers file.

$BLUR_HOME/bin/blur shell

You can also explicitly call out the controller servers.

$BLUR_HOME/bin/blur shell controller1:40010,controller2:40010

Once in the shell, tables and be created, enabled, disabled, and removed. Type help to get a list of the commands.

Simple Shell Example

The below example creates a table and stores the contents of the table in a local directory of /data/testTableName which will only work if you are running blur in a single instance. Normally if you are running a hadoop cluster this will be a hdfs URI for example hdfs://host:port/blur/tables/testTableName.

blur> #Creates a table called testtable in the local directory of /data/testtable with 11 shards
blur> create testtable file:///data/testtable 11
blur> 
blur> #Adds a row to testtable
blur> mutate testtable 1 1 fam0 col1 value1
blur> 
blur> #Runs a query on testtable
blur> query testtable fam0.col1:value1
 - Results Summary -
    total : 1
    time  : 7.874 ms
-----------------------------------------------------------------------------------------------------
      hit : 0
    score : 1.4142135381698608
       id : 1
 recordId : 1
   family : fam0
     col1 : value1
-----------------------------------------------------------------------------------------------------
 - Results Summary -
    total : 1
    time  : 7.874 ms
blur> 
blur> #Turns highlighting on
blur> highlight
highlight of query command is now on
blur> 
blur> #Runs a query on testtable with highlighting on, notice <<<value1>>> is highlighted 
blur> query testtable2 fam0.col1:value1
 - Results Summary -
    total : 1
    time  : 13.395 ms
-----------------------------------------------------------------------------------------------------
      hit : 0
    score : 1.4142135381698608
       id : 1
 recordId : 1
   family : fam0
     col1 : <<<value1>>>
-----------------------------------------------------------------------------------------------------
 - Results Summary -
    total : 1
    time  : 13.395 ms
blur> 

PseudoDistributed (last edited 2013-07-11 20:36:16 by AaronMcCurry)