1. Download the code.
$] git clone https://github.com/randomtask1155/HbaseThriftTest.git
2. Compile the code.
$] cd HbaseThriftTest $] mvn compile $] mvn package
Attached jar file is for PHD 2.0.1.0 Hbase 0.96.0
Depending on what options used to start Hbase, Thrift will determine what Transport method is used.
Usage: java -classpath HbaseThriftTest.jar:`hbase classpath` io.pivotal.support.HbaseThriftTest <host> <port> <protocol> <table name> <column family>
java -classpath HbaseThriftTest.jar:`hbase classpath` io.pivotal.support.HbaseThriftTest hdm1 9090 compact sample_demo_table demodata java -classpath HbaseThriftTest.jar:`hbase classpath` io.pivotal.support.HbaseThriftTest hdm1 9090 framed sample_demo_table demodata java -classpath HbaseThriftTest.jar:`hbase classpath` io.pivotal.support.HbaseThriftTest hdm1 9090 binary sample_demo_table demodata
[gpadmin@hdw1 ~]$ java -classpath HbaseThriftTest-1.1.jar:`hbase classpath` io.pivotal.support.HbaseThriftTest hdw1 9090 compact NEWTABLE demodata SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/lib/gphd/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/lib/gphd/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. #~ Dumping Existing tables -- found: TestTable -- found: sample_demo_table -- found: sample_demo_table2 #~ Creating table: NEWTABLE
HbaseThriftTest-1.1 (There is no preview available with this file; download and use it as required.)