随笔分类 -  hbase

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

点击右上角即可分享
微信分享提示