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 2022/02/25 03:40:32 UTC
[GitHub] [pulsar] Technoboy- commented on a change in pull request #14379: [Pulsar SQL] Fix PulsarRecordCursor deserialize issue.
Technoboy- commented on a change in pull request #14379:
URL: https://github.com/apache/pulsar/pull/14379#discussion_r814452097
##########
File path: pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarRecordCursor.java
##########
@@ -235,113 +237,117 @@ public void setPulsarSqlSchemaInfoProvider(PulsarSqlSchemaInfoProvider schemaInf
}
@VisibleForTesting
- class DeserializeEntries implements Runnable {
+ class DeserializeEntries extends Thread {
protected boolean isRunning = false;
- private final Thread thread;
+ private final CompletableFuture<Void> closeHandle;
public DeserializeEntries() {
- this.thread = new Thread(this, "derserialize-thread-split-" + pulsarSplit.getSplitId());
+ super("deserialize-thread-split-" + pulsarSplit.getSplitId());
+ this.closeHandle = new CompletableFuture<>();
}
- public void interrupt() {
+ public CompletableFuture<Void> close() {
isRunning = false;
- thread.interrupt();
- }
-
- public void start() {
- this.thread.start();
+ super.interrupt();
Review comment:
Yes, right. fixed.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org