My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
QuickStart  

Featured
Updated Jan 27, 2012 by haruyama...@gmail.com

Requirements

  • JDK 1.6.0 or greater
  • Ant 1.8.0 or greater
  • OpenSSH

Download and Build

  1. go to your home directory (/home/username if your account name is 'username')
  2.      $ cd /home/username/
  3. download the latest source by the command
  4. available from download page .
  5. build
  6.      $cd anuenue
         $ant main

Setup Passphrase

First check that you can login to the localhost without a passphrase:

$ssh localhost

If you are asked for a passphrase when you ssh to the localhost, please run the following commands.

$ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
$cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

You can also setup ssh-agent for the passphrase less login.

Running Anuenue

Now let's run Anuenue with attached input files.

Single Node Setup

  1. go to Anuenue installation directory
  2.      $cd /home/username/anuenue
  3. start Anuenue
  4.      $sh bin/anuenue-distdaemon.sh start
  5. post files
  6.      $sh bin/anuenue-distcommands.sh post --arg src/java/test/resources/example-docs
  7. commit the changes
  8.      $sh bin/anuenue-distcommands.sh commit
  9. confirm the documents are indexed
Let's check wether the document was posted or not by the web interface. You can access the web interface (http://localhost:8983/anuenue/admin). The following is the image of the Anuenue web interface.

We can test the index by sending a query from the form in the page. For example, sending query "hadoop", we can get the result as follows.

Cluster Setup

In this section, we have a quick tour on the installation and configuration of Anuenue cluster. Here we assume we have a three computer named "aaaa", "bbbb", and "cccc" and then set up the Anuenue cluster on the three machines.
The three Anuenue instances have one different role. The Anuenue instance in the host "aaaa" is a merger instance and receives the queries from clients and transfers the queries to the slave instance "cccc". The instance in "bbbb" is a master instance and indexes the input data. The instance in "cccc" is the slave which replicates the index from the instance in "bbbb" and receives the queries from the merger and then return the results. More details on the roles, please see Configuration. The following figure shows the Anuenue cluster which we are building.
Now let's build the Anuenue cluster.
  1. download and build Anuenue in one of the host. Here we assume that we are in the host "aaaa"
  2. edit the configuration file for distributed installation
  3. We need to edit a configuration file for cluster setup, which is conf/anuenue-nodes.xml.
    <?xml version='1.0'  encoding='utf-8'?>
    <nodes>
     <mergers>
       <merger>
         <host>aaaa</host>
         <port>8983</port>
       </merger>
     </mergers>
     <masters>
       <master iname="master">
         <host>bbbb</host>
         <port>8983</port>
       </master>
     </masters>
     <slaves>
       <slave >
         <host>cccc</host>
         <port>8983</port>  
         <replicate>master</replicate> 
       </slave>
      </slaves>
      <nodes>
  4. copy the built Anuenue installation to the other hosts "bbbb", "cccc" in the same directory by the following command.
  5.    $scp -r anuenue bbbb:/home/username
       $scp -r anuenue cccc:/home/username
  6. start Anuenue cluster
  7. The Anuenue cluster which is installed in the hosts "aaaa" and "bbbb" is launched with the following commands.
       $sh bin/anuenue-distdaemon.sh start
  8. post files and commit
  9.      $sh bin/anuenue-distcommands post --arg src/java/test/resources/example-docs
         $sh bin/anuenue-distcommands.sh commit
  10. confirm the documents are indexed
  11. Now let's check the index by posting a query to the merger node ("aaaa"). You can use the web admin page in host "aaaa". Specifically You access http://aaaa:8983/anuenue/admin and the send a query from the form in the admin page.
  12. update documents
  13. If you want to update the documents in the index. Anuenue provides the update command, which deletes the documents to be updated and then post the updated documents.
         $sh bin/anuenue-distcommands.sh update --arg src/java/test/resources/update-docs/update-sample01.txt
         $sh bin/anuenue-distcommands.sh commit
Powered by Google Project Hosting