Hbase使用javaAPI链接调用和过滤器API的使用

HBase集群搭建和操作 文章目录6、HBase的集群环境搭建7、HBase常用shell操作1、进入HBase客户端命令操作界面2、查看帮助命令3、查看当前数据库中有哪些表4、创建一张表5、添加数据操作6、查询数据操作1、通过rowkey进行查询2、查看rowkey下面的某个列族的信息3、查看rowkey指定列族指定字段的值4、查看rowkey指定多个列族的信息4、指定rowkey与列值查询5、指定rowkey与列值模糊... 阅读详情

javaAPI调用链接Hbase

javaAPI链接Hbase的基础demo,后面的过滤部分也以此table为主

pom

		<!--HBASE START-->
		<dependency>
			<groupId>org.apache.hbase</groupId>
			<artifactId>hbase-client</artifactId>
			<version>1.4.9</version>
		</dependency>
		<dependency>
			<groupId>org.apache.hbase</groupId>
			<artifactId>hbase-server</artifactId>
			<version>1.4.9</version>
		</dependency>
		<dependency>
		<groupId>org.apache.hbase</groupId>
		<artifactId>hbase-common</artifactId>
		<version>1.4.9</version>
		</dependency>

		<!--HBASE END-->

java

public class HbaseDemo {


    private static Admin admin;

    public static void main(String[] args){
        System.setProperty("hadoop.home.dir", "d:/");

        String tableName ="user_table";
        try {
            createTable(tableName, new String[] { "information", "contact" });
            showTable(tableName);
            User user = new User("001", "xiaoming", "123456", "man", "20", "13355550021", "1232821@bmaoo.com");
            insertData("user_table", user);
            User user2 = new User("002", "xiaohong", "654321", "female", "18", "18757912212", "214214@bmaoo.com");
            insertData(tableName, user2);

            System.out.println("--------------------获取原始数据-----------------------");
            getNoDealData(tableName);
            System.out.println("--------------------行列簇值对应关系数据-----------------------");
            getAllRows(tableName);
            List<User> list = getAllData(tableName);
            System.out.println("--------------------原始数据解析处理后--------------------");
            for (User user3 : list){
                System.out.println(user3.toString());
            }

            System.out.println("--------------------根据rowKey查询--------------------");
            User user4 = getDataByRowKey("user_table", "user-001");
            System.out.println(user4.toString());
            System.out.println("--------------------获取指定列族:列的属性值数据-------------------");
            String user_phone = getCellData("user_table", "user-001", "contact", "phone");
            System.out.println(user_phone);
            System.out.println("--------------------插入测试数据--------------------");
//            User user5 = new User("test-003", "xiaoguang", "789012", "man", "22", "12312132214", "856832@bmaoo.com");
//            insertData("user_table", user5);
//            List<User> list2 = getAllData("user_table");
//
//            for (User user6 : list2){
//                System.out.println(user6.toString());
//            }

//            System.out.println("--------------------删除测试数据--------------------");
//            deleteByRowKey("user_table", "user-test-003");
//            List<User> list3 = getAllData("user_table");
//
//            for (User user7 : list3){
//                System.out.println(user7.toString());
//            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    //连接集群
    public static Connection initHbase() throws IOException {

        Configuration configuration = HBaseConfiguration.create();
        configuration.set("hbase.zookeeper.quorum", "192.168.1.101");
        configuration.set("hbase.zookeeper.property.clientPort", "2181");

        //集群配置↓
        //configuration.set("hbase.zookeeper.quorum", "101.236.39.141,101.236.46.114,101.236.46.113");
//        configuration.set("hbase.master", "192.168.1.101:60000");
        Connection connection = ConnectionFactory.createConnection(configuration);
        return connection;
    }


    public static void scanDataStep1(String tableName) throws Exception {

        Table table= initHbase().getTable(TableName.valueOf(tableName));
        Scan scan = new Scan();
        ResultScanner scanner = table.getScanner(scan);
        for (Result result : scanner) {
            if (result.getValue(Bytes.toBytes("info"), Bytes.toBytes("f_pid")) == null) {
                for (KeyValue kv : result.raw()) {
                    System.out.print(new String(kv.getRow()) + " ");
                    System.out.print(new String(kv.getFamily()) + ":");
                    System.out.print(new String(kv.getQualifier()) + " = ");
                    System.out.print(new String(kv.getValue()));
                    System.out.print(" timestamp = " + kv.getTimestamp() + "\n");
                }
            }
        }
    }

    //创建表
    public static void createTable(String tableNmae, String[] cols) throws IOException {

        TableName tableName = TableName.valueOf(tableNmae);
        admin = initHbase().getAdmin();
        if (admin.tableExists(tableName)) {
            System.out.println("表已存在!");
        } else {
            HTableDescriptor hTableDescriptor = new HTableDescriptor(tableName);
            for (String col : cols) {
                HColumnDescriptor hColumnDescriptor = new HColumnDescriptor(col);
                hTableDescriptor.addFamily(hColumnDescriptor);
            }
            admin.createTable(hTableDescriptor);
        }
    }


    // 显示表结构
    public static void showTable(String tableNmae) throws Exception {
        admin = initHbase().getAdmin();
        HTableDescriptor tableDescriptor = admin.getTableDescriptor(TableName.valueOf(tableNmae));
        System.out.println("表结构--------------------------");
        byte[] name = tableDescriptor.getName();
        System.out.println("下面开始输出结果:");
        System.out.println("表名:" + new String(name));
        HColumnDescriptor[] columnFamilies = tableDescriptor.getColumnFamilies();
        for (HColumnDescriptor d : columnFamilies)
        {
            System.out.println("列族名:" + d.getNameAsString());
        }

    }

    //插入数据
    public static void insertData(String tableName, User user) throws IOException {
        TableName tablename = TableName.valueOf(tableName);
        Put put = new Put(("user-" + user.getId()).getBytes());
        //参数:1.列族名  2.列名  3.值
        put.addColumn("information".getBytes(), "username".getBytes(), user.getUsername().getBytes()) ;
        put.addColumn("information".getBytes(), "age".getBytes(), user.getAge().getBytes()) ;
        put.addColumn("information".getBytes(), "gender".getBytes(), user.getGender().getBytes()) ;
        put.addColumn("contact".getBytes(), "phone".getBytes(), user.getPhone().getBytes());
        put.addColumn("contact".getBytes(), "email".getBytes(), user.getEmail().getBytes());
        //HTable table = new HTable(initHbase().getConfiguration(),tablename);已弃用
        Table table = initHbase().getTable(tablename);
        table.put(put);
    }

    //获取原始数据
    public static void getNoDealData(String tableName){
        try {
            Table table= initHbase().getTable(TableName.valueOf(tableName));
            Scan scan = new Scan();
            ResultScanner resutScanner = table.getScanner(scan);
            for(Result result: resutScanner){
                System.out.println("scan:  " + result);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    // 得到所有数据,行,列簇,列名,值
    public static void getAllRows(String tableName) throws IOException{

        Table table = initHbase().getTable(TableName.valueOf(tableName));
        //得到用于扫描 region 的对象
        Scan scan = new Scan();
        //使用 HTable 得到 resultcanner 实现类的对象
        ResultScanner resultScanner = table.getScanner(scan);
        System.out.print("行键\t\t列族\t列\t值\n");
        for(Result result : resultScanner){
            Cell[] cells = result.rawCells();
            for(Cell cell : cells){
                //得到 rowkey
                System.out.print(Bytes.toString(CellUtil.cloneRow(cell)) +"\t");
                //得到列族
                System.out.print( Bytes.toString(CellUtil.cloneFamily(cell)) +"\t");
                System.out.print( Bytes.toString(CellUtil.cloneQualifier(cell))+"\t");
                System.out.println( Bytes.toString(CellUtil.cloneValue(cell)));
            }
            System.out.println("--------------------------------");
        }
    }

    //根据rowKey进行查询
    public static User getDataByRowKey(String tableName, String rowKey) throws IOException {

        Table table = initHbase().getTable(TableName.valueOf(tableName));
        Get get = new Get(rowKey.getBytes());
        User user = new User();
        user.setId(rowKey);
        //先判断是否有此条数据
        if(!get.isCheckExistenceOnly()){
            Result result = table.get(get);
            for (Cell cell : result.rawCells()){
                String colName = Bytes.toString(cell.getQualifierArray(),cell.getQualifierOffset(),cell.getQualifierLength());
                String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
                if(colName.equals("username")){
                    user.setUsername(value);
                }
                if(colName.equals("age")){
                    user.setAge(value);
                }
                if (colName.equals("gender")){
                    user.setGender(value);
                }
                if (colName.equals("phone")){
                    user.setPhone(value);
                }
                if (colName.equals("email")){
                    user.setEmail(value);
                }
            }
        }
        return user;
    }

    //查询指定单cell内容
    public static String getCellData(String tableName, String rowKey, String family, String col){

        try {
            Table table = initHbase().getTable(TableName.valueOf(tableName));
            String result = null;
            Get get = new Get(rowKey.getBytes());
            if(!get.isCheckExistenceOnly()){
                get.addColumn(Bytes.toBytes(family),Bytes.toBytes(col));
                Result res = table.get(get);
                byte[] resByte = res.getValue(Bytes.toBytes(family), Bytes.toBytes(col));
                return result = Bytes.toString(resByte);
            }else{
                return result = "查询结果不存在";
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return "出现异常";
    }

    //查询指定表名中所有的数据
    public static List<User> getAllData(String tableName){

        Table table = null;
        List<User> list = new ArrayList<User>();
        try {
            table = initHbase().getTable(TableName.valueOf(tableName));
            ResultScanner results = table.getScanner(new Scan());
            User user = null;
            for (Result result : results){
                String id = new String(result.getRow());
                System.out.println("用户名:" + new String(result.getRow()));
                user = new User();
                for(Cell cell : result.rawCells()){
                    String row = Bytes.toString(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength());
                    //String family =  Bytes.toString(cell.getFamilyArray(),cell.getFamilyOffset(),cell.getFamilyLength());
                    String colName = Bytes.toString(cell.getQualifierArray(),cell.getQualifierOffset(),cell.getQualifierLength());
                    String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
                    user.setId(row);
                    if(colName.equals("username")){
                        user.setUsername(value);
                    }
                    if(colName.equals("age")){
                        user.setAge(value);
                    }
                    if (colName.equals("gender")){
                        user.setGender(value);
                    }
                    if (colName.equals("phone")){
                        user.setPhone(value);
                    }
                    if (colName.equals("email")){
                        user.setEmail(value);
                    }
                }
                list.add(user);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return list;
    }

    //删除指定cell数据
    public static void deleteByRowKey(String tableName, String rowKey) throws IOException {

        Table table = initHbase().getTable(TableName.valueOf(tableName));
        Delete delete = new Delete(Bytes.toBytes(rowKey));
        //删除指定列
        //delete.addColumns(Bytes.toBytes("contact"), Bytes.toBytes("email"));
        table.delete(delete);
    }

    //删除表
    public static void deleteTable(String tableName){

        try {
            TableName tablename = TableName.valueOf(tableName);
            admin = initHbase().getAdmin();
            admin.disableTable(tablename);
            admin.deleteTable(tablename);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }




}

HBase 过滤器

基础API中的查询操作在面对大量数据的时候是非常苍白的,这里Hbase提供了高级的查询方法:Filter。Filter可以根据簇、列、版本等更多的条件来对数据进行过滤,基于Hbase本身提供的三维有序(主键有序、列有序、版本有序),这些Filter可以高效的完成查询过滤的任务。带有Filter条件的RPC查询请求会把Filter分发到各个RegionServer,是一个服务器端(Server-side)的过滤器,这样也可以降低网络传输的压力。

要完成一个过滤的操作,至少需要两个参数。一个是抽象的操作符,Hbase提供了枚举类型的变量来表示这些抽象的操作符:LESS/LESS_OR_EQUAL/EQUAL/NOT_EUQAL等;另外一个就是具体的比较器(Comparator),代表具体的比较逻辑,如果可以提高字节级的比较、字符串级的比较等。有了这两个参数,我们就可以清晰的定义筛选的条件,过滤数据。

抽象操作符(比较运算符)

LESS <

LESS_OR_EQUAL <=

EQUAL =

NOT_EQUAL <>

GREATER_OR_EQUAL >=

GREATER >

NO_OP 排除所有

比较器(指定比较机制)

BinaryComparator 按字节索引顺序比较指定字节数组,采用 Bytes.compareTo(byte[])

BinaryPrefixComparator 跟前面相同,只是比较左端的数据是否相同

NullComparator 判断给定的是否为空

BitComparator 按位比较

RegexStringComparator 提供一个正则的比较器,仅支持 EQUAL 和非 EQUAL

SubstringComparator 判断提供的子串是否出现在 value 中

java编码


输出结果

user-006/contact:email/1546667518090/Put/vlen=16/seqid=0
user-006/contact:phone/1546667518090/Put/vlen=11/seqid=0
user-006/information:age/1546667518090/Put/vlen=2/seqid=0
user-006/information:gender/1546667518090/Put/vlen=3/seqid=0
user-006/information:password/1546667518090/Put/vlen=6/seqid=0
user-006/information:username/1546667518090/Put/vlen=7/seqid=0
user-007/contact:email/1546667518117/Put/vlen=16/seqid=0
user-007/contact:phone/1546667518117/Put/vlen=11/seqid=0
user-007/information:age/1546667518117/Put/vlen=2/seqid=0
user-007/information:gender/1546667518117/Put/vlen=6/seqid=0
user-007/information:password/1546667518117/Put/vlen=6/seqid=0
user-007/information:username/1546667518117/Put/vlen=7/seqid=0
user-008/contact:email/1546667518144/Put/vlen=16/seqid=0
user-008/contact:phone/1546667518144/Put/vlen=11/seqid=0
user-008/information:age/1546667518144/Put/vlen=2/seqid=0
user-008/information:gender/1546667518144/Put/vlen=3/seqid=0
user-008/information:password/1546667518144/Put/vlen=6/seqid=0
user-008/information:username/1546667518144/Put/vlen=7/seqid=0
user-009/contact:email/1546667518173/Put/vlen=16/seqid=0
user-009/contact:phone/1546667518173/Put/vlen=11/seqid=0
user-009/information:age/1546667518173/Put/vlen=2/seqid=0
user-009/information:gender/1546667518173/Put/vlen=6/seqid=0
user-009/information:password/1546667518173/Put/vlen=6/seqid=0
user-009/information:username/1546667518173/Put/vlen=7/seqid=0
列簇过滤器 FamilyFilter :过滤info信息----------------------------------------------------------------------
user-000/contact:email/1546667517904/Put/vlen=16/seqid=0
user-000/contact:phone/1546667517904/Put/vlen=11/seqid=0
user-001/contact:email/1546667517960/Put/vlen=16/seqid=0
user-001/contact:phone/1546667517960/Put/vlen=11/seqid=0
user-002/contact:email/1546667517996/Put/vlen=16/seqid=0
user-002/contact:phone/1546667517996/Put/vlen=11/seqid=0
user-003/contact:email/1546667518018/Put/vlen=16/seqid=0
user-003/contact:phone/1546667518018/Put/vlen=11/seqid=0
user-004/contact:email/1546667518041/Put/vlen=16/seqid=0
user-004/contact:phone/1546667518041/Put/vlen=11/seqid=0
user-005/contact:email/1546667518067/Put/vlen=16/seqid=0
user-005/contact:phone/1546667518067/Put/vlen=11/seqid=0
user-006/contact:email/1546667518090/Put/vlen=16/seqid=0
user-006/contact:phone/1546667518090/Put/vlen=11/seqid=0
user-007/contact:email/1546667518117/Put/vlen=16/seqid=0
user-007/contact:phone/1546667518117/Put/vlen=11/seqid=0
user-008/contact:email/1546667518144/Put/vlen=16/seqid=0
user-008/contact:phone/1546667518144/Put/vlen=11/seqid=0
user-009/contact:email/1546667518173/Put/vlen=16/seqid=0
user-009/contact:phone/1546667518173/Put/vlen=11/seqid=0
值过滤器 ValueFilter :过滤性别为女的数据----------------------------------------------------------------------
user-001/information:gender/1546667517960/Put/vlen=6/seqid=0
user-003/information:gender/1546667518018/Put/vlen=6/seqid=0
user-005/information:gender/1546667518067/Put/vlen=6/seqid=0
user-007/information:gender/1546667518117/Put/vlen=6/seqid=0
user-009/information:gender/1546667518173/Put/vlen=6/seqid=0
时间戳过滤器 TimestampsFilter ValueFilter :过滤时间戳为1546665288963的数据----------------------------------------------------------------------
单列值过滤器 SingleColumnValueFilter :过滤名字为hbase_4的数据----------------------------------------------------------------------
user-004	contact	email	base_4@hbase.com	1546667518041
user-004	contact	phone	13355550024	1546667518041
user-004	information	age	20	1546667518041
user-004	information	gender	man	1546667518041
user-004	information	password	123456	1546667518041
user-004	information	username	hbase_4	1546667518041
前缀过滤器 PrefixFilter----只对行键有用----------------------------------------------------------------------
user-000	contact	email	base_0@hbase.com	1546667517904
user-000	contact	phone	13355550020	1546667517904
user-000	information	age	20	1546667517904
user-000	information	gender	man	1546667517904
user-000	information	password	123456	1546667517904
user-000	information	username	hbase_0	1546667517904
user-001	contact	email	base_1@bmaoo.com	1546667517960
user-001	contact	phone	13355550021	1546667517960
user-001	information	age	21	1546667517960
user-001	information	gender	female	1546667517960
user-001	information	password	123456	1546667517960
user-001	information	username	hbase_1	1546667517960
user-002	contact	email	base_2@hbase.com	1546667517996
user-002	contact	phone	13355550022	1546667517996
user-002	information	age	20	1546667517996
user-002	information	gender	man	1546667517996
user-002	information	password	123456	1546667517996
user-002	information	username	hbase_2	1546667517996
user-003	contact	email	base_3@bmaoo.com	1546667518018
user-003	contact	phone	13355550023	1546667518018
user-003	information	age	21	1546667518018
user-003	information	gender	female	1546667518018
user-003	information	password	123456	1546667518018
user-003	information	username	hbase_3	1546667518018
user-004	contact	email	base_4@hbase.com	1546667518041
user-004	contact	phone	13355550024	1546667518041
user-004	information	age	20	1546667518041
user-004	information	gender	man	1546667518041
user-004	information	password	123456	1546667518041
user-004	information	username	hbase_4	1546667518041
user-005	contact	email	base_5@bmaoo.com	1546667518067
user-005	contact	phone	13355550025	1546667518067
user-005	information	age	21	1546667518067
user-005	information	gender	female	1546667518067
user-005	information	password	123456	1546667518067
user-005	information	username	hbase_5	1546667518067
user-006	contact	email	base_6@hbase.com	1546667518090
user-006	contact	phone	13355550026	1546667518090
user-006	information	age	20	1546667518090
user-006	information	gender	man	1546667518090
user-006	information	password	123456	1546667518090
user-006	information	username	hbase_6	1546667518090
user-007	contact	email	base_7@bmaoo.com	1546667518117
user-007	contact	phone	13355550027	1546667518117
user-007	information	age	21	1546667518117
user-007	information	gender	female	1546667518117
user-007	information	password	123456	1546667518117
user-007	information	username	hbase_7	1546667518117
user-008	contact	email	base_8@hbase.com	1546667518144
user-008	contact	phone	13355550028	1546667518144
user-008	information	age	20	1546667518144
user-008	information	gender	man	1546667518144
user-008	information	password	123456	1546667518144
user-008	information	username	hbase_8	1546667518144
user-009	contact	email	base_9@bmaoo.com	1546667518173
user-009	contact	phone	13355550029	1546667518173
user-009	information	age	21	1546667518173
user-009	information	gender	female	1546667518173
user-009	information	password	123456	1546667518173
user-009	information	username	hbase_9	1546667518173
列前缀过滤器 ColumnPrefixFilter匹配password,phone两个----------------------------------------------------------------------
user-000	contact	phone	13355550020	1546667517904
user-000	information	password	123456	1546667517904
user-001	contact	phone	13355550021	1546667517960
user-001	information	password	123456	1546667517960
user-002	contact	phone	13355550022	1546667517996
user-002	information	password	123456	1546667517996
user-003	contact	phone	13355550023	1546667518018
user-003	information	password	123456	1546667518018
user-004	contact	phone	13355550024	1546667518041
user-004	information	password	123456	1546667518041
user-005	contact	phone	13355550025	1546667518067
user-005	information	password	123456	1546667518067
user-006	contact	phone	13355550026	1546667518090
user-006	information	password	123456	1546667518090
user-007	contact	phone	13355550027	1546667518117
user-007	information	password	123456	1546667518117
user-008	contact	phone	13355550028	1546667518144
user-008	information	password	123456	1546667518144
user-009	contact	phone	13355550029	1546667518173
user-009	information	password	123456	1546667518173

更多hadoop进阶源码请参看我的github地址

springboot-habse操作整合
https://gitee.com/susonglin/springboot_hbase_kafka

HBase安装配置以及Java操作hbase Apache HBase Apache HBase™是Hadoop数据库,是一个分布式,可扩展的大数据存储。 当您需要对大数据进行随机,实时读/写访问时,请使用Apache HBase™。该项目的目标是托管非常大的表 - 数十亿行X百万列 - 在商品硬件集群上。Apache HBase是一个开源的,分布式的,版本化的非关系数据库 特征 线性和模块化可扩展性。 严格一致的读写操作。 ... 阅读详情

相关推荐

Hbase系列-2、Hbase基础

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 大数据系列文章目录 Hbase的官网 目录Hbase的基本简介Hbase的基本介绍Hbase的应用场景Hbase的发展历程Hbase的特点Hbase与RDBMS、HDFS 、Hive的区别Hbase的表模型Hbase的相关操作-命令式Hbase的基础操作命令Hbase高级shell管理命令 Hbase的基本简介 Hbase的基本介绍 NoSQL是一个通用术语,泛指一个数据库并不是使用SQL作为主要语言

不积跬步无以至千里,不积小流无以成江河 1729

java使用hbase过滤器

1.什么是过滤器 过滤器可以根据列族、列、版本等更多的条件来对数据进行过滤, 基于 HBase 本身提供的三维有序(行键,列,版本有序),这些过滤器可以高效地完成查询过滤的任务,带有过滤器条件的 RPC 查询请求会把过滤器分发到各个 RegionServer(这是一个服务端过滤器),这样也可以降低网络传输的压力。 2.比较运算符 LESS < LESS_OR_EQUAL <= EQUAL = NOT_EQUAL <> GREAT

zzds111的博客 3757

java操作Hbase之Hbase专用过滤器PageFilter的使用源代码

java操作Hbase之Hbase专用过滤器PageFilter的使用源代码,附带全部所需源代码,欢迎下载学习。

HBase Java 过滤器

大数据相关博客的目录 HBase过滤器 过滤器简介 HBase过滤器可以提供多个纬度对数据进行筛选,类似于SQL中的WHERE条件。 过滤器可以根据如下纬度进行过滤: 行键 列簇 列 单元格 时间戳 组合过滤 HBase过滤器使用方法 ​ // do something ​ TableName tableName = TableName.valueOf("表名"); Tabl...

weixin_46192593的博客 555

java操作Hbase之比较过滤器RowFilter的使用源码

java操作Hbase之比较过滤器RowFilter的使用源码,附带所需全部jar包,欢迎下载学习。

drm 之modes

#define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> #include <time.h&...

u012794472的专栏 3738

HBase常用的Filter过滤器操作

1.ValueFilter过滤器根据数据列单元格的值进行过滤。值过滤器的比较方式有二进制位比较(binary)和子字符串匹配比较(substring(1)按二进制位进行值比较使用get命令,查询students表格中,行键为s001,单元格值为Jack的数据结果。#ValueFilter(=,'binary:Jack')是值过滤器,比较方式是binary二进制1 row(s)使用scan命令,扫描出students表格中,单元格值为90的数据结果。

wanglingli95的博客 3105

OSMDroid 切换地图不更新的问题

用OSMDroid加载Google地图的时候 需要有按钮切换不同图层的地图,如果发现调用了mMapView.setTileSource(ITileSource aTileSource)方法的时候发现地图View没有更新的话,可能是因为两个实例化TileSource对象其子类BitmapTileSourceBase这个类的aName成员变量值一样导致的地图在setTileSource出现不更新问题,...

godoge的博客 1047

hbase的javaapi操作之过滤器fillter

hbase的javaapi操作之过滤器fillter 过滤器:相当于where语句 因为列值过滤器都属于表的操作,属于DML语句,所以我们使用链接来获取表,再用表进行操作 而这个过滤器最终是塞到了SCAN对象中进行操作的,相当于select * from emp where 测试数据:员工表 ()列值过滤器 列值过滤器就是某一列的是多少的行 ()列名前缀过滤器 ()多个列名前缀过滤器 ()rowk...

枣泥馅的博客 903

从‘裸纤’到成品:手把手拆解光纤阵列(FA)的装配、点胶与端面研磨全流程

本文详细拆解了光纤阵列(FA)从裸纤到成品的全流程,包括装配、点胶与端面研磨等关键工艺。通过实战经验和数据对比,揭示了5G基站、数据中心等场景中FA的精密制造要点与常见故障解决方案,为光通信器件生产提供专业指导。

weixin_42652674的博客 865

QT使用openssl实现RSA加解密

使用openssl生成公私钥,随后用QT对相应的信息进行RSA加解密

weixin_42098322的博客 3872

HBase 过滤器 Java API

HBase 过滤器 Java API

hujieliang123的博客 2838

[工作流节点10] 获取多条数据并循环执行 —— 明道云批处理自动化实战

本文系统介绍了明道云工作流中"获取多条数据+循环执行"的批处理功能。该功能通过筛选数据集合并逐条处理,适用于批量通知、数据更新等场景。文章详细解析了功能配置方法,包括数据筛选、循环设置和异常处理,并提供了合同到期提醒等典型应用案例。同时强调了数据量控制、分批处理、错误处理等优化策略,帮助用户实现高效批量自动化。这一功能组合能将业务从单条处理升级为批量驱动,显著提升工作效率。

每日出拳老爷子的博客 474

javaapi 访问 hbase

Hbase介绍 HBASE是一个高可靠性、高性能、面向列、可伸缩的分布式存储系统,利用HBASE技术可在廉价PC Server上搭建起大规模结构化存储集群。 HBASE的目标是存储并处理大型的数据,更具体来说是仅需使用普通的硬件配置,就能够处理由成千上万的行和列所组成的大型数据。 HBASE是Google Bigtable的开源实现,但是也有很多不同之处。比如:Google Bigtable利用G...

zhangMY12138的博客 402

基于Simulink的六旋翼无人机动力分配仿真建模示例

六旋翼无人机概述特点:高冗余度、增强的负载能力和更好的故障容忍性。关键组件电机与螺旋桨:提供升力和推力。电调(ESC):控制电机转速。IMU(惯性测量单元):包括加速度计和陀螺仪,用于姿态估计。飞控板:处理传感器数据并生成控制信号。应用场景:航拍摄影、农业监测、物流配送等。仿真目标搭建一个简化的六旋翼无人机动力分配模型,涵盖电机驱动、姿态控制及位置控制过程。分析不同条件下的性能指标(如响应时间、稳定性等),并探讨六旋翼无人机的设计优化。

xiaoheshang_123的博客 494

【深度学习基础】多任务学习(Multi-Task Learning)

多任务学习(Multi-task learning)是和单任务学习(single-task learning)相对的一种机器学习方法。在机器学习领域,标准的算法理论是一次学习一个任务,也就是系统的输出为实数的情况。复杂的学习问题先被分解成理论上独立的子问题,然后分别对每个子问题进行学习,最后通过对子问题学习结果的组合建立复杂问题的数学模型。多任务学习是一种联合学习,多个任务并行学习,结果相互影响。一次只学习一个任务(task),大部分的机器学习任务都属于单任务学习。

十二月的猫 1万+

Hbase Java API 代码开发(CURD,Filter 过滤器)

Hbase Java API 代码开发1、Hbase API 类和数据模型1.1、HBaseAdmin1.2、HBaseConfiguration1.3、HTableDescriptor1.4、HColumnDescriptor1.5、HTable 1、Hbase API 类和数据模型 几个主要 Hbase API 类和数据模型之间的对应关系: java 类 HBase 数据模型 HBaseAdmin 数据库(DataBase) HBaseConfiguration 数据库(DataBa

weixin_44387652的博客 780

XDMA Scatter-Gather(SG)模式

XDMA Scatter-Gather(SG)模式 是 Xilinx FPGA 中用于高效处理 ​非连续内存数据 的 DMA 传输机制,通过 ​描述符链表(Descriptor List)​ 管理多块分散数据,显著减少 CPU 开销并提升吞吐量。

浩瀚之水的专栏 2159

hbase java api 连接_JavaAPI与hbase的交互

1 packagecom.hblink.test;23 importjava.io.IOException;4 importjava.util.Scanner;56 importorg.apache.hadoop.conf.Configuration;7 importorg.apache.hadoop.hbase.client.HTable;8 importorg.apache.hadoop.hb...

weixin_32233079的博客 175

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

HBase的简单学习二

HBase的进阶建表以及API操作

weixin_65909965的博客 1588

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

java hbase zookeeper_IDEA Zookeeper 配置 和HBase 配置 (附JavaAPI)

packagecom.hadoop.hbase;importjava.io.IOException;importjava.util.ArrayList;importjava.util.Iterator;importorg.apache.hadoop.conf.Configuration;importorg.apache.hadoop.hbase.Cell;importorg.apache.hado...

weixin_39726379的博客 244

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

Hbase JavaApi

Hbase JavaApi package cn.itcast.hbase; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import ...

这里将承载一段最初的记忆 237

Java API 连接Hbase数据库并进行操作

Java API 对Hbase数据库进行一系列操作 package z_hbase; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDe

Powehi777的博客 397

hbase

入门HBase 概览 特性 Hbase是一种NoSQL数据库,这意味着它不像传统的RDBMS数据库那样支持SQL作为查询语言。Hbase是一种分布式存储的数据库,技术上来讲,它更像是分布式存储而不是分布式数据库,它缺少很多RDBMS系统的特性,比如列类型,辅助索引,触发器,和高级查询语言等待。 那Hbase有什么特性呢?如下: 强读写一致,但是不是“最终一致性”的数据存储,这使得它非常适合高速的计算聚合 自动分片,通过Region分散在集群中,当行数增长的时候,Region也会自动的切分和再分配 自动的故

iMark 295
上一篇: Hbase单机安装和javaAPI客户端链接测试
下一篇: Phoenix使用指南
牧竹子
博客等级 码龄17年 573粉丝 235原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址