hbase中默认的Get()构造函数的重要性是什么
What is the importance of default Get() constructor in hbase
hbase 中默认的 Get() 构造函数的重要性是什么?是return中的所有行table吗?我正在尝试使用它,但它需要很长时间。
Configuration conf = HBaseConfiguration.create();
HTable table0 = new HTable(conf, "test");
Get get0 = new Get();
Result result0 = table0.get(get0);
byte[] val0 = result0.getValue(Bytes.toBytes("cf1"), Bytes.toBytes("e1"));
System.out.println("Value: " + Bytes.toString(val0));
这不重要,你不应该使用它。如果您阅读文档,您会发现您不应该使用它。它说。
Constructor for Writable. DO NOT USE
我相信您使用的是旧客户端,因为此构造函数已不存在。您应该始终在构造函数中指定要获取的行或提供另一个要复制的行。
你想达到什么目的?全面 table 扫描?那么这就是你如何做的。
Scan scan = new Scan();
ResultScanner results = table.getScaner(scan);
...
hbase 中默认的 Get() 构造函数的重要性是什么?是return中的所有行table吗?我正在尝试使用它,但它需要很长时间。
Configuration conf = HBaseConfiguration.create();
HTable table0 = new HTable(conf, "test");
Get get0 = new Get();
Result result0 = table0.get(get0);
byte[] val0 = result0.getValue(Bytes.toBytes("cf1"), Bytes.toBytes("e1"));
System.out.println("Value: " + Bytes.toString(val0));
这不重要,你不应该使用它。如果您阅读文档,您会发现您不应该使用它。它说。
Constructor for Writable. DO NOT USE
我相信您使用的是旧客户端,因为此构造函数已不存在。您应该始终在构造函数中指定要获取的行或提供另一个要复制的行。
你想达到什么目的?全面 table 扫描?那么这就是你如何做的。
Scan scan = new Scan();
ResultScanner results = table.getScaner(scan);
...