A nicer Java Client API for Hypertable, using row-oriented operations in the style of HBase.
client.table_exists(ns, name);
client.exists_table(ns, name);
Among other things, the Thrift API isn't stylistically consistent with Java conventions (camel case instead of underscores, etc.) and in some cases is needlessly verbose.
Performing operations from a row-oriented perspective makes tasks conceptually easier. The Java client wrapper also provides operations that are either unavailable or annoying in the Thrift API.
HypertableClient htc = new HypertableClient("localhost", 38080);
TableSchema table = new TableSchema().addColumnFamily("cfam");
htc.createTable("htc_test", table);
Put put = new Put("42")
.add("cfam", "cqual1", "val1")
.add("cfam", "cqual2", "val2");
htc.put("htc_test", put);
List<Result> res = htc.scan("htc_test", new Scan("42"));
for(Result r: res){
sopl(r.getFamily("cfam"));
sopl(r.getValue("cfam", "cqual1"));
}
- Create table using a Schema string in XML without HQL (thrift does not expose the function: https://groups.google.com/forum/#!msg/hypertable-user/QnMGE1LgpAI/JMWDCUWe8wUJ)
- Delete n most recent revisions of cell
- Access data as Result objects encapsulating all columns associated with a single rowkey
- Access column families as qualifier-value maps
- Fork the project
- Increase awesomeness of the project
- Test new awesomeness
- Commit and send a pull request