You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2023/03/01 09:03:53 UTC
[pulsar] branch branch-2.11 updated: [fix][ci] Fix broken CI (#19632)
This is an automated email from the ASF dual-hosted git repository.
technoboy pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.11 by this push:
new db193603227 [fix][ci] Fix broken CI (#19632)
db193603227 is described below
commit db1936032275dac53ddb27042aea8c83e4968675
Author: Zixuan Liu <no...@gmail.com>
AuthorDate: Wed Mar 1 17:03:46 2023 +0800
[fix][ci] Fix broken CI (#19632)
---
.../pulsar/broker/service/BrokerService.java | 26 +++++++++++++---------
pulsar-sql/presto-distribution/LICENSE | 4 ++--
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
index 2262f3381e5..82e7981e86a 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
@@ -956,13 +956,18 @@ public class BrokerService implements Closeable {
public CompletableFuture<Optional<Topic>> getTopic(final String topic, boolean createIfMissing,
Map<String, String> properties) {
+ return getTopic(TopicName.get(topic), createIfMissing, properties);
+ }
+
+ public CompletableFuture<Optional<Topic>> getTopic(final TopicName topicName, boolean createIfMissing,
+ Map<String, String> properties) {
try {
- CompletableFuture<Optional<Topic>> topicFuture = topics.get(topic);
+ CompletableFuture<Optional<Topic>> topicFuture = topics.get(topicName.toString());
if (topicFuture != null) {
if (topicFuture.isCompletedExceptionally()
|| (topicFuture.isDone() && !topicFuture.getNow(Optional.empty()).isPresent())) {
// Exceptional topics should be recreated.
- topics.remove(topic, topicFuture);
+ topics.remove(topicName.toString(), topicFuture);
} else {
// a non-existing topic in the cache shouldn't prevent creating a topic
if (createIfMissing) {
@@ -972,7 +977,7 @@ public class BrokerService implements Closeable {
return topicFuture.thenCompose(value -> {
if (!value.isPresent()) {
// retry and create topic
- return getTopic(topic, createIfMissing, properties);
+ return getTopic(topicName, createIfMissing, properties);
} else {
// in-progress future completed successfully
return CompletableFuture.completedFuture(value);
@@ -984,14 +989,13 @@ public class BrokerService implements Closeable {
}
}
}
- final boolean isPersistentTopic = TopicName.get(topic).getDomain().equals(TopicDomain.persistent);
+ final boolean isPersistentTopic = topicName.getDomain().equals(TopicDomain.persistent);
if (isPersistentTopic) {
- return topics.computeIfAbsent(topic, (topicName) -> {
- return this.loadOrCreatePersistentTopic(topicName, createIfMissing, properties);
+ return topics.computeIfAbsent(topicName.toString(), (k) -> {
+ return this.loadOrCreatePersistentTopic(k, createIfMissing, properties);
});
} else {
- return topics.computeIfAbsent(topic, (name) -> {
- final TopicName topicName = TopicName.get(name);
+ return topics.computeIfAbsent(topicName.toString(), (name) -> {
if (topicName.isPartitioned()) {
final TopicName partitionedTopicName = TopicName.get(topicName.getPartitionedTopicName());
return this.fetchPartitionedTopicMetadataAsync(partitionedTopicName).thenCompose((metadata) -> {
@@ -1008,14 +1012,14 @@ public class BrokerService implements Closeable {
});
}
} catch (IllegalArgumentException e) {
- log.warn("[{}] Illegalargument exception when loading topic", topic, e);
+ log.warn("[{}] Illegalargument exception when loading topic", topicName, e);
return FutureUtil.failedFuture(e);
} catch (RuntimeException e) {
Throwable cause = e.getCause();
if (cause instanceof ServiceUnitNotReadyException) {
- log.warn("[{}] Service unit is not ready when loading the topic", topic);
+ log.warn("[{}] Service unit is not ready when loading the topic", topicName);
} else {
- log.warn("[{}] Unexpected exception when loading topic: {}", topic, e.getMessage(), e);
+ log.warn("[{}] Unexpected exception when loading topic: {}", topicName, e.getMessage(), e);
}
return FutureUtil.failedFuture(cause);
diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE
index bc289caa439..4f6fe9129ac 100644
--- a/pulsar-sql/presto-distribution/LICENSE
+++ b/pulsar-sql/presto-distribution/LICENSE
@@ -340,8 +340,8 @@ The Apache Software License, Version 2.0
* Jmxutils
- jmxutils-1.21.jar
* LevelDB
- - leveldb-0.12.jar
- - leveldb-api-0.12.jar
+ - leveldb-0.10.jar
+ - leveldb-api-0.10.jar
* Log4j
- log4j-api-2.18.0.jar
- log4j-core-2.18.0.jar