You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by lz...@apache.org on 2022/03/31 02:08:03 UTC

[flink-table-store] branch master updated: [hotfix] Add thread name to StoreSinkWriter compaction thread pool

This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-table-store.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b936a1  [hotfix] Add thread name to StoreSinkWriter compaction thread pool
9b936a1 is described below

commit 9b936a11d4ba3a9bf8d9cb604786b34f1abc6dac
Author: JingsongLi <lz...@aliyun.com>
AuthorDate: Thu Mar 31 10:07:52 2022 +0800

    [hotfix] Add thread name to StoreSinkWriter compaction thread pool
---
 .../org/apache/flink/table/store/connector/sink/StoreSinkWriter.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/flink-table-store-connector/src/main/java/org/apache/flink/table/store/connector/sink/StoreSinkWriter.java b/flink-table-store-connector/src/main/java/org/apache/flink/table/store/connector/sink/StoreSinkWriter.java
index 6a568a6..2995b74 100644
--- a/flink-table-store-connector/src/main/java/org/apache/flink/table/store/connector/sink/StoreSinkWriter.java
+++ b/flink-table-store-connector/src/main/java/org/apache/flink/table/store/connector/sink/StoreSinkWriter.java
@@ -31,6 +31,7 @@ import org.apache.flink.table.store.file.utils.RecordWriter;
 import org.apache.flink.table.store.log.LogWriteCallback;
 import org.apache.flink.table.store.sink.SinkRecord;
 import org.apache.flink.table.store.sink.SinkRecordConverter;
+import org.apache.flink.util.concurrent.ExecutorThreadFactory;
 
 import javax.annotation.Nullable;
 
@@ -76,7 +77,9 @@ public class StoreSinkWriter<WriterStateT>
         this.overwrite = overwrite;
         this.logWriter = logWriter;
         this.logCallback = logCallback;
-        this.compactExecutor = Executors.newSingleThreadScheduledExecutor();
+        this.compactExecutor =
+                Executors.newSingleThreadScheduledExecutor(
+                        new ExecutorThreadFactory("compaction-thread"));
         this.writers = new HashMap<>();
     }