BigTable Scan withStopRow包含问题

时间:2018-06-13 16:50:22

标签: bigtable google-cloud-bigtable

也许我弄错了,但似乎扫描方法上的“包含”布尔值无法正常工作。下面,我希望扫描包含“row3”,因为我有withStopRow(“row3”.getBytes(),true)),但是,我只扫描到row2。

Output Received:   
Row: row1
Row: row2
下面的pom ......

<dependency>
    <groupId>com.google.cloud.bigtable</groupId>
    <artifactId>bigtable-hbase-1.x-hadoop</artifactId>
    <version>1.4.0</version>
</dependency>

Java代码:     表table = conn.getTable(TABLE_NAME);

table.put(new Put("row1".getBytes()).addColumn("fam".getBytes(), "qual".getBytes(), "val".getBytes()));
table.put(new Put("row2".getBytes()).addColumn("fam".getBytes(), "qual".getBytes(), "val".getBytes()));
table.put(new Put("row3".getBytes()).addColumn("fam".getBytes(), "qual".getBytes(), "val".getBytes()));

for (Result r : table.getScanner(new Scan().withStartRow("row1".getBytes()).withStopRow("row3".getBytes(), true))) {
        System.out.println(("Row: " + new String(r.getRow())));
    }

1 个答案:

答案 0 :(得分:1)

Bug承认,ref评论如上。在GitHub中创建的问题

https://github.com/GoogleCloudPlatform/cloud-bigtable-client/issues/1850