首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

hbase的一些简略操作

2013-07-08 
hbase的一些简单操作初始化查询一条数据更新数据public void filter(String tablename, String key,int co

hbase的一些简单操作
初始化

public void filter(String tablename, String key,int count) throws IOException {HTable table = new HTable(cfg, tablename);Scan s = new Scan();List<Filter> list = new ArrayList<Filter>();list.add(new PrefixFilter(key.getBytes()));list.add(new PageFilter(count));FilterList filter = new FilterList(list);s.setFilter(filter);ResultScanner rs = table.getScanner(s);         }

热点排行