BigTable Scan withStopRow 包含问题
Posted
技术标签:
【中文标题】BigTable Scan withStopRow 包含问题【英文标题】:BigTable Scan withStopRow inclusive issue 【发布时间】:2018-06-13 16:50:22 【问题描述】:也许我弄错了,但似乎扫描方法上的“包容性”布尔值不起作用。下面,我希望扫描包括“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())));
【问题讨论】:
你能在github.com/GoogleCloudPlatform/cloud-bigtable-client/issues上提出一个错误吗?我们可以解决这个问题并发布一个 1.4.1 进行此更改 刚刚创建了一个问题。谢谢。 【参考方案1】:已确认错误,请参阅上面的评论。在 GitHub 中创建的问题
https://github.com/GoogleCloudPlatform/cloud-bigtable-client/issues/1850
【讨论】:
以上是关于BigTable Scan withStopRow 包含问题的主要内容,如果未能解决你的问题,请参考以下文章
BigTable 设计 - BigTable 单元格大小的上限
如何将数据从一个 BigTable 表复制到另一个 BigTable 表
BigTable Design - BigTable单元格大小的上限