Database Reference
In-Depth Information
Most importantly, it does not provide these features at the expense of performance.
No, it uses a very smart query analyzer that allows the query to focus exactly on the
rows that are needed, and shaves off the unnecessary data.
Now, you can understand why I want you to use it. Just as MongoDB is very
popular because it has a SQL-like shell, and in fact you can try it online at http://
try.mongodb.org/ , and just as Cassandra introduced CQL just a couple of years
ago at http://cassandra.apache.org/doc/cql/CQL.html , Phoenix too brings
the expressiveness of SQL to HBase. In fact, you can even use it from your Java
code again, just as Cassandra uses JDBC-like Java drivers with DataStax .
The following lines have been adopted from Shakespeare's A Midsummer
Night's Dream:
'Ladies,'--or 'Fair-ladies--I would wish You,'--or 'I would request you,'--or 'I
would entreat you,--not to fear, not to tremble: my life for yours.
So, we follow the same pattern and we will describe our HBase design patterns
with SQL coming from Phoenix. Now, just the last two steps are remaining—install
Phoenix and try it, and run it from Java, just to prove the point.
Installing Phoenix
Phoenix comes to us from the SalesForce.com developers, and its main site is found
on GitHub at https://github.com/forcedotcom/phoenix . It also features a very
nicely formatted README.md file, something one can learn from.
Let's go ahead and install it. Here are the instructions:
1. Download and expand the installation TAR file.
In my case, it looks like this:
mark@mark-7:~/ThirdParty$ ll
-rw-rw-r-- 1 mark mark 17111040 Jan 10 13:29 libpst-0.6.63.tar
-rw-r--r-- 1 mark mark 18603115 Dec 26 11:41 phoenix-2.2.2-
client.jar
-rw-r--r-- 1 mark mark 1546579 Dec 26 11:41 phoenix-2.2.2.jar
-rw-r--r-- 1 mark mark 586849 Dec 26 11:41 phoenix-2.2.2-tests.
jar
 
Search WWH ::




Custom Search