|
| 1 | +/* Copyright (C) 2013-2014, International Business Machines Corporation */ |
| 2 | +/* All Rights Reserved */ |
| 3 | + |
| 4 | +/** |
| 5 | + * This file describes how to get started using HBASE and Streams with this toolkit. |
| 6 | + * |
| 7 | + * [https://hbase.apache.org/|Apache HBASE] is non-relational database modeled |
| 8 | + * after Google's BigTable. It is highly scalable, but does not have some of the |
| 9 | + * features that come with a standard relational database. |
| 10 | + * |
| 11 | + * |
| 12 | + * **Getting HBASE** |
| 13 | + * This toolkit requires that HBASE already be installed and running on your system. |
| 14 | + * HBASE, in turn, requires [http://hadoop.apache.org/|HDFS] and [http://zookeeper.apache.org/|Zookeeper]. |
| 15 | + * If you are working from a BigInsights installation, all of these are installed as part of that. |
| 16 | + * If not, see their documentation for how to download, setup, and install. |
| 17 | + * |
| 18 | + * *Note: The host on which Streams is installed must be able to communicate with the hosts where |
| 19 | + * HBASE is installed, but you do not need both on the same host.* |
| 20 | + * |
| 21 | + * This toolkit was tested against HBASE v0.94, but probably will work against newer versions. |
| 22 | + * |
| 23 | + * **Setup** |
| 24 | + * The toolkit needs certain libraries from HBASE to compile. At runtime, it needs some IP and port |
| 25 | + * information to connect. |
| 26 | + * |
| 27 | + * For the toolkit to find what it needs, set the environment variable HBASE_HOME to point to the |
| 28 | + * directory containing HBASE (ie, the directory one step above conf and bin). You'll likewise need to set HADOOP_HOME to point |
| 29 | + * to the directory containing hadoop. Again, this is the directory one step up from conf and bin. |
| 30 | + * In BigInsights, it's `IHC`. |
| 31 | + * |
| 32 | + * *If streams is not a host containing the HBASE* then first copy the entire HBASE_HOME and HADOOP_HOME to |
| 33 | + * a place accessible to streams. The operators need both the config files from the conf directory |
| 34 | + * and some of the jars under those directories. |
| 35 | + * |
| 36 | + * **Building the toolkit** |
| 37 | + * Once you have set the HBASE_HOME and HADOOP_HOME environment variables, you can build the toolkit |
| 38 | + * by typing ant either in the top-level directory or in the toolkit directory. If you cloned the repository |
| 39 | + * from github, or downloaded the zip file or archive, then you must do this step, as otherwise there is |
| 40 | + * none of the toolkit artifacts (toolkit.xml, operator xml files, etc) that Streams needs. |
| 41 | + * |
| 42 | + * **Using the toolkit** |
| 43 | + * The [com.ibm.streamsx.hbase:overview.spl] contains an overall description of the toolkit. To see the operators |
| 44 | + * in action, look at the samples. `PutRecord` uses HBASE to store book information, and `PutSample` stores information |
| 45 | + * about characters in a book. In both cases, you'll need to create the table before running the app, so be sure to read |
| 46 | + * the comment. |
| 47 | + * |
| 48 | + * **Viewing tuples in HBASE** |
| 49 | + * One very useful tool for debugging is the hbase shell. To run it, you must be on a HBASE host (ie, |
| 50 | + * just copying over the files works for streams, but won't work here), and then run `$HBASE_HOME/bin/hbase shell` |
| 51 | + * You'll use the shell to create tables and view their status. |
| 52 | + * |
| 53 | + */ |
| 54 | + |
| 55 | +namespace com.ibm.streamsx.hbase; |
0 commit comments