You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "dtspslhh (via GitHub)" <gi...@apache.org> on 2023/05/01 22:39:08 UTC

[GitHub] [gobblin] dtspslhh commented on a diff in pull request #3690: [GOBBLIN-1828] Implement Timeout for Creating Writer Functionality

dtspslhh commented on code in PR #3690:
URL: https://github.com/apache/gobblin/pull/3690#discussion_r1181943474


##########
gobblin-core/src/main/java/org/apache/gobblin/writer/PartitionedDataWriter.java:
##########
@@ -170,9 +175,12 @@ public DataWriter<D> get() {
                     try {
                       log.info(String.format("Adding one more writer to loading cache of existing writer "
                           + "with size = %d", partitionWriters.size()));
-                      return createPartitionWriter(key);
-                    } catch (IOException e) {
+                      Future<DataWriter<D>> future = createWriterPool.submit(() -> createPartitionWriter(key));
+                      return future.get(writeTimeoutInterval, TimeUnit.SECONDS);

Review Comment:
   The builder shares the timeout interval with writeTimeoutInterval. I saw you made a couple commit tuning the default writeTimeoutInterval. Will that be a concern if we explicitly set it?



-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org