Installing BigRecord Driver

Bigrecord drivers use JRuby DRb servers to connect with databases through their native Java APIs. Currently supported databases are HBase and Cassandra.

Requirements

  • JRuby 1.3.0+

Installation

  1. Install the Java 1.6 runtime environment for your operating system. There are many resources online for this.
  2. Go to: jruby.org/getting-started and follow the instructions for installing the latest JRuby.
  3. Add the following to your shell rc file (~/.bashrc or ~/.zshrc)
    export JRUBY_HOME=/path/to/jruby
    export PATH=$JRUBY_HOME/bin:$PATH
  4. Check that JRuby is installed correctly by typing in the following commands, and verifying you get similar output:
  5. > echo $JRUBY_HOME
    /path/to/jruby
    > jruby --version
    jruby 1.3.1 [...]
  6. Install the Bigrecord Driver gem from gemcutter.org
    sudo gem install bigrecord-driver -s http://gemcutter.org/

Usage

Once you have everything installed, you can start up a Bigrecord Driver DRb server with:

hbase-driver start -p [port]

Remember this port, because it will be used in the bigrecord.yml configuration file.

Debugging

If any errors are encountered during the usage of Bigrecord Driver, you can check the /tmp/hbase-driver/log/[port].log files for any errors that might have occurred.

{ 8 comments… read them below or add one }

Trent November 18, 2009 at 8:15 am

Is Java 1.6 a must? Will Java 1.5 not work at all?

Greg November 18, 2009 at 11:24 am

I’m not sure, but I believe HBase will only work with Java 1.6. Also, we haven’t tested this against 1.5, so we don’t know if it works or not.

Ian Kallen December 1, 2009 at 4:18 pm

Does the use of JRuby and DRb obviate using REST (”stargate”)? It looks like the bigrecord code depends on hbase-ruby and, AFAICT, that’s only used for REST client access.

Greg December 1, 2009 at 4:59 pm

Ian: Bigrecord Driver (JRuby+DRb) isn’t meant to replace or supersede the REST adapter (or vice-versa). It’s simply another option for choosing an adapter to connect to HBase with.

However, you’re correct. It shouldn’t be required for Bigrecord to run, and neither should bigrecord driver, for that matter. So, I’ve removed the dependency on either, and a message will prompt you to install the requirement when you initiate a connection and it can’t find it. Expect that change to be released soon.

Ian Kallen December 1, 2009 at 5:38 pm

Cool, thanks. Have you considered a google group (or an equivalent) for BigRecord questions/discussions?

Greg December 1, 2009 at 5:58 pm

@Ian Created a google group: http://groups.google.com/group/bigrecord

Waheedi April 8, 2010 at 8:28 am

is this required for Cassandra?

Greg April 8, 2010 at 1:13 pm

@Waheedi Unfortunately, Cassandra is not working with Bigrecord at the moment. There are plans for this sometime in the summer.

Leave a Comment

BigRecord is released under the MIT license and is sponsored by openplaces