This is an automated email from the ASF dual-hosted git repository.
duhengforever pushed a commit to branch 5.0.0-alpha
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/5.0.0-alpha by this push:
new 48a2beb fix check style (#3703)
48a2beb is described below
commit 48a2bebb6b4b2794f236733bad6bbace0fffc81b
Author: cserwen <[email protected]>
AuthorDate: Wed Jan 5 20:52:49 2022 +0800
fix check style (#3703)
---
.../rocketmq/broker/topic/TopicConfigManagerTest.java | 2 +-
.../apache/rocketmq/client/impl/MQClientAPIImpl.java | 1 -
.../org/apache/rocketmq/common/TopicAttributes.java | 4 ++--
.../common/statictopic/TopicQueueMappingTest.java | 17 +++++++++++++++++
.../common/statictopic/TopicQueueMappingUtilsTest.java | 17 +++++++++++++++++
.../org/apache/rocketmq/store/PutMessageContext.java | 16 ++++++++++++++++
.../java/org/apache/rocketmq/store/TopicQueueLock.java | 16 ++++++++++++++++
.../org/apache/rocketmq/store/util/QueueTypeUtils.java | 6 +++---
.../apache/rocketmq/store/queue/ConsumeQueueTest.java | 16 ++++++++++++++++
.../org/apache/rocketmq/store/queue/QueueTestBase.java | 16 ++++++++++++++++
.../apache/rocketmq/test/statictopic/StaticTopicIT.java | 17 +++++++++++++++++
11 files changed, 121 insertions(+), 7 deletions(-)
diff --git
a/broker/src/test/java/org/apache/rocketmq/broker/topic/TopicConfigManagerTest.java
b/broker/src/test/java/org/apache/rocketmq/broker/topic/TopicConfigManagerTest.java
index 9853c36..79cc01a 100644
---
a/broker/src/test/java/org/apache/rocketmq/broker/topic/TopicConfigManagerTest.java
+++
b/broker/src/test/java/org/apache/rocketmq/broker/topic/TopicConfigManagerTest.java
@@ -123,7 +123,7 @@ public class TopicConfigManagerTest {
@Test
public void testAddWrongValueOnCreating() {
Map<String, String> attributes = new HashMap<>();
- attributes.put("+" + TopicAttributes.queueType.getName(),
"wrong-value");
+ attributes.put("+" + TopicAttributes.QUEUE_TYPE.getName(),
"wrong-value");
TopicConfig topicConfig = new TopicConfig();
topicConfig.setTopicName("new-topic");
diff --git
a/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
b/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
index cd0d05b..066ffd5 100644
--- a/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
+++ b/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
@@ -56,7 +56,6 @@ import org.apache.rocketmq.common.DataVersion;
import org.apache.rocketmq.common.MQVersion;
import org.apache.rocketmq.common.MixAll;
import org.apache.rocketmq.common.PlainAccessConfig;
-import org.apache.rocketmq.common.TopicAttributes;
import org.apache.rocketmq.common.TopicConfig;
import org.apache.rocketmq.common.UtilAll;
import org.apache.rocketmq.common.admin.ConsumeStats;
diff --git
a/common/src/main/java/org/apache/rocketmq/common/TopicAttributes.java
b/common/src/main/java/org/apache/rocketmq/common/TopicAttributes.java
index 9c1e96f..7bed217 100644
--- a/common/src/main/java/org/apache/rocketmq/common/TopicAttributes.java
+++ b/common/src/main/java/org/apache/rocketmq/common/TopicAttributes.java
@@ -25,7 +25,7 @@ import java.util.Map;
import static com.google.common.collect.Sets.newHashSet;
public class TopicAttributes {
- public static final EnumAttribute queueType = new EnumAttribute(
+ public static final EnumAttribute QUEUE_TYPE = new EnumAttribute(
"queue.type",
false,
newHashSet("BatchCQ", "SimpleCQ"),
@@ -35,6 +35,6 @@ public class TopicAttributes {
static {
ALL = new HashMap<>();
- ALL.put(queueType.getName(), queueType);
+ ALL.put(QUEUE_TYPE.getName(), QUEUE_TYPE);
}
}
diff --git
a/common/src/test/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingTest.java
b/common/src/test/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingTest.java
index f1a2b21..4e93275 100644
---
a/common/src/test/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingTest.java
+++
b/common/src/test/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingTest.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.apache.rocketmq.common.statictopic;
import com.alibaba.fastjson.JSON;
diff --git
a/common/src/test/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingUtilsTest.java
b/common/src/test/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingUtilsTest.java
index f5cd0ef..c9bd22e 100644
---
a/common/src/test/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingUtilsTest.java
+++
b/common/src/test/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingUtilsTest.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.apache.rocketmq.common.statictopic;
import org.apache.rocketmq.common.TopicConfig;
diff --git
a/store/src/main/java/org/apache/rocketmq/store/PutMessageContext.java
b/store/src/main/java/org/apache/rocketmq/store/PutMessageContext.java
index c3dd89b..d4c160d 100644
--- a/store/src/main/java/org/apache/rocketmq/store/PutMessageContext.java
+++ b/store/src/main/java/org/apache/rocketmq/store/PutMessageContext.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.rocketmq.store;
public class PutMessageContext {
diff --git a/store/src/main/java/org/apache/rocketmq/store/TopicQueueLock.java
b/store/src/main/java/org/apache/rocketmq/store/TopicQueueLock.java
index 0338cf7..97c50b9 100644
--- a/store/src/main/java/org/apache/rocketmq/store/TopicQueueLock.java
+++ b/store/src/main/java/org/apache/rocketmq/store/TopicQueueLock.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.rocketmq.store;
import java.util.ArrayList;
diff --git
a/store/src/main/java/org/apache/rocketmq/store/util/QueueTypeUtils.java
b/store/src/main/java/org/apache/rocketmq/store/util/QueueTypeUtils.java
index 612bf7e..1067337 100644
--- a/store/src/main/java/org/apache/rocketmq/store/util/QueueTypeUtils.java
+++ b/store/src/main/java/org/apache/rocketmq/store/util/QueueTypeUtils.java
@@ -39,17 +39,17 @@ public class QueueTypeUtils {
}
public static CQType getCQType(TopicConfig topicConfig) {
- String attributeName = TopicAttributes.queueType.getName();
+ String attributeName = TopicAttributes.QUEUE_TYPE.getName();
Map<String, String> attributes = topicConfig.getAttributes();
if (attributes == null || attributes.size() == 0) {
- return CQType.valueOf(TopicAttributes.queueType.getDefaultValue());
+ return
CQType.valueOf(TopicAttributes.QUEUE_TYPE.getDefaultValue());
}
if (attributes.containsKey(attributeName)) {
return CQType.valueOf(attributes.get(attributeName));
} else {
- return CQType.valueOf(TopicAttributes.queueType.getDefaultValue());
+ return
CQType.valueOf(TopicAttributes.QUEUE_TYPE.getDefaultValue());
}
}
}
diff --git
a/store/src/test/java/org/apache/rocketmq/store/queue/ConsumeQueueTest.java
b/store/src/test/java/org/apache/rocketmq/store/queue/ConsumeQueueTest.java
index 9f906d9..4345f0e 100644
--- a/store/src/test/java/org/apache/rocketmq/store/queue/ConsumeQueueTest.java
+++ b/store/src/test/java/org/apache/rocketmq/store/queue/ConsumeQueueTest.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.rocketmq.store.queue;
import org.apache.rocketmq.store.ConsumeQueueExt;
diff --git
a/store/src/test/java/org/apache/rocketmq/store/queue/QueueTestBase.java
b/store/src/test/java/org/apache/rocketmq/store/queue/QueueTestBase.java
index 6df5549..a8e9f94 100644
--- a/store/src/test/java/org/apache/rocketmq/store/queue/QueueTestBase.java
+++ b/store/src/test/java/org/apache/rocketmq/store/queue/QueueTestBase.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.rocketmq.store.queue;
import org.apache.rocketmq.common.BrokerConfig;
diff --git
a/test/src/test/java/org/apache/rocketmq/test/statictopic/StaticTopicIT.java
b/test/src/test/java/org/apache/rocketmq/test/statictopic/StaticTopicIT.java
index 5b3e5fe..5368cdf 100644
--- a/test/src/test/java/org/apache/rocketmq/test/statictopic/StaticTopicIT.java
+++ b/test/src/test/java/org/apache/rocketmq/test/statictopic/StaticTopicIT.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.apache.rocketmq.test.statictopic;
import com.google.common.collect.ImmutableList;