Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
pulsar
提交
0093a802
pulsar
项目概览
apache
/
pulsar
通知
129
Star
40
Fork
3
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
pulsar
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
0093a802
编写于
5月 09, 2018
作者:
J
Jai Asher
提交者:
GitHub
5月 09, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed backporting errors and lombok license (#1752)
上级
741174e6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
37 addition
and
5 deletion
+37
-5
all/licenses/LICENSE-Lombok.txt
all/licenses/LICENSE-Lombok.txt
+19
-0
all/src/assemble/LICENSE.bin.txt
all/src/assemble/LICENSE.bin.txt
+1
-0
pom.xml
pom.xml
+7
-0
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java
.../org/apache/pulsar/broker/namespace/NamespaceService.java
+9
-4
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest.java
...est/java/org/apache/pulsar/broker/admin/AdminApiTest.java
+1
-1
未找到文件。
all/licenses/LICENSE-Lombok.txt
0 → 100644
浏览文件 @
0093a802
Copyright (C) 2009-2015 The Project Lombok Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
all/src/assemble/LICENSE.bin.txt
浏览文件 @
0093a802
...
...
@@ -348,6 +348,7 @@ BSD License
MIT License
* Java SemVer -- com.github.zafarkhaja-java-semver-*.jar -- licenses/LICENSE-SemVer.txt
* SLF4J -- org.slf4j.*.jar -- licenses/LICENSE-SLF4J.txt
* Lombok -- org.projectlombok-*.jar -- licenses/LICENSE-Lombok.txt
Protocol Buffers License
* Protocol Buffers -- com.google.protobuf-*.jar -- licenses/LICENSE-protobuf.txt
...
...
pom.xml
浏览文件 @
0093a802
...
...
@@ -592,6 +592,13 @@ flexible messaging model and an intuitive client API.</description>
<artifactId>
powermock-module-testng
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.16.20
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
<build>
...
...
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java
浏览文件 @
0093a802
...
...
@@ -42,6 +42,7 @@ import java.util.regex.Matcher;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
import
org.apache.bookkeeper.util.SafeRunnable
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.tuple.Pair
;
import
org.apache.pulsar.broker.PulsarServerException
;
...
...
@@ -632,12 +633,16 @@ public class NamespaceService {
// If success updateNamespaceBundles, then do invalidateBundleCache and unload.
// Else retry splitAndOwnBundleOnceAndRetry.
updateFuture
.
whenComplete
Async
((
r
,
t
)->
{
updateFuture
.
whenComplete
((
r
,
t
)->
{
if
(
t
!=
null
)
{
// retry several times on BadVersion
if
((
t
instanceof
ServerMetadataException
)
&&
(
counter
.
decrementAndGet
()
>=
0
))
{
pulsar
.
getOrderedExecutor
().
submit
(
()
->
splitAndOwnBundleOnceAndRetry
(
bundle
,
unload
,
counter
,
unloadFuture
));
pulsar
.
getOrderedExecutor
().
submit
(
new
SafeRunnable
()
{
@Override
public
void
safeRun
()
{
splitAndOwnBundleOnceAndRetry
(
bundle
,
unload
,
counter
,
unloadFuture
);
}
});
}
else
{
// Retry enough, or meet other exception
String
msg2
=
format
(
" %s not success update nsBundles, counter %d, reason %s"
,
...
...
@@ -678,7 +683,7 @@ public class NamespaceService {
unloadFuture
.
completeExceptionally
(
new
ServiceUnitNotReadyException
(
msg1
));
}
return
;
}
,
pulsar
.
getOrderedExecutor
()
);
});
}
/**
...
...
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest.java
浏览文件 @
0093a802
...
...
@@ -924,7 +924,7 @@ public class AdminApiTest extends MockedPulsarServiceBaseTest {
// Force to create a topic
final
String
namespace
=
"prop-xyz/use/ns1"
;
final
String
topicName
=
(
new
StringBuilder
(
"persistent://"
)).
append
(
namespace
).
append
(
"/ds2"
).
toString
();
Producer
<
byte
[]>
producer
=
pulsarClient
.
newProducer
().
topic
(
topicName
).
create
(
);
Producer
producer
=
pulsarClient
.
createProducer
(
topicName
);
producer
.
send
(
"message"
.
getBytes
());
publishMessagesOnPersistentTopic
(
topicName
,
0
);
assertEquals
(
admin
.
persistentTopics
().
getList
(
namespace
),
Lists
.
newArrayList
(
topicName
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录