[
https://issues.apache.org/jira/browse/BEAM-10283?focusedWorklogId=455211&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-455211
]
ASF GitHub Bot logged work on BEAM-10283:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Jul/20 03:24
Start Date: 07/Jul/20 03:24
Worklog Time Spent: 10m
Work Description: rafi-kamal commented on a change in pull request #12089:
URL: https://github.com/apache/beam/pull/12089#discussion_r450590468
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIO.java
##########
@@ -410,13 +417,22 @@ public Read withKeyRange(ByteKeyRange keyRange) {
*
* <p>Does not modify this object.
*/
- public Read withKeyRanges(List<ByteKeyRange> keyRanges) {
+ public Read withKeyRanges(ValueProvider<List<ByteKeyRange>> keyRanges) {
checkArgument(keyRanges != null, "keyRanges can not be null");
- checkArgument(!keyRanges.isEmpty(), "keyRanges can not be empty");
- for (ByteKeyRange range : keyRanges) {
- checkArgument(range != null, "keyRanges cannot hold null range");
- }
- return toBuilder().setKeyRanges(keyRanges).build();
+ BigtableReadOptions bigtableReadOptions = getBigtableReadOptions();
+ return toBuilder()
+
.setBigtableReadOptions(bigtableReadOptions.toBuilder().setKeyRanges(keyRanges).build())
+ .build();
+ }
+
+ /**
+ * Returns a new {@link BigtableIO.Read} that will read only rows in the
specified ranges.
+ * Ranges must not overlap.
Review comment:
Agreed - personally I would prefer option 2. I think it's out of scope
for this PR, though, but I'll be happy to do it as a follow-up. Do you know if
there is already a JIRA issue for this?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 455211)
Time Spent: 1h 10m (was: 1h)
> BigtableIO doesn't support ValueProvider in withKeyRange and withRowFilter
> methods
> ----------------------------------------------------------------------------------
>
> Key: BEAM-10283
> URL: https://issues.apache.org/jira/browse/BEAM-10283
> Project: Beam
> Issue Type: Wish
> Components: io-java-gcp
> Reporter: Rafi Kamal
> Assignee: Rafi Kamal
> Priority: P2
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> BigtableIO supports specifying a ValueProvider to set the project ID,
> instance ID, and table. Unfortunatley, it doesn't support ValueProvider if we
> want to set the key range or row filter. This makes it unusable in
> parameterized dataflow templates.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)