随笔分类 - hbase
摘要:脚本主要是方便自己工作使用,服务器环境中配置了hbase相关环境变量 1.hbase备份脚本 #!/bin/bash tableList=("table1" "table2" "table3" "table4" "table5") for table in ${tableList[@]} do hb
阅读全文
摘要:hbase shell 命令行的操作 查询数据(一行) get 'zx_cloud_company_base_info', '340102000448661' 删除数据(一行) deleteall 'zx_cloud_company_base_info', '340102000448661' 清空数
阅读全文
摘要:hbase过滤器的分类 1、比较过滤器 行键过滤器 RowFilter Filter filter1 = new RowFilter(CompareOp.LESS_OR_EQUAL, new BinaryComparator(Bytes.toBytes("row-22"))); scan.setFi
阅读全文
摘要:查看hbase表大小。 进入 hbase 所在服务器 hbase shell 进入 hbase 库 list_namespace 列出所有命名空间 describe_namspace 'hbase' 查看指定命名空间 list_namespace_table 'default' 查看指定命名空间下的
阅读全文
摘要:列的详细信息 得到某一行所有数据public static void getRow(String tableName, String rowKey) throws IOException{ HTable table = new HTable(conf, tableName); Get get = n
阅读全文
摘要:hbase 查询字段开头 public static List<ContentCommodityDto> loadData(int loadSize) { List<ContentCommodityDto> dataList = new ArrayList<>(); Table table = nu
阅读全文
摘要:一. 用hbase自带的mapreduce程序来计算如下, /usr/hdp/2.3.0.0-2557/hbase/bin [root@node1 bin]# ./hbase org.apache.hadoop.hbase.mapreduce.RowCounter 'testtable0728'
阅读全文
摘要:hbase and or 连用查询空串空字段 private static void loadAllData2IfStatus(String tableName) { try { Table table = HbaseUtil.getTable(tableName); Scan scan = new
阅读全文