HBase笔记--编程实战

HBase总结:http://blog.csdn.net/lifuxiangcaohui/article/details/39997205  (very good)

Spark使用Java读取hbase: http://my.oschina.net/132722/blog/196350

HBase dao:http://www.xuebuyuan.com/2047942.html

HBase Scan类用法: http://www.cnblogs.com/linjiqin/archive/2013/06/05/3118921.html

HBase Qualifier 和 Family的区别:http://blog.csdn.net/wkwanglei/article/details/43988109

Java操作HBase:http://www.cnblogs.com/ylqmf/archive/2012/02/18/2357537.html
HBase基本操作详解:http://blog.csdn.net/linlinv3/article/details/45393471

public static void QueryByCondition2(String tableName) {
System.out.println("QueryByCondition2");
try {
HTable table = new HTable(configuration, tableName);
Filter filter = new SingleColumnValueFilter(
Bytes.toBytes("column1"), null, CompareOp.EQUAL,
Bytes.toBytes("aaa")); // 当列column1的值为aaa时进行查询
Scan s = new Scan();
s.setFilter(filter);
ResultScanner rs = table.getScanner(s);
for (Result r : rs) {
System.out.println("获得到rowkey:" + new String(r.getRow()));
for(Cell cell : r.rawCells()){
System.out.println("cell列:"+new String(CellUtil.cloneFamily(cell))
+ "====cell值:"+new String(CellUtil.cloneValue(cell)));
}
for (KeyValue keyValue : r.raw()) {
System.out.println("列:" + new String(keyValue.getFamily())
+ "====值:" + new String(keyValue.getValue()));
}
}
} catch (Exception e) {
e.printStackTrace();
}
}

Hive和HBase区别:http://www.cnblogs.com/justinzhang/p/4273470.html

上一篇:[原创]java WEB学习笔记84:Hibernate学习之路-- -映射 一对一关系 ,基外键的方式实现


下一篇:mysql安装后服务启动不了