Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Delete redundant Spaces #2834

Merged
merged 3 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
public class SnmpCollectImpl extends AbstractCollect {

private static final String AES128 = "1";

private static final String SHA1 = "1";
private static final String DEFAULT_PROTOCOL = "udp";
private static final String OPERATION_GET = "get";
Expand All @@ -88,7 +87,6 @@ public class SnmpCollectImpl extends AbstractCollect {

private final Map<Integer, Snmp> versionSnmpService = new ConcurrentHashMap<>(3);


@Override
public void preCheck(Metrics metrics) throws IllegalArgumentException {
if (metrics == null || metrics.getSnmp() == null) {
Expand Down Expand Up @@ -263,7 +261,6 @@ public String supportProtocol() {
return DispatchConstants.PROTOCOL_SNMP;
}


private synchronized Snmp getSnmpService(int snmpVersion, SnmpBuilder snmpBuilder) throws IOException {
Snmp snmpService = versionSnmpService.get(snmpVersion);
if (snmpService != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ public void run() {
collectDataDispatch.dispatchCollectData(timeout, metrics, metricsData);
}


/**
* Calculate the real metrics value according to the calculates and aliasFields configuration
*
Expand Down Expand Up @@ -255,7 +254,6 @@ private void calculateFields(Metrics metrics, CollectRep.MetricsData.Builder col
}
}


for (Metrics.Field field : fields) {
String realField = field.getField();
JexlExpression expression = fieldExpressionMap.get(realField);
Expand Down Expand Up @@ -342,7 +340,6 @@ private void calculateFields(Metrics metrics, CollectRep.MetricsData.Builder col
}
}


/**
* @param cal cal
* @param fieldAliasMap field alias map
Expand All @@ -362,7 +359,6 @@ private Object[] transformCal(String cal, Map<String, String> fieldAliasMap) {
return new Object[]{field, expression};
}


/**
* transform unit
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public Flux<ServerSentEvent<String>> requestAi(String text) {
.build())
.build();


return webClient.post()
.body(BodyInserters.fromValue(aliAiRequestParamDTO))
.retrieve()
Expand All @@ -111,7 +110,6 @@ public Flux<ServerSentEvent<String>> requestAi(String text) {
.doOnError(error -> log.info("AlibabaAiServiceImpl.requestAi exception:{}", error.getMessage()));
}


private void checkParam(String param, String apiKey, String model) {
Assert.notNull(param, "text is null");
Assert.notNull(model, "model is null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public Flux<ServerSentEvent<String>> requestAi(String text) {
.messages(List.of(new AiMessage(AiConstants.KimiAiConstants.REQUEST_ROLE, text)))
.build();


return webClient.post()
.body(BodyInserters.fromValue(zhiPuRequestParamDTO))
.retrieve()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
@Slf4j
public class SparkDeskAiServiceImpl implements AiService {


@Autowired
private AiProperties aiProperties;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,4 @@ private void checkParam(String param, String model, String apiKey) {
Assert.notNull(apiKey, "ai.api-key is null");
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
*/
@Slf4j
abstract class AbstractGeneralConfigServiceImpl<T> implements GeneralConfigService<T> {

protected final GeneralConfigDao generalConfigDao;

protected final ObjectMapper objectMapper;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ public List<String> getAppDefineMetricNames(String app) {
return metricNames;
}


@Override
public Map<String, String> getI18nResources(String lang) {
Map<String, String> i18nMap = new HashMap<>(128);
Expand Down Expand Up @@ -266,7 +265,6 @@ public Map<String, String> getI18nApps(String lang) {
return i18nMap;
}


@Override
public List<Hierarchy> getAllAppHierarchy(String lang) {
LinkedList<Hierarchy> hierarchies = new LinkedList<>();
Expand Down Expand Up @@ -360,7 +358,6 @@ private void queryAppHierarchy(String lang, LinkedList<Hierarchy> hierarchies, J
}
}


private void combineHierarchyMetrics(List<Hierarchy> hierarchyMetricList, Hierarchy hierarchyMetric) {
Optional<Hierarchy> preHierarchyOptional = hierarchyMetricList.stream()
.filter(item -> item.getValue().equals(hierarchyMetric.getValue()))
Expand All @@ -383,13 +380,11 @@ private void combineHierarchyMetrics(List<Hierarchy> hierarchyMetricList, Hierar
}
}


@Override
public Map<String, Job> getAllAppDefines() {
return appDefines;
}


@Override
public String getMonitorDefineFileContent(String app) {
var appDefine = appDefineStore.loadAppDefine(app);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public class NoticeConfigServiceImpl implements NoticeConfigService, CommandLine
@Lazy
private DispatcherAlarm dispatcherAlarm;


@Override
public List<NoticeReceiver> getNoticeReceivers(String name) {
Specification<NoticeReceiver> specification = (root, query, criteriaBuilder) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,6 @@ private void syncSinglePluginStatus(PluginMetadata plugin) {
PLUGIN_ENABLE_STATUS.put(item.getClassIdentifier(), plugin.getEnableStatus());
ITEM_TO_PLUGINMETADATAID_MAP.put(item.getClassIdentifier(), plugin.getId());
}


}

@PostConstruct
Expand Down
Loading