[ 
https://issues.apache.org/jira/browse/BEAM-7450?focusedWorklogId=260505&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-260505
 ]

ASF GitHub Bot logged work on BEAM-7450:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Jun/19 15:18
            Start Date: 14/Jun/19 15:18
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on pull request #8718: [BEAM-7450] 
Support unbounded reads with HCatalogIO
URL: https://github.com/apache/beam/pull/8718#discussion_r293853356
 
 

 ##########
 File path: 
sdks/java/io/hcatalog/src/main/java/org/apache/beam/sdk/io/hcatalog/HCatalogIO.java
 ##########
 @@ -196,11 +237,27 @@ Read withContext(ReaderContext context) {
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public PCollection<HCatRecord> expand(PBegin input) {
       checkArgument(getTable() != null, "withTable() is required");
       checkArgument(getConfigProperties() != null, "withConfigProperties() is 
required");
-
-      return input.apply(org.apache.beam.sdk.io.Read.from(new 
BoundedHCatalogSource(this)));
+      Watch.Growth<Read, Integer, Integer> growthFn;
+      if (getPollingInterval() != null) {
+        growthFn = Watch.growthOf(new 
PartitionPollerFn()).withPollInterval(getPollingInterval());
+        if (getTerminationCondition() != null) {
+          growthFn =
 
 Review comment:
   Sorry I was maybe not clear, I am talking about not repeating agan the code 
`Watch.growthOf(new 
PartitionPollerFn()).withPollInterval(getPollingInterval())` because that's 
already done just before in the definition of `growthFn`. We can just do: 
`growthFn = growthFn.withTerminationPerInput(getTerminationCondition());`.
   
   It is pretty minor but nice to fix.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 260505)
    Time Spent: 9h 40m  (was: 9.5h)

> Unbounded HCatalogIO Reader using splittable pardos
> ---------------------------------------------------
>
>                 Key: BEAM-7450
>                 URL: https://issues.apache.org/jira/browse/BEAM-7450
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-core
>            Reporter: Ankit Jhalaria
>            Assignee: Ankit Jhalaria
>            Priority: Minor
>             Fix For: 2.14.0
>
>          Time Spent: 9h 40m
>  Remaining Estimate: 0h
>
> # Current version of HcatalogIO is a bounded source.
>  # While migrating our jobs to aws, we realized that it would be helpful to 
> have an unbounded hcat reader that can behave as an unbounded source and 
> polls for new partitions as and when they become available.
>  # I have used splittable pardo(s) to do this. There is a flag that can be 
> set to treat this as a bounded source which will terminate if that flag is 
> set.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to