fix all OperatorWrap style error. The OperatorWrap style mandates that operator symbols should begin each new line, hence the need for adjusting the formatting.

pull/1224/head
DDDreame 2 years ago
parent d61260419d
commit 3e2aecf1aa

@ -151,8 +151,8 @@ public class KafkaThreadPoolAdapter implements ThreadPoolAdapter, ApplicationLis
ContainerProperties containerProperties = concurrentContainer.getContainerProperties();
TopicPartitionOffset[] topicPartitions = containerProperties.getTopicPartitions();
if (topicPartitions != null && concurrency > topicPartitions.length) {
log.warn("[{}] Kafka consuming thread pool not support modify. " +
"When specific partitions are provided, the concurrency must be less than or "
log.warn("[{}] Kafka consuming thread pool not support modify. "
+ "When specific partitions are provided, the concurrency must be less than or "
+ "equal to the number of partitions;", threadPoolKey);
return false;
}

@ -370,6 +370,7 @@ public class Config {
}
public static class Apollo {
public static class App {
public static String ID;

@ -44,9 +44,9 @@ public abstract class AgentConfigChangeWatcher {
@Override
public String toString() {
return "AgentConfigChangeWatcher{" +
"propertyKey='" + propertyKey + '\'' +
'}';
return "AgentConfigChangeWatcher{"
+ "propertyKey='" + propertyKey + '\''
+ '}';
}
@Getter

@ -33,8 +33,8 @@ public class ReflectUtil {
Field[] fields = clazz.getFields();
List<Field> result = new ArrayList<>();
for (Field field : fields) {
if (field.getType().isAssignableFrom(declaredType) &&
Modifier.isStatic(field.getModifiers())) {
if (field.getType().isAssignableFrom(declaredType)
&& Modifier.isStatic(field.getModifiers())) {
result.add(field);
}
}

@ -24,7 +24,6 @@ import java.util.List;
public class ApolloSpringBootProperties {
public static class Spring {
public static class Dynamic {

@ -50,8 +50,8 @@ public class ExtensionRegisterBootstrap implements ApplicationContextAware, Appl
}
private boolean filterClass(String beanName, Object bean) {
return bean.getClass().isAssignableFrom(IExtension.class) ||
ScopedProxyUtils.isScopedTarget(beanName) ||
!(bean instanceof IExtension);
return bean.getClass().isAssignableFrom(IExtension.class)
|| ScopedProxyUtils.isScopedTarget(beanName)
|| !(bean instanceof IExtension);
}
}

@ -74,17 +74,17 @@ public class IdUtil {
long mostSigBits = uuid.getMostSignificantBits();
long leastSigBits = uuid.getLeastSignificantBits();
if (isSimple) {
return (digits(mostSigBits >> 32, 8) +
digits(mostSigBits >> 16, 4) +
digits(mostSigBits, 4) +
digits(leastSigBits >> 48, 4) +
digits(leastSigBits, 12));
return (digits(mostSigBits >> 32, 8)
+ digits(mostSigBits >> 16, 4)
+ digits(mostSigBits, 4)
+ digits(leastSigBits >> 48, 4)
+ digits(leastSigBits, 12));
} else {
return (digits(mostSigBits >> 32, 8) + "-" +
digits(mostSigBits >> 16, 4) + "-" +
digits(mostSigBits, 4) + "-" +
digits(leastSigBits >> 48, 4) + "-" +
digits(leastSigBits, 12));
return (digits(mostSigBits >> 32, 8) + "-"
+ digits(mostSigBits >> 16, 4) + "-"
+ digits(mostSigBits, 4) + "-"
+ digits(leastSigBits >> 48, 4) + "-"
+ digits(leastSigBits, 12));
}
}

@ -299,8 +299,8 @@ public class ReflectUtil {
public static Field findField(Object obj, String filedName, String fieldType) {
Field[] fields = ReflectUtil.getFields(obj.getClass());
for (Field field : fields) {
if (field.getName().contains(filedName) &&
(field.getType().getName().contains(fieldType))) {
if (field.getName().contains(filedName)
&& (field.getType().getName().contains(fieldType))) {
return field;
}
}

@ -161,14 +161,14 @@ public abstract class AbstractDynamicExecutorSupport extends ThreadPoolExecutor
try {
if (!executor.awaitTermination(this.awaitTerminationMillis, TimeUnit.MILLISECONDS)) {
if (log.isWarnEnabled()) {
log.warn("Timed out while waiting for executor" +
(this.threadPoolId != null ? " '" + this.threadPoolId + "'" : "") + " to terminate.");
log.warn("Timed out while waiting for executor"
+ (this.threadPoolId != null ? " '" + this.threadPoolId + "'" : "") + " to terminate.");
}
}
} catch (InterruptedException ex) {
if (log.isWarnEnabled()) {
log.warn("Interrupted while waiting for executor" +
(this.threadPoolId != null ? " '" + this.threadPoolId + "'" : "") + " to terminate.");
log.warn("Interrupted while waiting for executor"
+ (this.threadPoolId != null ? " '" + this.threadPoolId + "'" : "") + " to terminate.");
}
Thread.currentThread().interrupt();
}

@ -58,12 +58,12 @@ public class DynamicThreadPoolBannerHandler implements InitializingBean {
* Print banner.
*/
private void printBanner() {
String banner = " __ __ ___ ___ __ \n" +
" | |--.|__|.-----..-----..-----.| | | |__|\n" +
" | || || _ || _ || _ || | | | |\n" +
" |__|__||__|| __|| __||_____||____ | | |\n" +
" |__| |__| |: ||___|\n" +
" `---' \n";
String banner = " __ __ ___ ___ __ \n"
+ " | |--.|__|.-----..-----..-----.| | | |__|\n"
+ " | || || _ || _ || _ || | | | |\n"
+ " |__|__||__|| __|| __||_____||____ | | |\n"
+ " |__| |__| |: ||___|\n"
+ " `---' \n";
if (Boolean.TRUE.equals(properties.getBanner())) {
String bannerVersion = StringUtil.isNotEmpty(version) ? " (v" + version + ")" : "no version.";
StringBuilder padding = new StringBuilder();

@ -66,9 +66,9 @@ public interface HandlerManager<T> {
boolean b = cls.isAnnotationPresent(ChannelHandler.Sharable.class)
|| HandlerManager.class.isAssignableFrom(cls);
if (!b) {
throw new IllegalException("Join the execution of the handler must add io.netty.channel.ChannelHandler." +
"Sharable annotations, Please for the handler class " + cls.getName() + " add io.netty.channel." +
"ChannelHandler.Sharable annotation");
throw new IllegalException("Join the execution of the handler must add io.netty.channel.ChannelHandler."
+ "Sharable annotations, Please for the handler class " + cls.getName() + " add io.netty.channel."
+ "ChannelHandler.Sharable annotation");
}
return new HandlerEntity<>(order, handler, name);
}

@ -39,13 +39,13 @@ public interface HisRunDataMapper extends BaseMapper<HisRunDataInfo> {
* @param endTime
* @return
*/
@Select("SELECT " +
"tenant_id, item_id, tp_id, max(completed_task_count) as max_completed_task_count " +
"FROM his_run_data " +
"where timestamp between #{startTime} and #{endTime} " +
"group by tenant_id, item_id, tp_id " +
"order by max_completed_task_count desc " +
"limit 8")
@Select("SELECT "
+ "tenant_id, item_id, tp_id, max(completed_task_count) as max_completed_task_count "
+ "FROM his_run_data "
+ "where timestamp between #{startTime} and #{endTime} "
+ "group by tenant_id, item_id, tp_id "
+ "order by max_completed_task_count desc "
+ "limit 8")
List<ThreadPoolTaskRanking> queryThreadPoolTaskSumRanking(@Param("startTime") Long startTime, @Param("endTime") Long endTime);
/**
@ -55,13 +55,13 @@ public interface HisRunDataMapper extends BaseMapper<HisRunDataInfo> {
* @param endTime
* @return
*/
@Select("SELECT " +
"tenant_id, item_id, tp_id, max(queue_size) as max_queue_size, max(reject_count) as max_reject_count, max(completed_task_count) as max_completed_task_count " +
"FROM his_run_data " +
"where timestamp between #{startTime} and #{endTime} " +
"group by tenant_id, item_id, tp_id " +
"order by max_completed_task_count desc " +
"limit 4")
@Select("SELECT "
+ "tenant_id, item_id, tp_id, max(queue_size) as max_queue_size, max(reject_count) as max_reject_count, max(completed_task_count) as max_completed_task_count "
+ "FROM his_run_data "
+ "where timestamp between #{startTime} and #{endTime} "
+ "group by tenant_id, item_id, tp_id "
+ "order by max_completed_task_count desc "
+ "limit 4")
List<ThreadPoolTaskRanking> queryThreadPoolMaxRanking(@Param("startTime") Long startTime, @Param("endTime") Long endTime);
@Data

Loading…
Cancel
Save