code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
public Set<String> getExcludeServiceOperations() {
return excludeServiceOperations;
} | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | getExcludeServiceOperations | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
public boolean isAgentEnabled() {
return agentEnabled;
} | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | isAgentEnabled | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
public void setAgentEnabled(boolean agentEnabled) {
this.agentEnabled = agentEnabled;
} | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | setAgentEnabled | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
public String getMessage() {
return message;
} | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | getMessage | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
public void setMessage(String message) {
this.message = message;
} | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | setMessage | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
public void setDubboStreamReplayThreshold(String dubboStreamReplayThreshold) {
this.dubboStreamReplayThreshold = Integer.parseInt(dubboStreamReplayThreshold);
} | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | setDubboStreamReplayThreshold | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
public int getDubboStreamReplayThreshold() {
return dubboStreamReplayThreshold;
} | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | getDubboStreamReplayThreshold | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
public Map<String, String> getExtendField() {
return extendField;
} | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | getExtendField | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
public void setExtendField(Map<String, String> extendField) {
this.extendField = extendField;
} | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | setExtendField | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
public int getBufferSize() {
if (extendField != null && extendField.containsKey(BUFFER_SIZE)) {
return Integer.parseInt(extendField.get(BUFFER_SIZE));
}
return bufferSize;
} | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | getBufferSize | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
public void setBufferSize(String bufferSize) {
if (StringUtil.isEmpty(bufferSize)) {
return;
}
this.bufferSize = Integer.parseInt(bufferSize);
System.setProperty(BUFFER_SIZE, bufferSize);
} | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | setBufferSize | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
@Override
public String toString() {
return "ConfigManager{" +
"enableDebug=" + enableDebug +
", agentVersion='" + agentVersion + '\'' +
", serviceName='" + serviceName + '\'' +
", storageServiceHost='" + storageServiceHost + '\'' +
", configPath='... | DynamicClass retransform rules:
1. addEntity: all entity of the same class of the added entity class need to be set to retransform
2. resetEntity: resetEntityClassSet only contains the class not in newDynamicClassList
ex: oldDynamicClassList: ClassA methodA, ClassB methodB, ClassC methodC
newDynamicClassList: Class... | toString | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/config/ConfigManager.java | Apache-2.0 |
public static void reportUsedTime(long time, boolean isQueuedTime) {
if (STATE.get() <= FAST_REJECT) {
return;
}
if (isQueuedTime) {
BALANCE_CHECKER.statistic(time);
} else {
DATA_SERVICE_CHECKER.statistic(time);
}
} | Report time consuming
@param time -1,Reject;
@param isQueuedTime isQueuedTime | reportUsedTime | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | Apache-2.0 |
@Override
public void run() {
boolean isRecover = false;
switch (STATE.get()) {
case SERVICE_EXCEPTION:
isRecover = DATA_SERVICE_CHECKER.isRecover();
if (isRecover) {
STATE.set(NORMAL);
... | Report time consuming
@param time -1,Reject;
@param isQueuedTime isQueuedTime | run | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | Apache-2.0 |
void statistic(long usedTime) {
if (usedTime < 0) {
fatal.incrementAndGet();
} else if (usedTime <= defaultTimeout) {
success.incrementAndGet();
}
total.incrementAndGet();
} | Report time consuming
@param time -1,Reject;
@param isQueuedTime isQueuedTime | statistic | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | Apache-2.0 |
void updateRate(double configRate, double currentRate) {
if ((configRate > currentRate && STATE.get() == NORMAL) || configRate < currentRate) {
for (Map.Entry<String, Pair<Double, RateLimiter>> entry : RATE_LIMITER_MAP.entrySet()) {
RATE_LIMITER_MAP.put(entry.getKey(), Pa... | custom modify config rate or health check recover :
1. increase or recover (configRate > currentRate && STATE == NORMAL)
2. decrease (configRate < currentRate) | updateRate | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | Apache-2.0 |
double getCurrentRate(double rate) {
if (STATE.get() == NORMAL) {
return rate;
}
// un normally state, use current rate(maybe decelerated)
String currentRate = System.getProperty(ConfigConstants.CURRENT_RATE);
if (StringUtil.isNotEmpty(currentR... | custom modify config rate or health check recover :
1. increase or recover (configRate > currentRate && STATE == NORMAL)
2. decrease (configRate < currentRate) | getCurrentRate | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | Apache-2.0 |
boolean validate() {
return ConfigManager.INSTANCE.getRecordRate() > 0;
} | custom modify config rate or health check recover :
1. increase or recover (configRate > currentRate && STATE == NORMAL)
2. decrease (configRate < currentRate) | validate | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | Apache-2.0 |
void changeRate() {
if (!validate()) {
return;
}
double targetRate = ConfigManager.INSTANCE.getRecordRate();
for (Map.Entry<String, Pair<Double, RateLimiter>> entry : RATE_LIMITER_MAP.entrySet()) {
targetRate = MIN_RATE;
RAT... | Decrement record rate to {@link #MIN_RATE}
trigger if service exception | changeRate | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | Apache-2.0 |
void decelerate() {
if (!validate()) {
return;
}
double targetRate = ConfigManager.INSTANCE.getRecordRate();
for (Map.Entry<String, Pair<Double, RateLimiter>> entry : RATE_LIMITER_MAP.entrySet()) {
Pair<Double, RateLimiter> limiterPair = en... | Decrement record rate by 20%
trigger if queue is full | decelerate | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/healthy/HealthManager.java | Apache-2.0 |
public int getCode() {
return code;
} | AREX is shutdown, need to restart | getCode | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/model/AgentStatusEnum.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/model/AgentStatusEnum.java | Apache-2.0 |
public String getValue() {
return value;
} | AREX is shutdown, need to restart | getValue | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/model/AgentStatusEnum.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/model/AgentStatusEnum.java | Apache-2.0 |
public String serialize(Object object) {
try {
return jsonPrinter.print((AbstractMessage) object);
} catch (Throwable e) {
LogManager.warn("proto-serialize", e);
return StringUtil.EMPTY;
}
} | for the type inside the Collection is the PB type,
traverse the elements inside the Collection and serialize them one by one with separators | serialize | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/ProtoJsonSerializer.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/ProtoJsonSerializer.java | Apache-2.0 |
public <T> T deserialize(String value, Class<T> clazz) {
if (StringUtil.isEmpty(value) || clazz == null) {
return null;
}
try {
Builder<?> builder = getMessageBuilder(clazz);
jsonParser.merge(value, builder);
return (T) builder.build();
... | for the type inside the Collection is the PB type,
traverse the elements inside the Collection and serialize them one by one with separators | deserialize | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/ProtoJsonSerializer.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/ProtoJsonSerializer.java | Apache-2.0 |
private Builder<?> getMessageBuilder(Class<?> clazz)
throws InvocationTargetException, IllegalAccessException, NoSuchMethodException {
Method method = clazz.getDeclaredMethod("newBuilder");
return (Builder<?>) method.invoke(null);
} | Create Class.Builder based on Class reflection for Json deserialization
@param clazz
@return Class.Builder | getMessageBuilder | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/ProtoJsonSerializer.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/ProtoJsonSerializer.java | Apache-2.0 |
@Override
public AbstractMessage read(JsonReader in) throws IOException {
final JsonElement parse = Streams.parse(in);
final String json = GSON.toJson(parse);
return (AbstractMessage) ProtoJsonSerializer.getInstance().deserialize(json, rawClass);
} | Streams.parse(in) will return a JsonObject object, which needs to be serialized to json first,
and then deserialized and restored to the original type by ProtoJsonSerializer | read | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/gson/adapter/ProtoBufTypeAdapter.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/gson/adapter/ProtoBufTypeAdapter.java | Apache-2.0 |
@Override
protected ClassIntrospector defaultClassIntrospector() {
return new ArexBasicClassIntrospector();
} | When the class does not have a no-argument constructor,
create a custom-built no-argument constructor logic | defaultClassIntrospector | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/ArexObjectMapper.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/ArexObjectMapper.java | Apache-2.0 |
@Override
public BasicBeanDescription forDeserialization(DeserializationConfig config, JavaType type, MixInResolver r) {
BasicBeanDescription desc = super.forDeserialization(config, type, r);
if (HAS_EXCEPTION.get()) {
return desc;
}
if (isMissin... | When the class does not have a no-argument constructor,
create a custom-built no-argument constructor logic | forDeserialization | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/ArexObjectMapper.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/ArexObjectMapper.java | Apache-2.0 |
private boolean isMissingDefaultConstructor(JavaType type, BasicBeanDescription desc) {
if (desc.findDefaultConstructor() != null) {
return false;
}
if (isStdTypeDesc(type)) {
return false;
}
return !super._isStdJDKCollection(ty... | When the class does not have a no-argument constructor,
create a custom-built no-argument constructor logic | isMissingDefaultConstructor | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/ArexObjectMapper.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/ArexObjectMapper.java | Apache-2.0 |
private boolean isStdTypeDesc(JavaType type) {
Class<?> cls = type.getRawClass();
if (cls.isPrimitive()) {
return cls == Integer.TYPE || cls == Long.TYPE || cls == Boolean.TYPE;
}
if (cls == CLS_OBJECT || cls == CLS_STRING || cls == Integer.class || cls =... | When the class does not have a no-argument constructor,
create a custom-built no-argument constructor logic | isStdTypeDesc | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/ArexObjectMapper.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/ArexObjectMapper.java | Apache-2.0 |
@Override
public AnnotatedConstructor findDefaultConstructor() {
AnnotatedConstructor annotatedConstructor = super.findDefaultConstructor();
if (annotatedConstructor == null) {
try {
// no default constructor, create one for deserialize
... | When the class does not have a no-argument constructor,
create a custom-built no-argument constructor logic | findDefaultConstructor | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/ArexObjectMapper.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/ArexObjectMapper.java | Apache-2.0 |
@Override
public boolean useForType(JavaType type) {
Class<?> rawClass = type.getRawClass();
return rawClass.isInterface() &&
StringUtil.startWith(rawClass.getName(), FastUtilAdapterFactory.FASTUTIL_PACKAGE);
} | @return true will serialize with runtime type info | useForType | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/JacksonSerializer.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/jackson/JacksonSerializer.java | Apache-2.0 |
public Date parseDate(final String source) {
return parseDate(source, null);
} | Parse date without timezone
@param source datetime string
@return Date | parseDate | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/DateFormatParser.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/DateFormatParser.java | Apache-2.0 |
public Date parseDate(String source, TimeZone timeZone) {
if (StringUtil.isEmpty(source)) {
return null;
}
if (timeZone == null) {
timeZone = TimezoneParser.INSTANCE.parse(source);
}
try {
if (source.length() >= TimePatternConstants.SIMPLE_DA... | Parse date with timezone
@param source datetime string
@return Date | parseDate | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/DateFormatParser.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/DateFormatParser.java | Apache-2.0 |
public DateTimeFormatter getFormatter(final String source, final String defaultPattern) {
String pattern = DATE_PATTERN_MAP.getOrDefault(source.length(), defaultPattern);
return DEFAULT_FORMATTER_MAP.computeIfAbsent(pattern, DateTimeFormatter::ofPattern);
} | Get datetime formatter
@param source datetime string
@param defaultPattern default datetime pattern
@return DateTimeFormatter instance | getFormatter | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/DateFormatParser.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/DateFormatParser.java | Apache-2.0 |
public DateTimeFormatter getFormatter(final String pattern) {
return DEFAULT_FORMATTER_MAP.computeIfAbsent(pattern, DateTimeFormatter::ofPattern);
} | Get datetime formatter
@param pattern datetime pattern
@return DateTimeFormatter instance | getFormatter | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/DateFormatParser.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/DateFormatParser.java | Apache-2.0 |
public static Object restoreRange(String json) {
try {
Object rangeDeserializer = JacksonSerializerWithType.INSTANCE.deserialize(json, rangeClass);
if (StringUtil.containsIgnoreCase(json, GUAVA_BELOW_ALL_CLASS_NAME)) {
lowerBoundField.set(rangeDeserializer, belowAllInstan... | <relocation>
<pattern>com.google</pattern>
<shadedPattern>shaded.com.google</shadedPattern>
</relocation>
after packaging, com.google.** will be relocated to shaded.com.google.**. String also will be relocated.
so in order to get the Range type at runtime, need to remove the shaded prefix
ex: String GUAVA_RANGE_C... | restoreRange | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/GuavaRangeManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/GuavaRangeManager.java | Apache-2.0 |
public static boolean isGuavaRange(String typeName) {
return GUAVA_RANGE_CLASS_NAME.endsWith(typeName);
} | Guava_RANGE will be shaded, so use endswith. | isGuavaRange | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/GuavaRangeManager.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/serializer/util/GuavaRangeManager.java | Apache-2.0 |
public long loadAgentConfig(String agentArgs) {
// AREX cli may pass arguments to agent
if (StringUtil.isNotEmpty(agentArgs)) {
ConfigManager.INSTANCE.parseAgentConfig(agentArgs);
return -1;
}
if (ConfigManager.INSTANCE.isLocalStorage()) {
return -1;
... | ConfigService
todo: config file, run backend
@date 2022/03/16 | loadAgentConfig | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/services/ConfigService.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/services/ConfigService.java | Apache-2.0 |
public void loadAgentConfig() {
try {
ConfigQueryRequest request = buildConfigQueryRequest();
String requestJson = serialize(request);
HttpClientResponse clientResponse = AsyncHttpClientUtil.postAsyncWithJson(CONFIG_LOAD_URI, requestJson, null).join();
if (client... | ConfigService
todo: config file, run backend
@date 2022/03/16 | loadAgentConfig | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/services/ConfigService.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/services/ConfigService.java | Apache-2.0 |
public ConfigQueryRequest buildConfigQueryRequest() {
ConfigQueryRequest request = new ConfigQueryRequest();
request.setAppId(ConfigManager.INSTANCE.getServiceName());
request.setHost(NetUtils.getIpAddress());
request.setRecordVersion(ConfigManager.INSTANCE.getAgentVersion());
Ag... | ConfigService
todo: config file, run backend
@date 2022/03/16 | buildConfigQueryRequest | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/services/ConfigService.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/services/ConfigService.java | Apache-2.0 |
AgentStatusEnum getAgentStatus() {
if (AgentStatusService.INSTANCE.isShutdown()) {
return AgentStatusEnum.SHUTDOWN;
}
if (firstLoad.compareAndSet(false, true)) {
return AgentStatusEnum.START;
}
if (ConfigManager.FIRST_TRANSFORM.get()) {
if (C... | ConfigService
todo: config file, run backend
@date 2022/03/16 | getAgentStatus | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/services/ConfigService.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/services/ConfigService.java | Apache-2.0 |
public Map<String, String> getSystemProperties() {
Properties properties = System.getProperties();
Map<String, String> map = MapUtils.newHashMapWithExpectedSize(properties.size());
Map<String, String> mockerTags = new HashMap<>();
for (Map.Entry<Object, Object> entry : properties.entrySe... | ConfigService
todo: config file, run backend
@date 2022/03/16 | getSystemProperties | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/services/ConfigService.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/services/ConfigService.java | Apache-2.0 |
public static byte[] zstdCompress(byte[] original) {
if (original == null || original.length == 0) {
return ZERO_BYTE;
}
try (ByteArrayInputStream byteInputStream = new ByteArrayInputStream(original);
ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(byt... | zstd compress
@param original original string
@return | zstdCompress | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/util/CompressUtil.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/util/CompressUtil.java | Apache-2.0 |
public static String zstdDecompress(InputStream inputStream, Charset charsetName) {
try (ZstdInputStreamNoFinalizer zstdInputStream = new ZstdInputStreamNoFinalizer(inputStream,
RecyclingBufferPool.INSTANCE);
ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(inputStr... | zstd compress
@param original original string
@return | zstdDecompress | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/util/CompressUtil.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/util/CompressUtil.java | Apache-2.0 |
public static String zstdDecompress(byte[] bytes, Charset charsetName) {
return zstdDecompress(new ByteArrayInputStream(bytes), charsetName);
} | zstd compress
@param original original string
@return | zstdDecompress | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/main/java/io/arex/foundation/util/CompressUtil.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/main/java/io/arex/foundation/util/CompressUtil.java | Apache-2.0 |
@Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | getUnknownFields | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ProtoTest.internal_static_com_ctrip_flight_arextest_api_proto_HelloProtoRequestType_descriptor;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | getDescriptor | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
protected FieldAccessorTable
internalGetFieldAccessorTable() {
return ProtoTest.internal_static_com_ctrip_flight_arextest_api_proto_HelloProtoRequestType_fieldAccessorTable
.ensureFieldAccessorsInitialized(
HelloProtoRequestType.class, Builder.class);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | internalGetFieldAccessorTable | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ProtoTest.internal_static_com_ctrip_flight_arextest_api_proto_HelloProtoRequestType_descriptor;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | getDescriptor | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
protected FieldAccessorTable
internalGetFieldAccessorTable() {
return ProtoTest.internal_static_com_ctrip_flight_arextest_api_proto_HelloProtoRequestType_fieldAccessorTable
.ensureFieldAccessorsInitialized(
HelloProtoRequestType.class, Builder.class);
... | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | internalGetFieldAccessorTable | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | maybeForceBuilderInitialization | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder clear() {
super.clear();
name_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
return this;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | clear | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ProtoTest.internal_static_com_ctrip_flight_arextest_api_proto_HelloProtoRequestType_descriptor;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | getDescriptorForType | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public HelloProtoRequestType getDefaultInstanceForType() {
return HelloProtoRequestType.getDefaultInstance();
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | getDefaultInstanceForType | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public HelloProtoRequestType build() {
HelloProtoRequestType result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | build | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public HelloProtoRequestType buildPartial() {
HelloProtoRequestType result = new HelloProtoRequestType(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
... | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | buildPartial | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder clone() {
return (Builder) super.clone();
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | clone | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | setField | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | clearField | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | clearOneof | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | setRepeatedField | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | addRepeatedField | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof HelloProtoRequestType) {
return mergeFrom((HelloProtoRequestType)other);
} else {
super.mergeFrom(other);
return this;
}
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | mergeFrom | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
public Builder mergeFrom(HelloProtoRequestType other) {
if (other == HelloProtoRequestType.getDefaultInstance()) return this;
if (other.hasName()) {
bitField0_ |= 0x00000001;
name_ = other.name_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
... | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | mergeFrom | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public final boolean isInitialized() {
return true;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | isInitialized | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
HelloProtoRequestType parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFro... | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoRequestType} | mergeFrom | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | getUnknownFields | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ProtoTest.internal_static_com_ctrip_flight_arextest_api_proto_HelloProtoResponseType_descriptor;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | getDescriptor | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
protected FieldAccessorTable
internalGetFieldAccessorTable() {
return ProtoTest.internal_static_com_ctrip_flight_arextest_api_proto_HelloProtoResponseType_fieldAccessorTable
.ensureFieldAccessorsInitialized(
HelloProtoResponseType.class, Builder.class);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | internalGetFieldAccessorTable | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ProtoTest.internal_static_com_ctrip_flight_arextest_api_proto_HelloProtoResponseType_descriptor;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | getDescriptor | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
protected FieldAccessorTable
internalGetFieldAccessorTable() {
return ProtoTest.internal_static_com_ctrip_flight_arextest_api_proto_HelloProtoResponseType_fieldAccessorTable
.ensureFieldAccessorsInitialized(
HelloProtoResponseType.class, Builder.class);
... | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | internalGetFieldAccessorTable | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | maybeForceBuilderInitialization | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder clear() {
super.clear();
msg_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
return this;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | clear | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ProtoTest.internal_static_com_ctrip_flight_arextest_api_proto_HelloProtoResponseType_descriptor;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | getDescriptorForType | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public HelloProtoResponseType getDefaultInstanceForType() {
return HelloProtoResponseType.getDefaultInstance();
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | getDefaultInstanceForType | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public HelloProtoResponseType build() {
HelloProtoResponseType result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | build | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public HelloProtoResponseType buildPartial() {
HelloProtoResponseType result = new HelloProtoResponseType(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}... | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | buildPartial | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder clone() {
return (Builder) super.clone();
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | clone | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | setField | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | clearField | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | clearOneof | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | setRepeatedField | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | addRepeatedField | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof HelloProtoResponseType) {
return mergeFrom((HelloProtoResponseType)other);
} else {
super.mergeFrom(other);
return this;
}
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | mergeFrom | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
public Builder mergeFrom(HelloProtoResponseType other) {
if (other == HelloProtoResponseType.getDefaultInstance()) return this;
if (other.hasMsg()) {
bitField0_ |= 0x00000001;
msg_ = other.msg_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
... | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | mergeFrom | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public final boolean isInitialized() {
return true;
} | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | isInitialized | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
@Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
HelloProtoResponseType parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFr... | Protobuf type {@code com.ctrip.flight.arextest.api.proto.HelloProtoResponseType} | mergeFrom | java | arextest/arex-agent-java | arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | https://github.com/arextest/arex-agent-java/blob/master/arex-instrumentation-foundation/src/test/java/io/arex/foundation/serializer/ProtoTest.java | Apache-2.0 |
private static String testDynamic(int num) {
return UUID.randomUUID().toString();
} | the value returned by each call is different, but if replayed, the recorded value should be returned normally | testDynamic | java | arextest/arex-agent-java | arex-integration-tests/arex-dynamic-integration-test/src/test/java/io/arex/integrationtest/dynamic/DynamicClassIT.java | https://github.com/arextest/arex-agent-java/blob/master/arex-integration-tests/arex-dynamic-integration-test/src/test/java/io/arex/integrationtest/dynamic/DynamicClassIT.java | Apache-2.0 |
@ParameterizedTest
@ValueSource(strings = {"openjdk:8", "openjdk:11", "openjdk:17"})
void main(String image) {
GenericContainer<?> container = new GenericContainer<>(DockerImageName.parse(image))
.withCopyFileToContainer(MountableFile.forHostPath(getAgentJarPath("arex-agent")),
... | test whether the AREX starts normally under different jdk versions | main | java | arextest/arex-agent-java | arex-integration-tests/arex-main-integration-test/src/test/java/io/arex/integrationtest/mainapp/MainAppIT.java | https://github.com/arextest/arex-agent-java/blob/master/arex-integration-tests/arex-main-integration-test/src/test/java/io/arex/integrationtest/mainapp/MainAppIT.java | Apache-2.0 |
private static String getMainAppJar() {
String jarDir = "target/arex-main-integration-test.jar";
Path path = Paths.get(jarDir);
assertTrue(Files.exists(path), jarDir + " not found. Execute mvn package to build the jar.");
return path.toAbsolutePath().toString();
} | test whether the AREX starts normally under different jdk versions | getMainAppJar | java | arextest/arex-agent-java | arex-integration-tests/arex-main-integration-test/src/test/java/io/arex/integrationtest/mainapp/MainAppIT.java | https://github.com/arextest/arex-agent-java/blob/master/arex-integration-tests/arex-main-integration-test/src/test/java/io/arex/integrationtest/mainapp/MainAppIT.java | Apache-2.0 |
public static TableSchema parse(String sql) throws Exception {
sql = PATTERN.matcher(sql).replaceAll(" ");
Statement statement = CCJSqlParserUtil.parse(sql);
List<String> tableNameList = new TablesNamesFinder().getTableList(statement);
// sort table name
if (tableNameList != nu... | parse table and action from sql
@param sql sql
@return table schema info | parse | java | arextest/arex-agent-java | arex-third-party/src/main/java/io/arex/agent/thirdparty/util/sqlparser/JSqlParserUtil.java | https://github.com/arextest/arex-agent-java/blob/master/arex-third-party/src/main/java/io/arex/agent/thirdparty/util/sqlparser/JSqlParserUtil.java | Apache-2.0 |
private static String getAction(Statement statement) {
if (statement instanceof Select) {
return "Select";
}
return statement.getClass().getSimpleName();
} | parse table and action from sql
@param sql sql
@return table schema info | getAction | java | arextest/arex-agent-java | arex-third-party/src/main/java/io/arex/agent/thirdparty/util/sqlparser/JSqlParserUtil.java | https://github.com/arextest/arex-agent-java/blob/master/arex-third-party/src/main/java/io/arex/agent/thirdparty/util/sqlparser/JSqlParserUtil.java | Apache-2.0 |
@Override
public StringBuffer format(final Object obj, final StringBuffer toAppendTo, final FieldPosition pos) {
return toAppendTo.append(printer.format(obj));
} | <p>Formats a {@code Date}, {@code Calendar} or
{@code Long} (milliseconds) object.</p>
This method is an implementation of {@link Format#format(Object, StringBuffer, FieldPosition)}
@param obj the object to format
@param toAppendTo the buffer to append to
@param pos the position - ignored
@return the buffer passed ... | format | java | arextest/arex-agent-java | arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | https://github.com/arextest/arex-agent-java/blob/master/arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | Apache-2.0 |
@Override
public String format(final long millis) {
return printer.format(millis);
} | <p>Formats a millisecond {@code long} value.</p>
@param millis the millisecond value to format
@return the formatted string
@since 2.1 | format | java | arextest/arex-agent-java | arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | https://github.com/arextest/arex-agent-java/blob/master/arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | Apache-2.0 |
@Override
public String format(final Date date) {
return printer.format(date);
} | <p>Formats a {@code Date} object using a {@code GregorianCalendar}.</p>
@param date the date to format
@return the formatted string | format | java | arextest/arex-agent-java | arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | https://github.com/arextest/arex-agent-java/blob/master/arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | Apache-2.0 |
@Override
public String format(final Calendar calendar) {
return printer.format(calendar);
} | <p>Formats a {@code Calendar} object.</p>
@param calendar the calendar to format
@return the formatted string | format | java | arextest/arex-agent-java | arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | https://github.com/arextest/arex-agent-java/blob/master/arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | Apache-2.0 |
@Deprecated
@Override
public StringBuffer format(final long millis, final StringBuffer buf) {
return printer.format(millis, buf);
} | <p>Formats a {@code Calendar} object.</p>
@param calendar the calendar to format
@return the formatted string | format | java | arextest/arex-agent-java | arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | https://github.com/arextest/arex-agent-java/blob/master/arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | Apache-2.0 |
@Deprecated
@Override
public StringBuffer format(final Date date, final StringBuffer buf) {
return printer.format(date, buf);
} | <p>Formats a {@code Date} object into the
supplied {@code StringBuffer} using a {@code GregorianCalendar}.</p>
@param date the date to format
@param buf the buffer to format into
@return the specified string buffer
@deprecated Use {{@link #format(Date, Appendable)}. | format | java | arextest/arex-agent-java | arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | https://github.com/arextest/arex-agent-java/blob/master/arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | Apache-2.0 |
@Deprecated
@Override
public StringBuffer format(final Calendar calendar, final StringBuffer buf) {
return printer.format(calendar, buf);
} | <p>Formats a {@code Calendar} object into the
supplied {@code StringBuffer}.</p>
@param calendar the calendar to format
@param buf the buffer to format into
@return the specified string buffer
@deprecated Use {{@link #format(Calendar, Appendable)}. | format | java | arextest/arex-agent-java | arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | https://github.com/arextest/arex-agent-java/blob/master/arex-third-party/src/main/java/io/arex/agent/thirdparty/util/time/FastDateFormat.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.