1
votes

Maybe I am mistaken, but it seems that the "inclusive" boolean on the scan method is not working. Below, I would expect the scan to include "row3" because I have withStopRow("row3".getBytes(), true)), however, I only scan into row2.

Output Received:   
Row: row1
Row: row2

pom below...

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

Java Code: Table 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
Can you please raise a bug on github.com/GoogleCloudPlatform/cloud-bigtable-client/issues? We can fix this problem and release a 1.4.1 with this change - Solomon Duskis
Just created an issue. Thanks. - Paul Mazzuca

1 Answers

1
votes