Phoenix is an apache project that attempts to provide an ANSI SQL standard interface to HBase data. This is just a quick implementation of it. Notice it has transactional semantics. Code below… import java.sql.*; import java.util.*; public class phoenixTest {…
Category: NoSQL
Query HBase from Tomcat
We installed Tomcat 6.0.39 (we weren’t running JDK 1.7), as well as hbase. To get this to work, we copied the following jar’s from the hadoop and hbase installation directories to the tomcat lib directory. -rw-r–r– 1 serengeti serengeti 5212641…
HBase has disappearing rows
I guess this may have a place if your application data is transient in nature and doesn’t need to be retained forever. We first take an existing table and for a given column family set its “time to live” to…
HBase JMX metrics
HBase exposes several metrics via JMX beans, some of which are similar to the Oracle performance counters recorded by AWR. Actually, they aren’t even *close* to what Oracle provides, but one can hope 🙂 Below is a simple example of…
Flashback ability with HBase
Oracle has a great feature called flashback query. This allows a user to (try to) query a row as it existed at some point in the past. It provides this functionality by trying to find the necessary UNDO to reconstruct…
Printing all property values in an HBase configuration
I’m sure there is an easier (perhaps built-in) way to do this, but for now, I wanted to document how you can print all properties for a given configuration that you load into a JVM. import java.util.*; import org.apache.hadoop.hbase.*; import…
Simple HBase stress tester
What is below is a simple class to read a random set of records from a table. This should be a good start if you are looking for a simple one class test case, that may also be useful for…
Simple HBase class to load data
What is below is a simple java class to load the customers table we created in a previous post import java.util.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; public class putHbase { public static void main(String[] args) throws Exception { HTable hTable =…
Bridging the gap…from SQL to No SQL
For any DBA’s that have had someone call them and ask “What do you know about NoSQL?”, this post is specifically intended. Before you have a conniption fit and began quoting Tom Kyte-ism’s (an exceptionally smart guy, if you do…