mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-24 16:04:00 +08:00
fix check style (#3703)
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
+17
@@ -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;
|
||||
|
||||
+17
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user