Add `Error Prone Annotations` dependency to suppress warnings (#8774)
This commit is contained in:
parent
eb5f755918
commit
faf6e2eb9e
|
|
@ -2,7 +2,9 @@ jdk11 = true
|
|||
ignoreRules = [ "THREAD_SAFETY_VIOLATION", "MissingSummary", "SameNameButDifferent", "NonAtomicVolatileUpdate", "EqualsGetClass"]
|
||||
setup = ".lift/setup.sh"
|
||||
ignoreFiles = """
|
||||
skywalking-ui/
|
||||
skywalking-ui/**
|
||||
**/target/**
|
||||
/dist-material/release-docs/
|
||||
/dist-material/release-docs/**
|
||||
test/e2e-v2/cases/**
|
||||
test/e2e-v2/java-test-service/**
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -151,7 +151,8 @@ NOTICE, this sharding concept is NOT just for splitting data into different data
|
|||
* E2E: Add verify OAP eBPF Profiling.
|
||||
* Let `multiGet` could query without tag value in the `InfluxDB` storage plugin.
|
||||
* Adjust MAL for V9, remove some groups, add a new Service function for the custom delimiter.
|
||||
* Fix `DatabaseSlowStatement` miss set service catalog.
|
||||
* Add service catalog `DatabaseSlowStatement`.
|
||||
* Add `Error Prone Annotations` dependency to suppress warnings, which are not errors.
|
||||
|
||||
#### UI
|
||||
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ The text of each license is the standard Apache 2.0 license.
|
|||
netty: netty-tcnative-boringssl-static 2.0.43: https://github.com/netty/netty-tcnative, Apache 2.0
|
||||
annotations 13.0: http://www.jetbrains.org, Apache 2.0
|
||||
compiler 0.9.6: https://github.com/spullara/mustache.java, Apache 2.0
|
||||
error_prone_annotations 2.3.2: https://github.com/google/error-prone, Apache 2.0
|
||||
error_prone_annotations 2.11.0: https://github.com/google/error-prone, Apache 2.0
|
||||
instrumentation-api 0.4.3: https://github.com/google/instrumentation-java, Apache 2.0
|
||||
jackson-annotations 2.8.0: https://github.com/FasterXML/jackson-annotations, Apache 2.0
|
||||
jackson-core 2.12.2: https://github.com/FasterXML/jackson-core, Apache 2.0
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
<properties>
|
||||
<slf4j.version>1.7.30</slf4j.version>
|
||||
<log4j.version>2.17.1</log4j.version>
|
||||
<google.error_prone_annotations>2.11.0</google.error_prone_annotations>
|
||||
<graphql-java-tools.version>12.0.2</graphql-java-tools.version>
|
||||
<graphql-java.version>17.3</graphql-java.version>
|
||||
<graphql-java-extended-scalars.version>17.0</graphql-java-extended-scalars.version>
|
||||
|
|
@ -122,6 +123,11 @@
|
|||
<artifactId>log4j-api</artifactId>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.errorprone</groupId>
|
||||
<artifactId>error_prone_annotations</artifactId>
|
||||
<version>${google.error_prone_annotations}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.graphql-java-kickstart</groupId>
|
||||
<artifactId>graphql-java-tools</artifactId>
|
||||
|
|
|
|||
|
|
@ -92,8 +92,6 @@ public class Analyzer {
|
|||
return analyzer;
|
||||
}
|
||||
|
||||
private static final String FUNCTION_NAME_TEMP = "%s%s";
|
||||
|
||||
private List<String> samples;
|
||||
|
||||
private final String metricName;
|
||||
|
|
@ -250,7 +248,7 @@ public class Analyzer {
|
|||
final String dataType,
|
||||
final DownsamplingType downsamplingType) {
|
||||
String functionName = String.format(
|
||||
FUNCTION_NAME_TEMP, downsamplingType.toString().toLowerCase(), StringUtils.capitalize(dataType));
|
||||
"%s%s", downsamplingType.toString().toLowerCase(), StringUtils.capitalize(dataType));
|
||||
meterSystem.create(metricName, functionName, scopeType);
|
||||
}
|
||||
|
||||
|
|
@ -272,6 +270,7 @@ public class Analyzer {
|
|||
toService(requireNonNull(entity.getSourceServiceName()), entity.getLayer());
|
||||
clientSide(entity);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
} else {
|
||||
toService(requireNonNull(entity.getServiceName()), entity.getLayer());
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
package org.apache.skywalking.oal.rt.parser;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
|
@ -91,7 +91,7 @@ public class AnalysisResult {
|
|||
|
||||
public void addPersistentField(String fieldName, String columnName, Class<?> type) {
|
||||
if (persistentFields == null) {
|
||||
persistentFields = new LinkedList<>();
|
||||
persistentFields = new ArrayList<>();
|
||||
}
|
||||
DataColumn dataColumn = new DataColumn(fieldName, columnName, type);
|
||||
persistentFields.add(dataColumn);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
package org.apache.skywalking.oal.rt.parser;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ public class OALScripts {
|
|||
private DisableCollection disableCollection;
|
||||
|
||||
public OALScripts() {
|
||||
metricsStmts = new LinkedList<>();
|
||||
metricsStmts = new ArrayList<>();
|
||||
disableCollection = new DisableCollection();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,15 +18,15 @@
|
|||
|
||||
package org.apache.skywalking.oal.rt.parser;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PersistenceColumns {
|
||||
private List<PersistenceField> stringFields = new LinkedList<>();
|
||||
private List<PersistenceField> longFields = new LinkedList<>();
|
||||
private List<PersistenceField> doubleFields = new LinkedList<>();
|
||||
private List<PersistenceField> intFields = new LinkedList<>();
|
||||
private List<PersistenceField> objectFields = new LinkedList<>();
|
||||
private List<PersistenceField> stringFields = new ArrayList<>();
|
||||
private List<PersistenceField> longFields = new ArrayList<>();
|
||||
private List<PersistenceField> doubleFields = new ArrayList<>();
|
||||
private List<PersistenceField> intFields = new ArrayList<>();
|
||||
private List<PersistenceField> objectFields = new ArrayList<>();
|
||||
|
||||
public void addStringField(String fieldName) {
|
||||
stringFields.add(new PersistenceField(fieldName, "String"));
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
~
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>apm</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
|
|
@ -51,7 +52,7 @@
|
|||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
|
||||
<kafka-clients.version>2.4.1</kafka-clients.version>
|
||||
<spring-kafka-test.version>2.4.6.RELEASE</spring-kafka-test.version>
|
||||
</properties>
|
||||
|
|
@ -87,6 +88,10 @@
|
|||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>testcontainers</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.errorprone</groupId>
|
||||
<artifactId>error_prone_annotations</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
package org.apache.skywalking.oap.server.cluster.plugin.zookeeper;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.List;
|
||||
import org.apache.curator.RetryPolicy;
|
||||
|
|
@ -114,7 +115,7 @@ public class ClusterModuleZookeeperProvider extends ModuleProvider {
|
|||
}
|
||||
};
|
||||
builder.aclProvider(provider);
|
||||
builder.authorization(config.getSchema(), config.getExpression().getBytes());
|
||||
builder.authorization(config.getSchema(), config.getExpression().getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
client = builder.build();
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.apache.skywalking.oap.server.cluster.plugin.zookeeper;
|
|||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import org.apache.curator.x.discovery.ServiceInstance;
|
||||
import org.apache.curator.x.discovery.details.InstanceSerializer;
|
||||
import org.apache.skywalking.oap.server.core.cluster.RemoteInstance;
|
||||
|
|
@ -30,7 +31,7 @@ public class SWInstanceSerializer implements InstanceSerializer<RemoteInstance>
|
|||
|
||||
@Override
|
||||
public byte[] serialize(ServiceInstance<RemoteInstance> instance) throws Exception {
|
||||
return gson.toJson(instance).getBytes();
|
||||
return gson.toJson(instance).getBytes(StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ public abstract class ConfigWatcherRegister implements DynamicConfigurationServi
|
|||
|
||||
public abstract Optional<GroupConfigTable> readGroupConfig(Set<String> keys);
|
||||
|
||||
public class Register {
|
||||
static class Register {
|
||||
private Map<String, WatcherHolder> register = new HashMap<>();
|
||||
|
||||
private boolean containsKey(String key) {
|
||||
|
|
@ -255,7 +255,7 @@ public abstract class ConfigWatcherRegister implements DynamicConfigurationServi
|
|||
}
|
||||
|
||||
@Getter
|
||||
protected class WatcherHolder {
|
||||
protected static class WatcherHolder {
|
||||
private ConfigChangeWatcher watcher;
|
||||
private final String key;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.apache.skywalking.oap.server.configuration.zookeeper;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -54,7 +55,7 @@ public class ZookeeperConfigWatcherRegister extends ConfigWatcherRegister {
|
|||
ChildData data = this.childrenCache.getCurrentData(this.prefix + s);
|
||||
String itemValue = null;
|
||||
if (data != null && data.getData() != null) {
|
||||
itemValue = new String(data.getData());
|
||||
itemValue = new String(data.getData(), StandardCharsets.UTF_8);
|
||||
}
|
||||
table.add(new ConfigTable.ConfigItem(s, itemValue));
|
||||
});
|
||||
|
|
@ -66,21 +67,22 @@ public class ZookeeperConfigWatcherRegister extends ConfigWatcherRegister {
|
|||
GroupConfigTable table = new GroupConfigTable();
|
||||
keys.forEach(key -> {
|
||||
GroupConfigTable.GroupConfigItems groupConfigItems = new GroupConfigTable.GroupConfigItems(key);
|
||||
try {
|
||||
client.getChildren().forPath(this.prefix + key).forEach(itemName -> {
|
||||
byte[] data = null;
|
||||
try {
|
||||
data = client.getData().forPath(this.prefix + key + "/" + itemName);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
groupConfigItems.add(
|
||||
new ConfigTable.ConfigItem(itemName, data == null ? null : new String(data)));
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
table.addGroupConfigItems(groupConfigItems);
|
||||
try {
|
||||
client.getChildren().forPath(this.prefix + key).forEach(itemName -> {
|
||||
byte[] data = null;
|
||||
try {
|
||||
data = client.getData().forPath(this.prefix + key + "/" + itemName);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
groupConfigItems.add(
|
||||
new ConfigTable.ConfigItem(
|
||||
itemName, data == null ? null : new String(data, StandardCharsets.UTF_8)));
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
table.addGroupConfigItems(groupConfigItems);
|
||||
});
|
||||
return Optional.of(table);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ public class EndpointCallRelationDispatcher implements SourceDispatcher<Endpoint
|
|||
case SERVER:
|
||||
serverSide(source);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
package org.apache.skywalking.oap.server.core.query.sql;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public class Where {
|
||||
private List<KeyValues> keyValues = new LinkedList<>();
|
||||
private List<KeyValues> keyValues = new ArrayList<>();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ import org.apache.skywalking.oap.server.telemetry.api.MetricsTag;
|
|||
@Slf4j
|
||||
public class LogHandler extends AbstractKafkaHandler {
|
||||
|
||||
private final KafkaFetcherConfig config;
|
||||
private final HistogramMetrics histogram;
|
||||
private final CounterMetrics errorCounter;
|
||||
private final ILogAnalyzerService logAnalyzerService;
|
||||
|
|
@ -42,7 +41,6 @@ public class LogHandler extends AbstractKafkaHandler {
|
|||
public LogHandler(final ModuleManager moduleManager,
|
||||
final KafkaFetcherConfig config) {
|
||||
super(moduleManager, config);
|
||||
this.config = config;
|
||||
this.logAnalyzerService = moduleManager.find(LogAnalyzerModule.NAME)
|
||||
.provider()
|
||||
.getService(ILogAnalyzerService.class);
|
||||
|
|
|
|||
|
|
@ -19,22 +19,19 @@
|
|||
package org.apache.skywalking.oap.server.library.module;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.skywalking.oap.server.library.util.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Slf4j
|
||||
class BootstrapFlow {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(BootstrapFlow.class);
|
||||
|
||||
private Map<String, ModuleDefine> loadedModules;
|
||||
private List<ModuleProvider> startupSequence;
|
||||
|
||||
BootstrapFlow(Map<String, ModuleDefine> loadedModules) throws CycleDependencyException, ModuleNotFoundException {
|
||||
this.loadedModules = loadedModules;
|
||||
startupSequence = new LinkedList<>();
|
||||
startupSequence = new ArrayList<>();
|
||||
|
||||
makeSequence();
|
||||
}
|
||||
|
|
@ -43,7 +40,7 @@ class BootstrapFlow {
|
|||
void start(
|
||||
ModuleManager moduleManager) throws ModuleNotFoundException, ServiceNotProvidedException, ModuleStartException {
|
||||
for (ModuleProvider provider : startupSequence) {
|
||||
LOGGER.info("start the provider {} in {} module.", provider.name(), provider.getModuleName());
|
||||
log.info("start the provider {} in {} module.", provider.name(), provider.getModuleName());
|
||||
provider.requiredCheck(provider.getModule().services());
|
||||
|
||||
provider.start();
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class PrivateKeyUtil {
|
|||
0x4, (byte) 0x82, (byte) ((pkcs1Length >> 8) & 0xff), (byte) (pkcs1Length & 0xff) // Octet string + length
|
||||
};
|
||||
StringBuilder pkcs8 = new StringBuilder(PKCS_8_PEM_HEADER);
|
||||
pkcs8.append("\n").append(new String(Base64.getEncoder().encode(join(pkcs8Header, pkcs1Bytes))));
|
||||
pkcs8.append("\n").append(new String(Base64.getEncoder().encode(join(pkcs8Header, pkcs1Bytes)), StandardCharsets.UTF_8));
|
||||
pkcs8.append("\n").append(PKCS_8_PEM_FOOTER);
|
||||
return new ByteArrayInputStream(pkcs8.toString().getBytes());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import java.io.InputStream;
|
|||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
|
@ -34,7 +35,7 @@ import java.util.Set;
|
|||
public class ResourceUtils {
|
||||
|
||||
public static Reader read(String fileName) throws FileNotFoundException {
|
||||
return new InputStreamReader(readToStream(fileName));
|
||||
return new InputStreamReader(readToStream(fileName), StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
public static InputStream readToStream(String fileName) throws FileNotFoundException {
|
||||
|
|
|
|||
|
|
@ -18,11 +18,14 @@
|
|||
|
||||
package org.apache.skywalking.oap.query.graphql.resolver;
|
||||
|
||||
import com.google.errorprone.annotations.Keep;
|
||||
import graphql.kickstart.tools.GraphQLMutationResolver;
|
||||
import org.apache.skywalking.oap.server.core.version.Version;
|
||||
|
||||
/**
|
||||
* Root mutation resolver.
|
||||
*/
|
||||
public class Mutation implements GraphQLMutationResolver {
|
||||
private String version = "8.0";
|
||||
@Keep // GraphQL picks this as version
|
||||
private String version = Version.CURRENT.toString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.apache.skywalking.oap.query.graphql.resolver;
|
||||
|
||||
import com.google.errorprone.annotations.Keep;
|
||||
import graphql.kickstart.tools.GraphQLQueryResolver;
|
||||
import org.apache.skywalking.oap.server.core.version.Version;
|
||||
|
||||
|
|
@ -25,6 +26,6 @@ import org.apache.skywalking.oap.server.core.version.Version;
|
|||
* Root Query Resolver.
|
||||
*/
|
||||
public class Query implements GraphQLQueryResolver {
|
||||
@SuppressWarnings("unused") // Used in GraphQL query
|
||||
@Keep // GraphQL picks this as version
|
||||
private final String version = Version.CURRENT.toString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,14 +17,14 @@
|
|||
|
||||
package org.apache.skywalking.oap.server.receiver.browser.provider.parser.errorlog;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import org.apache.skywalking.oap.server.receiver.browser.provider.parser.errorlog.listener.ErrorLogListenerFactory;
|
||||
|
||||
public class ErrorLogParserListenerManager {
|
||||
@Getter
|
||||
private final List<ErrorLogListenerFactory> errorLogAnalysisListeners = new LinkedList<>();
|
||||
private final List<ErrorLogListenerFactory> errorLogAnalysisListeners = new ArrayList<>();
|
||||
|
||||
public void add(final ErrorLogListenerFactory factory) {
|
||||
errorLogAnalysisListeners.add(factory);
|
||||
|
|
|
|||
|
|
@ -17,14 +17,14 @@
|
|||
|
||||
package org.apache.skywalking.oap.server.receiver.browser.provider.parser.performance;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import org.apache.skywalking.oap.server.receiver.browser.provider.parser.performance.listener.PerfDataListenerFactory;
|
||||
|
||||
public class PerfDataParserListenerManager {
|
||||
@Getter
|
||||
private final List<PerfDataListenerFactory> perfDataListenerFactories = new LinkedList<>();
|
||||
private final List<PerfDataListenerFactory> perfDataListenerFactories = new ArrayList<>();
|
||||
|
||||
public void add(final PerfDataListenerFactory factory) {
|
||||
perfDataListenerFactories.add(factory);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import io.grpc.BindableService;
|
|||
import io.grpc.ServerInterceptor;
|
||||
import io.grpc.ServerInterceptors;
|
||||
import io.grpc.ServerServiceDefinition;
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Setter;
|
||||
import org.apache.skywalking.oap.server.core.server.GRPCHandlerRegister;
|
||||
|
|
@ -31,7 +31,7 @@ public class ReceiverGRPCHandlerRegister implements GRPCHandlerRegister {
|
|||
|
||||
@Setter
|
||||
private GRPCHandlerRegister grpcHandlerRegister;
|
||||
private List<ServerInterceptor> interceptors = new LinkedList<>();
|
||||
private List<ServerInterceptor> interceptors = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void addHandler(BindableService handler) {
|
||||
|
|
|
|||
|
|
@ -25,17 +25,16 @@ import java.io.IOException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Base64;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.skywalking.oap.server.library.util.StringUtil;
|
||||
import org.apache.skywalking.oap.server.core.analysis.IDManager;
|
||||
import org.apache.skywalking.oap.server.core.analysis.manual.segment.SegmentRecord;
|
||||
import org.apache.skywalking.oap.server.core.profiling.trace.ProfileThreadSnapshotRecord;
|
||||
import org.apache.skywalking.oap.server.core.query.type.BasicTrace;
|
||||
import org.apache.skywalking.oap.server.core.storage.profiling.trace.IProfileThreadSnapshotQueryDAO;
|
||||
import org.apache.skywalking.oap.server.library.util.BooleanUtils;
|
||||
import org.apache.skywalking.oap.server.library.util.StringUtil;
|
||||
import org.apache.skywalking.oap.server.storage.plugin.influxdb.InfluxClient;
|
||||
import org.apache.skywalking.oap.server.storage.plugin.influxdb.InfluxConstants;
|
||||
import org.influxdb.dto.QueryResult;
|
||||
|
|
@ -65,7 +64,7 @@ public class ProfileThreadSnapshotQuery implements IProfileThreadSnapshotQueryDA
|
|||
countQuery.and(eq(ProfileThreadSnapshotRecord.TASK_ID, taskId))
|
||||
.and(eq(ProfileThreadSnapshotRecord.SEQUENCE, 0));
|
||||
|
||||
final LinkedList<String> segments = new LinkedList<>();
|
||||
final List<String> segments = new ArrayList<>();
|
||||
QueryResult.Series series = client.queryForSingleSeries(countQuery);
|
||||
if (Objects.isNull(series)) {
|
||||
return Collections.emptyList();
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ public class TraceQuery implements ITraceQueryDAO {
|
|||
case SUCCESS:
|
||||
recallQuery.and(eq(SegmentRecord.IS_ERROR, BooleanUtils.FALSE));
|
||||
break;
|
||||
default:
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(tags)) {
|
||||
WhereNested<WhereQueryImpl<SelectQueryImpl>> nested = recallQuery.andNested();
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@
|
|||
|
||||
package org.apache.skywalking.oap.server.storage.plugin.jdbc.h2.dao;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.apache.skywalking.oap.server.core.profiling.trace.ProfileTaskLogRecord;
|
||||
import org.apache.skywalking.oap.server.core.query.type.ProfileTaskLog;
|
||||
import org.apache.skywalking.oap.server.core.query.type.ProfileTaskLogOperationType;
|
||||
|
|
@ -25,14 +31,6 @@ import org.apache.skywalking.oap.server.core.storage.profiling.trace.IProfileTas
|
|||
import org.apache.skywalking.oap.server.library.client.jdbc.JDBCClientException;
|
||||
import org.apache.skywalking.oap.server.library.client.jdbc.hikaricp.JDBCHikariCPClient;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class H2ProfileTaskLogQueryDAO implements IProfileTaskLogQueryDAO {
|
||||
private JDBCHikariCPClient h2Client;
|
||||
|
||||
|
|
@ -50,7 +48,7 @@ public class H2ProfileTaskLogQueryDAO implements IProfileTaskLogQueryDAO {
|
|||
|
||||
try (Connection connection = h2Client.getConnection()) {
|
||||
try (ResultSet resultSet = h2Client.executeQuery(connection, sql.toString(), condition.toArray(new Object[0]))) {
|
||||
final LinkedList<ProfileTaskLog> tasks = new LinkedList<>();
|
||||
final List<ProfileTaskLog> tasks = new ArrayList<>();
|
||||
while (resultSet.next()) {
|
||||
tasks.add(parseLog(resultSet));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public abstract class HistogramMetrics {
|
|||
*/
|
||||
public abstract void observe(double value);
|
||||
|
||||
public class Timer implements Closeable {
|
||||
public static class Timer implements Closeable {
|
||||
private final HistogramMetrics metrics;
|
||||
private final long startNanos;
|
||||
private double duration;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import io.prometheus.client.Collector;
|
|||
import io.prometheus.client.CollectorRegistry;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import org.apache.skywalking.oap.server.telemetry.api.MetricFamily;
|
||||
import org.apache.skywalking.oap.server.telemetry.api.MetricsCollector;
|
||||
|
|
@ -30,7 +29,7 @@ import org.apache.skywalking.oap.server.telemetry.api.MetricsCollector;
|
|||
public class PrometheusMetricsCollector implements MetricsCollector {
|
||||
@Override public Iterable<MetricFamily> collect() {
|
||||
Enumeration<Collector.MetricFamilySamples> mfs = CollectorRegistry.defaultRegistry.metricFamilySamples();
|
||||
List<MetricFamily> result = new LinkedList<>();
|
||||
List<MetricFamily> result = new ArrayList<>();
|
||||
while (mfs.hasMoreElements()) {
|
||||
Collector.MetricFamilySamples metricFamilySamples = mfs.nextElement();
|
||||
List<MetricFamily.Sample> samples = new ArrayList<>(metricFamilySamples.samples.size());
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ curator-client-4.3.0.jar
|
|||
curator-framework-4.3.0.jar
|
||||
curator-recipes-4.3.0.jar
|
||||
curator-x-discovery-4.3.0.jar
|
||||
error_prone_annotations-2.3.2.jar
|
||||
error_prone_annotations-2.11.0.jar
|
||||
failsafe-2.3.4.jar
|
||||
failureaccess-1.0.1.jar
|
||||
flatbuffers-java-1.12.0.jar
|
||||
|
|
|
|||
Loading…
Reference in New Issue