Crux 是一个用于 HBase 的报告应用程序。Crux 提供了基于 Web 的简单图形用户界面,可用于访问 HBase、查询数据和创建报告。Crux 是开源的。
Crux 是一个用于 HBase 的报告应用程序。Crux 提供了基于 Web 的简单图形用户界面,可用于访问 HBase、查询数据和创建报告。Crux 是开源的。
Crux development is happening in two branches, master and aggregation. The aggregation branch is the current action branch, where we are providing enhanced querying and reporting capabilities.
Crux has been Tested Against
Cloudera's distribution CDH4
Cloudera's distribution CDH3 - Hadoop 0.20.2-CDH3u5
Apache HBase 0.92.1
Apache HBase 0.90.3 on Apache Hadoop 0.20.2 with Hadoop append.
Crux uses the HBase Java client API, which is a fully featured way to access HBase. There are other clients available for HBase, for example Rest, Thrift and Avro. At the time of writing Crux, these clients do not expose the complete conditional querying capability needed by Crux. Then there are batch clients like Map Reduce, Hive handler, Pig and Cascading. These are great for performing batch analysis using HBase data. However, a reporting application needs faster response time than the batch nature of these. Crux thus uses the HBase Java Client API.
Crux also uses MySQL to store the mapping of HBase schemas, connections and reports. The front end is built using Ajax, Dojo, Struts, with Hibernate. Crux uses open source software and comes with Apache License.
Prerequisies:
a. Create database for crux in MySQL
mysql>create databse crux;
mysql>use crux;
Create schema by running crux/db/schema.sql file in MySQL prompt,
mysql>source ${CRUX_HOME}/db/schema.sql
This creates the schema required for saving the report definitions.
b. Build crux(See instructions to build crux with Maven). Or download the tar appropriate for your HBase version from the github downloads link.
c. Copy crux.jar to ${HBASE_HOME}/lib or edit ${HBASE_HOME}/conf/hbase-env.sh and add the jars location to the file.
For example,
export HBASE_CLASSPATH="/home/crux/target/crux.jar"
Restart hbase
Go to Hbase home/bin and then enter start-hbase.sh
$ HBASE_HOME/bin/start-hbase.shThen start hbase shell.
$ HBASE_HOME/bin/hbase shellThis is needed as Crux has built in filters which work on the server side to select the data you choose.
d. Drop the war in tomcat/webapps and start tomcat by going to tomcat home/bin and enter startup.sh
$apache-tomcat-home/bin/startup.shAlternatively, just run
CRUX_HOME$ mvn jetty:run e. Go to http://localhost:8080/crux and define your connection, mapping and report.
Update hibernate.properties(crux/) with your MySQL host, port, dbname, testDbName, user and password.
Download struts2-fullhibernatecore-plugin-2.2.2-GA.jar from http://code.google.com/p/full-hibernate-plugin-for-struts2/downloads/detail?name=struts2-fullhibernatecore-plugin-2.2.2-GA.jar&can=2&q=and add to your local repository by executing command given below.
mvn install:install-file -DgroupId=com.google.code -DartifactId=struts2-fullhibernatecore-plugin -Dversion=2.2.2-GA -Dpackaging=jar -Dfile=${PATH_TO_struts2-fullhibernatecore-plugin-2.2.2-GA.jar}
Crux can be built against HBase 0.90.3(default), HBase 0.90.6 or against HBase 0.92.1. Crux artifacts crux.war and crux.jar are created in crux/target/
To build and create war against 0.90.3
Go to the base directory where pom.xml is located and enter
mvn install -DskipTests (in order to skip tests) or
mvn install to run tests and create war
CRUX_HOME$ mvn -Dcdh4 installCRUX_HOME$mvn -Dcdh3 installCRUX_HOME$ mvn test(For running tests against 0.92.1, set umask 0022 and run tests against hbase0.92 profile)
暂无开放 Issues,或尚未同步最近议题。