You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/11/18 19:34:08 UTC

[GitHub] [pulsar] jerrypeng commented on a change in pull request #8608: Improve naming of threads used in batch source

jerrypeng commented on a change in pull request #8608:
URL: https://github.com/apache/pulsar/pull/8608#discussion_r526365152



##########
File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/batch/BatchSourceExecutor.java
##########
@@ -69,14 +69,19 @@
   private String intermediateTopicName;
   private volatile Exception currentError = null;
   private volatile boolean isRunning = false;
-  private ExecutorService discoveryThread = Executors.newSingleThreadExecutor(new DefaultThreadFactory("batch-source-discovery"));
+  private ExecutorService discoveryThread;
 
   @Override
   public void open(Map<String, Object> config, SourceContext sourceContext) throws Exception {
     this.config = config;
     this.sourceContext = sourceContext;
     this.intermediateTopicName = SourceConfigUtils.computeBatchSourceIntermediateTopicName(sourceContext.getTenant(),
       sourceContext.getNamespace(), sourceContext.getSourceName()).toString();
+    this.discoveryThread = Executors.newSingleThreadExecutor(
+      new DefaultThreadFactory(
+        String.format("%s-batch-source-discovery",
+          FunctionCommon.getFullyQualifiedName(
+            sourceContext.getTenant(), sourceContext.getNamespace(), sourceContext.getSourceName()))));

Review comment:
       @merlimat that is what we are doing today:
   
   https://github.com/apache/pulsar/blob/master/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/batch/BatchSourceExecutor.java#L223




----------------------------------------------------------------
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:
users@infra.apache.org