diff --git a/samples/skywalking-example/example-web/src/main/resources/spring-context.xml b/samples/skywalking-example/example-web/src/main/resources/spring-context.xml
index 82bef23a0..d8cf60d84 100644
--- a/samples/skywalking-example/example-web/src/main/resources/spring-context.xml
+++ b/samples/skywalking-example/example-web/src/main/resources/spring-context.xml
@@ -10,7 +10,7 @@
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
-
+
@@ -22,4 +22,4 @@
-
\ No newline at end of file
+
diff --git a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/api/Tracing.java b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/api/Tracing.java
index b7b537001..73f0c0625 100644
--- a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/api/Tracing.java
+++ b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/api/Tracing.java
@@ -23,16 +23,30 @@ public class Tracing {
return spanData.getTraceId();
}
- public static String generateNextContextData(){
- if (!AuthDesc.isAuth())
- return null;
+ public static String getTracelevelId() {
+ if (!AuthDesc.isAuth())
+ return "";
- Span spanData = CurrentThreadSpanStack.peek();
- if (spanData == null) {
- return null;
- }
+ Span spanData = CurrentThreadSpanStack.peek();
+ if (spanData == null) {
+ return "";
+ }
- ContextData contextData = new ContextData(spanData);
- return contextData.toString();
- }
+ return (spanData.getParentLevel() == null || spanData.getParentLevel().length() == 0) ?
+ Integer.toString(spanData.getLevelId()) :
+ spanData.getParentLevel() + "." + spanData.getLevelId();
+ }
+
+ public static String generateNextContextData() {
+ if (!AuthDesc.isAuth())
+ return null;
+
+ Span spanData = CurrentThreadSpanStack.peek();
+ if (spanData == null) {
+ return null;
+ }
+
+ ContextData contextData = new ContextData(spanData);
+ return contextData.toString();
+ }
}
diff --git a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/BaseInvokeMonitor.java b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/BaseInvokeMonitor.java
index df3668da6..10fd9adb1 100644
--- a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/BaseInvokeMonitor.java
+++ b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/BaseInvokeMonitor.java
@@ -27,7 +27,7 @@ public abstract class BaseInvokeMonitor {
protected ContextData beforeInvoke(Span spanData, Identification id) {
if (Config.BuriedPoint.PRINTF) {
logger.debug("TraceId:" + spanData.getTraceId() + "\tParentLevelId:" + spanData.getParentLevel()
- + "\tLevelId:" + spanData.getLevelId() + "\tbusinessKey:" + spanData.getParameters());
+ + "\tLevelId:" + spanData.getLevelId() + "\tbusinessKey:" + spanData.getBusinessKey());
}
// 将新创建的Context存放到ThreadLocal栈中。
@@ -37,28 +37,23 @@ public abstract class BaseInvokeMonitor {
ContextBuffer.save(RequestSpan.RequestSpanBuilder.
newBuilder(CurrentThreadSpanStack.peek()).callType(id.getCallType()).viewPoint(id.getViewPoint())
.spanTypeDesc(id.getSpanTypeDesc()).processNo(BuriedPointMachineUtil.getProcessNo())
- .address(BuriedPointMachineUtil.getHostDesc()).parameters(id.getParameters()).build());
+ .address(BuriedPointMachineUtil.getHostDesc()).build());
// 并将当前的Context返回回去
return new ContextData(spanData);
}
protected void afterInvoke() {
- afterInvoke(null);
- }
-
- protected void afterInvoke(String invokeResult) {
try {
if (!AuthDesc.isAuth())
return;
// 弹出上下文的栈顶中的元素
Span spanData = CurrentThreadSpanStack.pop();
- spanData.setInvokeResult(invokeResult);
if (Config.BuriedPoint.PRINTF) {
logger.debug("TraceId-ACK:" + spanData.getTraceId() + "\tParentLevelId:" + spanData.getParentLevel()
- + "\tLevelId:" + spanData.getLevelId() + "\tbusinessKey:" + spanData.getParameters());
+ + "\tLevelId:" + spanData.getLevelId() + "\tbusinessKey:" + spanData.getBusinessKey());
}
// 生成并保存到缓存
ContextBuffer.save(new AckSpan(spanData));
diff --git a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/LocalMethodInvokeMonitor.java b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/LocalMethodInvokeMonitor.java
index a46e7c229..aa2d167ef 100644
--- a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/LocalMethodInvokeMonitor.java
+++ b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/LocalMethodInvokeMonitor.java
@@ -32,10 +32,6 @@ public class LocalMethodInvokeMonitor extends BaseInvokeMonitor {
super.afterInvoke();
}
- public void afterInvoke(String invokeResult){
- super.afterInvoke(invokeResult);
- }
-
public void occurException(Throwable th){
super.occurException(th);
diff --git a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/RPCClientInvokeMonitor.java b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/RPCClientInvokeMonitor.java
index c567097d7..37046a24c 100644
--- a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/RPCClientInvokeMonitor.java
+++ b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/invoke/monitor/RPCClientInvokeMonitor.java
@@ -31,7 +31,7 @@ public class RPCClientInvokeMonitor extends BaseInvokeMonitor {
if (Config.BuriedPoint.PRINTF) {
logger.debug("TraceId:" + spanData.getTraceId() + "\tParentLevelId:" + spanData.getParentLevel()
- + "\tLevelId:" + spanData.getLevelId() + "\tbusinessKey:" + spanData.getParameters());
+ + "\tLevelId:" + spanData.getLevelId() + "\tbusinessKey:" + spanData.getBusinessKey());
}
CurrentThreadSpanStack.push(spanData);
@@ -41,8 +41,7 @@ public class RPCClientInvokeMonitor extends BaseInvokeMonitor {
.spanTypeDesc(id.getSpanTypeDesc())
.bussinessKey(id.getBusinessKey())
.callType(id.getCallType()).processNo(BuriedPointMachineUtil.getProcessNo())
- .address(BuriedPointMachineUtil.getHostDesc())
- .parameters(id.getParameters()).build();
+ .address(BuriedPointMachineUtil.getHostDesc()).build();
ContextBuffer.save(requestSpan);
diff --git a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/model/Identification.java b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/model/Identification.java
index 44f530d85..3a4279561 100644
--- a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/model/Identification.java
+++ b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/model/Identification.java
@@ -8,24 +8,18 @@ import java.util.Map;
public class Identification {
private String viewPoint;
- private Map parameters;
private String businessKey;
private String spanTypeDesc;
private String callType;
public Identification() {
//Non
- parameters = new HashMap();
}
public String getViewPoint() {
return viewPoint;
}
- public Map getParameters() {
- return parameters;
- }
-
public String getSpanTypeDesc() {
return spanTypeDesc;
}
@@ -45,7 +39,6 @@ public class Identification {
public static class IdentificationBuilder {
private Identification sendData;
- private int parameterIdx = 0;
IdentificationBuilder() {
sendData = new Identification();
@@ -60,13 +53,6 @@ public class Identification {
return this;
}
- public IdentificationBuilder addParameter(String value){
- parameterIdx++;
- sendData.parameters.put("_" + parameterIdx, value);
- return this;
- }
-
-
public IdentificationBuilder businessKey(String businessKey) {
sendData.businessKey = businessKey;
return this;
diff --git a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/protocol/util/ContextGenerator.java b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/protocol/util/ContextGenerator.java
index d743b294d..f607a3663 100644
--- a/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/protocol/util/ContextGenerator.java
+++ b/skywalking-collector/skywalking-api/src/main/java/com/a/eye/skywalking/protocol/util/ContextGenerator.java
@@ -17,7 +17,6 @@ public final class ContextGenerator {
Span spanData = getSpanFromThreadLocal();
spanData.setStartDate(System.currentTimeMillis());
spanData.setViewPointId(id.getViewPoint());
- spanData.appendParameters(id.getParameters());
return spanData;
}
diff --git a/skywalking-collector/skywalking-sdk-plugin/custom-local-method-interceptor-plugin/src/main/java/com/a/eye/skywalking/plugin/custom/localmethod/CustomLocalMethodInterceptor.java b/skywalking-collector/skywalking-sdk-plugin/custom-local-method-interceptor-plugin/src/main/java/com/a/eye/skywalking/plugin/custom/localmethod/CustomLocalMethodInterceptor.java
index 810be5b1c..d14f7ebba 100644
--- a/skywalking-collector/skywalking-sdk-plugin/custom-local-method-interceptor-plugin/src/main/java/com/a/eye/skywalking/plugin/custom/localmethod/CustomLocalMethodInterceptor.java
+++ b/skywalking-collector/skywalking-sdk-plugin/custom-local-method-interceptor-plugin/src/main/java/com/a/eye/skywalking/plugin/custom/localmethod/CustomLocalMethodInterceptor.java
@@ -1,10 +1,14 @@
package com.a.eye.skywalking.plugin.custom.localmethod;
+import com.a.eye.skywalking.api.Tracing;
+import com.a.eye.skywalking.buffer.ContextBuffer;
import com.a.eye.skywalking.conf.Config;
import com.a.eye.skywalking.invoke.monitor.LocalMethodInvokeMonitor;
import com.a.eye.skywalking.model.Identification;
import com.a.eye.skywalking.plugin.interceptor.EnhancedClassInstanceContext;
import com.a.eye.skywalking.plugin.interceptor.enhance.*;
+import com.a.eye.skywalking.protocol.InputParametersSpan;
+import com.a.eye.skywalking.protocol.OutputParameterSpan;
import com.google.gson.Gson;
public class CustomLocalMethodInterceptor implements InstanceMethodsAroundInterceptor, StaticMethodsAroundInterceptor {
@@ -16,34 +20,38 @@ public class CustomLocalMethodInterceptor implements InstanceMethodsAroundInterc
@Override
public void beforeMethod(EnhancedClassInstanceContext context, InstanceMethodInvokeContext interceptorContext,
MethodInterceptResult result) {
- Identification.IdentificationBuilder identificationBuilder = buildIdentificationBuilder(interceptorContext);
+ Identification.IdentificationBuilder identificationBuilder = Identification.newBuilder();
identificationBuilder.spanType(new CustomLocalSpanType()).viewPoint(
fullMethodName(interceptorContext.inst().getClass(), interceptorContext.methodName(),
interceptorContext.argumentTypes()));
+
new LocalMethodInvokeMonitor().beforeInvoke(identificationBuilder.build());
+
+ recordParametersAndSave2BufferIfNecessary(interceptorContext.allArguments());
}
- private Identification.IdentificationBuilder buildIdentificationBuilder(MethodInvokeContext interceptorContext) {
- Identification.IdentificationBuilder identificationBuilder = Identification.newBuilder();
+ private void recordParametersAndSave2BufferIfNecessary(Object[] arguments) {
if (Config.Plugin.CustomLocalMethodInterceptorPlugin.RECORD_PARAM_ENABLE) {
- for (Object param : interceptorContext.allArguments()) {
+ InputParametersSpan inputParametersSpan = new InputParametersSpan(Tracing.getTraceId(), Tracing.getTracelevelId());
+ for (Object param : arguments) {
String paramStr;
try {
paramStr = new Gson().toJson(param);
} catch (Throwable e) {
paramStr = "N/A";
}
- identificationBuilder.addParameter(paramStr);
+ inputParametersSpan.addParameter(paramStr);
}
- }
- return identificationBuilder;
+ ContextBuffer.save(inputParametersSpan);
+ }
}
@Override
public Object afterMethod(EnhancedClassInstanceContext context, InstanceMethodInvokeContext interceptorContext,
Object ret) {
- recordResultIfNecessary(ret);
+ recordResultAndSave2BufferIfNecessary(ret);
+ new LocalMethodInvokeMonitor().afterInvoke();
return ret;
}
@@ -56,30 +64,34 @@ public class CustomLocalMethodInterceptor implements InstanceMethodsAroundInterc
@Override
public void beforeMethod(StaticMethodInvokeContext interceptorContext, MethodInterceptResult result) {
- Identification.IdentificationBuilder identificationBuilder = buildIdentificationBuilder(interceptorContext);
+ Identification.IdentificationBuilder identificationBuilder = Identification.newBuilder();
identificationBuilder.spanType(new CustomLocalSpanType()).viewPoint(
fullMethodName(interceptorContext.claszz(), interceptorContext.methodName(),
interceptorContext.argumentTypes()));
+
new LocalMethodInvokeMonitor().beforeInvoke(identificationBuilder.build());
+
+ recordParametersAndSave2BufferIfNecessary(interceptorContext.allArguments());
}
@Override
public Object afterMethod(StaticMethodInvokeContext interceptorContext, Object ret) {
- recordResultIfNecessary(ret);
+ recordResultAndSave2BufferIfNecessary(ret);
+ new LocalMethodInvokeMonitor().afterInvoke();
return ret;
}
- private void recordResultIfNecessary(Object ret) {
+ private void recordResultAndSave2BufferIfNecessary(Object ret) {
if (Config.Plugin.CustomLocalMethodInterceptorPlugin.RECORD_PARAM_ENABLE){
+ OutputParameterSpan outputParameterSpan = new OutputParameterSpan(Tracing.getTraceId(), Tracing.getTracelevelId());
String retStr;
try{
retStr = new Gson().toJson(ret);
}catch (Throwable e){
retStr = "N/A";
}
- new LocalMethodInvokeMonitor().afterInvoke(retStr);
- }else {
- new LocalMethodInvokeMonitor().afterInvoke();
+ outputParameterSpan.setOutputParameter(retStr);
+ ContextBuffer.save(outputParameterSpan);
}
}
diff --git a/skywalking-protocol/src/main/gen-java/com/a/eye/skywalking/protocol/proto/TraceProtocol.java b/skywalking-protocol/src/main/gen-java/com/a/eye/skywalking/protocol/proto/TraceProtocol.java
index f6ee8f428..92481a235 100644
--- a/skywalking-protocol/src/main/gen-java/com/a/eye/skywalking/protocol/proto/TraceProtocol.java
+++ b/skywalking-protocol/src/main/gen-java/com/a/eye/skywalking/protocol/proto/TraceProtocol.java
@@ -100,40 +100,6 @@ public final class TraceProtocol {
*/
com.google.protobuf.ByteString
getViewpointIdBytes();
-
- /**
- * map<string, string> parameters = 8;
- */
- int getParametersCount();
- /**
- * map<string, string> parameters = 8;
- */
- boolean containsParameters(
- java.lang.String key);
- /**
- * Use {@link #getParametersMap()} instead.
- */
- @java.lang.Deprecated
- java.util.Map
- getParameters();
- /**
- * map<string, string> parameters = 8;
- */
- java.util.Map
- getParametersMap();
- /**
- * map<string, string> parameters = 8;
- */
-
- java.lang.String getParametersOrDefault(
- java.lang.String key,
- java.lang.String defaultValue);
- /**
- * map<string, string> parameters = 8;
- */
-
- java.lang.String getParametersOrThrow(
- java.lang.String key);
}
/**
* Protobuf type {@code AckSpan}
@@ -223,18 +189,6 @@ public final class TraceProtocol {
viewpointId_ = bs;
break;
}
- case 66: {
- if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
- parameters_ = com.google.protobuf.MapField.newMapField(
- ParametersDefaultEntryHolder.defaultEntry);
- mutable_bitField0_ |= 0x00000080;
- }
- com.google.protobuf.MapEntry
- parameters = input.readMessage(
- ParametersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
- parameters_.getMutableMap().put(parameters.getKey(), parameters.getValue());
- break;
- }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -249,25 +203,14 @@ public final class TraceProtocol {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return TraceProtocol.internal_static_AckSpan_descriptor;
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_AckSpan_descriptor;
}
- @SuppressWarnings({"rawtypes"})
- protected com.google.protobuf.MapField internalGetMapField(
- int number) {
- switch (number) {
- case 8:
- return internalGetParameters();
- default:
- throw new RuntimeException(
- "Invalid map field number: " + number);
- }
- }
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return TraceProtocol.internal_static_AckSpan_fieldAccessorTable
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_AckSpan_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- TraceProtocol.AckSpan.class, TraceProtocol.AckSpan.Builder.class);
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan.class, com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan.Builder.class);
}
private int bitField0_;
@@ -484,82 +427,6 @@ public final class TraceProtocol {
}
}
- public static final int PARAMETERS_FIELD_NUMBER = 8;
- private static final class ParametersDefaultEntryHolder {
- static final com.google.protobuf.MapEntry<
- java.lang.String, java.lang.String> defaultEntry =
- com.google.protobuf.MapEntry
- .newDefaultInstance(
- TraceProtocol.internal_static_AckSpan_ParametersEntry_descriptor,
- com.google.protobuf.WireFormat.FieldType.STRING,
- "",
- com.google.protobuf.WireFormat.FieldType.STRING,
- "");
- }
- private com.google.protobuf.MapField<
- java.lang.String, java.lang.String> parameters_;
- private com.google.protobuf.MapField
- internalGetParameters() {
- if (parameters_ == null) {
- return com.google.protobuf.MapField.emptyMapField(
- ParametersDefaultEntryHolder.defaultEntry);
- }
- return parameters_;
- }
-
- public int getParametersCount() {
- return internalGetParameters().getMap().size();
- }
- /**
- * map<string, string> parameters = 8;
- */
-
- public boolean containsParameters(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- return internalGetParameters().getMap().containsKey(key);
- }
- /**
- * Use {@link #getParametersMap()} instead.
- */
- @java.lang.Deprecated
- public java.util.Map getParameters() {
- return getParametersMap();
- }
- /**
- * map<string, string> parameters = 8;
- */
-
- public java.util.Map getParametersMap() {
- return internalGetParameters().getMap();
- }
- /**
- * map<string, string> parameters = 8;
- */
-
- public java.lang.String getParametersOrDefault(
- java.lang.String key,
- java.lang.String defaultValue) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- java.util.Map map =
- internalGetParameters().getMap();
- return map.containsKey(key) ? map.get(key) : defaultValue;
- }
- /**
- * map<string, string> parameters = 8;
- */
-
- public java.lang.String getParametersOrThrow(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- java.util.Map map =
- internalGetParameters().getMap();
- if (!map.containsKey(key)) {
- throw new java.lang.IllegalArgumentException();
- }
- return map.get(key);
- }
-
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
@@ -613,15 +480,6 @@ public final class TraceProtocol {
if (((bitField0_ & 0x00000040) == 0x00000040)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, viewpointId_);
}
- for (java.util.Map.Entry entry
- : internalGetParameters().getMap().entrySet()) {
- com.google.protobuf.MapEntry
- parameters = ParametersDefaultEntryHolder.defaultEntry.newBuilderForType()
- .setKey(entry.getKey())
- .setValue(entry.getValue())
- .build();
- output.writeMessage(8, parameters);
- }
unknownFields.writeTo(output);
}
@@ -654,16 +512,6 @@ public final class TraceProtocol {
if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, viewpointId_);
}
- for (java.util.Map.Entry entry
- : internalGetParameters().getMap().entrySet()) {
- com.google.protobuf.MapEntry
- parameters = ParametersDefaultEntryHolder.defaultEntry.newBuilderForType()
- .setKey(entry.getKey())
- .setValue(entry.getValue())
- .build();
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(8, parameters);
- }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -675,10 +523,10 @@ public final class TraceProtocol {
if (obj == this) {
return true;
}
- if (!(obj instanceof TraceProtocol.AckSpan)) {
+ if (!(obj instanceof com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan)) {
return super.equals(obj);
}
- TraceProtocol.AckSpan other = (TraceProtocol.AckSpan) obj;
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan other = (com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan) obj;
boolean result = true;
result = result && (hasTraceId() == other.hasTraceId());
@@ -716,8 +564,6 @@ public final class TraceProtocol {
result = result && getViewpointId()
.equals(other.getViewpointId());
}
- result = result && internalGetParameters().equals(
- other.internalGetParameters());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@@ -758,67 +604,63 @@ public final class TraceProtocol {
hash = (37 * hash) + VIEWPOINTID_FIELD_NUMBER;
hash = (53 * hash) + getViewpointId().hashCode();
}
- if (!internalGetParameters().getMap().isEmpty()) {
- hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
- hash = (53 * hash) + internalGetParameters().hashCode();
- }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
- public static TraceProtocol.AckSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static TraceProtocol.AckSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static TraceProtocol.AckSpan parseFrom(byte[] data)
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static TraceProtocol.AckSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static TraceProtocol.AckSpan parseFrom(java.io.InputStream input)
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static TraceProtocol.AckSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static TraceProtocol.AckSpan parseDelimitedFrom(java.io.InputStream input)
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static TraceProtocol.AckSpan parseDelimitedFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static TraceProtocol.AckSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static TraceProtocol.AckSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -830,7 +672,7 @@ public final class TraceProtocol {
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(TraceProtocol.AckSpan prototype) {
+ public static Builder newBuilder(com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
@@ -850,42 +692,20 @@ public final class TraceProtocol {
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:AckSpan)
- TraceProtocol.AckSpanOrBuilder {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpanOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return TraceProtocol.internal_static_AckSpan_descriptor;
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_AckSpan_descriptor;
}
- @SuppressWarnings({"rawtypes"})
- protected com.google.protobuf.MapField internalGetMapField(
- int number) {
- switch (number) {
- case 8:
- return internalGetParameters();
- default:
- throw new RuntimeException(
- "Invalid map field number: " + number);
- }
- }
- @SuppressWarnings({"rawtypes"})
- protected com.google.protobuf.MapField internalGetMutableMapField(
- int number) {
- switch (number) {
- case 8:
- return internalGetMutableParameters();
- default:
- throw new RuntimeException(
- "Invalid map field number: " + number);
- }
- }
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return TraceProtocol.internal_static_AckSpan_fieldAccessorTable
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_AckSpan_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- TraceProtocol.AckSpan.class, TraceProtocol.AckSpan.Builder.class);
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan.class, com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan.Builder.class);
}
- // Construct using TraceProtocol.AckSpan.newBuilder()
+ // Construct using com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -916,29 +736,28 @@ public final class TraceProtocol {
bitField0_ = (bitField0_ & ~0x00000020);
viewpointId_ = "";
bitField0_ = (bitField0_ & ~0x00000040);
- internalGetMutableParameters().clear();
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return TraceProtocol.internal_static_AckSpan_descriptor;
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_AckSpan_descriptor;
}
- public TraceProtocol.AckSpan getDefaultInstanceForType() {
- return TraceProtocol.AckSpan.getDefaultInstance();
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan getDefaultInstanceForType() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan.getDefaultInstance();
}
- public TraceProtocol.AckSpan build() {
- TraceProtocol.AckSpan result = buildPartial();
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan build() {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
- public TraceProtocol.AckSpan buildPartial() {
- TraceProtocol.AckSpan result = new TraceProtocol.AckSpan(this);
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan buildPartial() {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan result = new com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
@@ -969,8 +788,6 @@ public final class TraceProtocol {
to_bitField0_ |= 0x00000040;
}
result.viewpointId_ = viewpointId_;
- result.parameters_ = internalGetParameters();
- result.parameters_.makeImmutable();
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
@@ -1003,16 +820,16 @@ public final class TraceProtocol {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof TraceProtocol.AckSpan) {
- return mergeFrom((TraceProtocol.AckSpan)other);
+ if (other instanceof com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan) {
+ return mergeFrom((com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(TraceProtocol.AckSpan other) {
- if (other == TraceProtocol.AckSpan.getDefaultInstance()) return this;
+ public Builder mergeFrom(com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan other) {
+ if (other == com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan.getDefaultInstance()) return this;
if (other.hasTraceId()) {
bitField0_ |= 0x00000001;
traceId_ = other.traceId_;
@@ -1042,8 +859,6 @@ public final class TraceProtocol {
viewpointId_ = other.viewpointId_;
onChanged();
}
- internalGetMutableParameters().mergeFrom(
- other.internalGetParameters());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1072,11 +887,11 @@ public final class TraceProtocol {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- TraceProtocol.AckSpan parsedMessage = null;
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (TraceProtocol.AckSpan) e.getUnfinishedMessage();
+ parsedMessage = (com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -1486,125 +1301,6 @@ public final class TraceProtocol {
onChanged();
return this;
}
-
- private com.google.protobuf.MapField<
- java.lang.String, java.lang.String> parameters_;
- private com.google.protobuf.MapField
- internalGetParameters() {
- if (parameters_ == null) {
- return com.google.protobuf.MapField.emptyMapField(
- ParametersDefaultEntryHolder.defaultEntry);
- }
- return parameters_;
- }
- private com.google.protobuf.MapField
- internalGetMutableParameters() {
- onChanged();;
- if (parameters_ == null) {
- parameters_ = com.google.protobuf.MapField.newMapField(
- ParametersDefaultEntryHolder.defaultEntry);
- }
- if (!parameters_.isMutable()) {
- parameters_ = parameters_.copy();
- }
- return parameters_;
- }
-
- public int getParametersCount() {
- return internalGetParameters().getMap().size();
- }
- /**
- * map<string, string> parameters = 8;
- */
-
- public boolean containsParameters(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- return internalGetParameters().getMap().containsKey(key);
- }
- /**
- * Use {@link #getParametersMap()} instead.
- */
- @java.lang.Deprecated
- public java.util.Map getParameters() {
- return getParametersMap();
- }
- /**
- * map<string, string> parameters = 8;
- */
-
- public java.util.Map getParametersMap() {
- return internalGetParameters().getMap();
- }
- /**
- * map<string, string> parameters = 8;
- */
-
- public java.lang.String getParametersOrDefault(
- java.lang.String key,
- java.lang.String defaultValue) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- java.util.Map map =
- internalGetParameters().getMap();
- return map.containsKey(key) ? map.get(key) : defaultValue;
- }
- /**
- * map<string, string> parameters = 8;
- */
-
- public java.lang.String getParametersOrThrow(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- java.util.Map map =
- internalGetParameters().getMap();
- if (!map.containsKey(key)) {
- throw new java.lang.IllegalArgumentException();
- }
- return map.get(key);
- }
-
- public Builder clearParameters() {
- getMutableParameters().clear();
- return this;
- }
- /**
- * map<string, string> parameters = 8;
- */
-
- public Builder removeParameters(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- getMutableParameters().remove(key);
- return this;
- }
- /**
- * Use alternate mutation accessors instead.
- */
- @java.lang.Deprecated
- public java.util.Map
- getMutableParameters() {
- return internalGetMutableParameters().getMutableMap();
- }
- /**
- * map<string, string> parameters = 8;
- */
- public Builder putParameters(
- java.lang.String key,
- java.lang.String value) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- if (value == null) { throw new java.lang.NullPointerException(); }
- getMutableParameters().put(key, value);
- return this;
- }
- /**
- * map<string, string> parameters = 8;
- */
-
- public Builder putAllParameters(
- java.util.Map values) {
- getMutableParameters().putAll(values);
- return this;
- }
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
@@ -1620,12 +1316,12 @@ public final class TraceProtocol {
}
// @@protoc_insertion_point(class_scope:AckSpan)
- private static final TraceProtocol.AckSpan DEFAULT_INSTANCE;
+ private static final com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new TraceProtocol.AckSpan();
+ DEFAULT_INSTANCE = new com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan();
}
- public static TraceProtocol.AckSpan getDefaultInstance() {
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -1648,7 +1344,7 @@ public final class TraceProtocol {
return PARSER;
}
- public TraceProtocol.AckSpan getDefaultInstanceForType() {
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.AckSpan getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -1812,63 +1508,29 @@ public final class TraceProtocol {
getAgentIdBytes();
/**
- * map<string, string> parameters = 13;
- */
- int getParametersCount();
- /**
- * map<string, string> parameters = 13;
- */
- boolean containsParameters(
- java.lang.String key);
- /**
- * Use {@link #getParametersMap()} instead.
- */
- @java.lang.Deprecated
- java.util.Map
- getParameters();
- /**
- * map<string, string> parameters = 13;
- */
- java.util.Map
- getParametersMap();
- /**
- * map<string, string> parameters = 13;
- */
-
- java.lang.String getParametersOrDefault(
- java.lang.String key,
- java.lang.String defaultValue);
- /**
- * map<string, string> parameters = 13;
- */
-
- java.lang.String getParametersOrThrow(
- java.lang.String key);
-
- /**
- * required string processNo = 14;
+ * required string processNo = 13;
*/
boolean hasProcessNo();
/**
- * required string processNo = 14;
+ * required string processNo = 13;
*/
java.lang.String getProcessNo();
/**
- * required string processNo = 14;
+ * required string processNo = 13;
*/
com.google.protobuf.ByteString
getProcessNoBytes();
/**
- * required string address = 15;
+ * required string address = 14;
*/
boolean hasAddress();
/**
- * required string address = 15;
+ * required string address = 14;
*/
java.lang.String getAddress();
/**
- * required string address = 15;
+ * required string address = 14;
*/
com.google.protobuf.ByteString
getAddressBytes();
@@ -1999,24 +1661,12 @@ public final class TraceProtocol {
break;
}
case 106: {
- if (!((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
- parameters_ = com.google.protobuf.MapField.newMapField(
- ParametersDefaultEntryHolder.defaultEntry);
- mutable_bitField0_ |= 0x00001000;
- }
- com.google.protobuf.MapEntry
- parameters = input.readMessage(
- ParametersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
- parameters_.getMutableMap().put(parameters.getKey(), parameters.getValue());
- break;
- }
- case 114: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00001000;
processNo_ = bs;
break;
}
- case 122: {
+ case 114: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00002000;
address_ = bs;
@@ -2036,25 +1686,14 @@ public final class TraceProtocol {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return TraceProtocol.internal_static_RequestSpan_descriptor;
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_RequestSpan_descriptor;
}
- @SuppressWarnings({"rawtypes"})
- protected com.google.protobuf.MapField internalGetMapField(
- int number) {
- switch (number) {
- case 13:
- return internalGetParameters();
- default:
- throw new RuntimeException(
- "Invalid map field number: " + number);
- }
- }
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return TraceProtocol.internal_static_RequestSpan_fieldAccessorTable
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_RequestSpan_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- TraceProtocol.RequestSpan.class, TraceProtocol.RequestSpan.Builder.class);
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan.class, com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan.Builder.class);
}
private int bitField0_;
@@ -2481,92 +2120,16 @@ public final class TraceProtocol {
}
}
- public static final int PARAMETERS_FIELD_NUMBER = 13;
- private static final class ParametersDefaultEntryHolder {
- static final com.google.protobuf.MapEntry<
- java.lang.String, java.lang.String> defaultEntry =
- com.google.protobuf.MapEntry
- .newDefaultInstance(
- TraceProtocol.internal_static_RequestSpan_ParametersEntry_descriptor,
- com.google.protobuf.WireFormat.FieldType.STRING,
- "",
- com.google.protobuf.WireFormat.FieldType.STRING,
- "");
- }
- private com.google.protobuf.MapField<
- java.lang.String, java.lang.String> parameters_;
- private com.google.protobuf.MapField
- internalGetParameters() {
- if (parameters_ == null) {
- return com.google.protobuf.MapField.emptyMapField(
- ParametersDefaultEntryHolder.defaultEntry);
- }
- return parameters_;
- }
-
- public int getParametersCount() {
- return internalGetParameters().getMap().size();
- }
- /**
- * map<string, string> parameters = 13;
- */
-
- public boolean containsParameters(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- return internalGetParameters().getMap().containsKey(key);
- }
- /**
- * Use {@link #getParametersMap()} instead.
- */
- @java.lang.Deprecated
- public java.util.Map getParameters() {
- return getParametersMap();
- }
- /**
- * map<string, string> parameters = 13;
- */
-
- public java.util.Map getParametersMap() {
- return internalGetParameters().getMap();
- }
- /**
- * map<string, string> parameters = 13;
- */
-
- public java.lang.String getParametersOrDefault(
- java.lang.String key,
- java.lang.String defaultValue) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- java.util.Map map =
- internalGetParameters().getMap();
- return map.containsKey(key) ? map.get(key) : defaultValue;
- }
- /**
- * map<string, string> parameters = 13;
- */
-
- public java.lang.String getParametersOrThrow(
- java.lang.String key) {
- if (key == null) { throw new java.lang.NullPointerException(); }
- java.util.Map map =
- internalGetParameters().getMap();
- if (!map.containsKey(key)) {
- throw new java.lang.IllegalArgumentException();
- }
- return map.get(key);
- }
-
- public static final int PROCESSNO_FIELD_NUMBER = 14;
+ public static final int PROCESSNO_FIELD_NUMBER = 13;
private volatile java.lang.Object processNo_;
/**
- * required string processNo = 14;
+ * required string processNo = 13;
*/
public boolean hasProcessNo() {
return ((bitField0_ & 0x00001000) == 0x00001000);
}
/**
- * required string processNo = 14;
+ * required string processNo = 13;
*/
public java.lang.String getProcessNo() {
java.lang.Object ref = processNo_;
@@ -2583,7 +2146,7 @@ public final class TraceProtocol {
}
}
/**
- * required string processNo = 14;
+ * required string processNo = 13;
*/
public com.google.protobuf.ByteString
getProcessNoBytes() {
@@ -2599,16 +2162,16 @@ public final class TraceProtocol {
}
}
- public static final int ADDRESS_FIELD_NUMBER = 15;
+ public static final int ADDRESS_FIELD_NUMBER = 14;
private volatile java.lang.Object address_;
/**
- * required string address = 15;
+ * required string address = 14;
*/
public boolean hasAddress() {
return ((bitField0_ & 0x00002000) == 0x00002000);
}
/**
- * required string address = 15;
+ * required string address = 14;
*/
public java.lang.String getAddress() {
java.lang.Object ref = address_;
@@ -2625,7 +2188,7 @@ public final class TraceProtocol {
}
}
/**
- * required string address = 15;
+ * required string address = 14;
*/
public com.google.protobuf.ByteString
getAddressBytes() {
@@ -2737,20 +2300,11 @@ public final class TraceProtocol {
if (((bitField0_ & 0x00000800) == 0x00000800)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, agentId_);
}
- for (java.util.Map.Entry entry
- : internalGetParameters().getMap().entrySet()) {
- com.google.protobuf.MapEntry
- parameters = ParametersDefaultEntryHolder.defaultEntry.newBuilderForType()
- .setKey(entry.getKey())
- .setValue(entry.getValue())
- .build();
- output.writeMessage(13, parameters);
- }
if (((bitField0_ & 0x00001000) == 0x00001000)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 14, processNo_);
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 13, processNo_);
}
if (((bitField0_ & 0x00002000) == 0x00002000)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 15, address_);
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 14, address_);
}
unknownFields.writeTo(output);
}
@@ -2799,21 +2353,11 @@ public final class TraceProtocol {
if (((bitField0_ & 0x00000800) == 0x00000800)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, agentId_);
}
- for (java.util.Map.Entry entry
- : internalGetParameters().getMap().entrySet()) {
- com.google.protobuf.MapEntry
- parameters = ParametersDefaultEntryHolder.defaultEntry.newBuilderForType()
- .setKey(entry.getKey())
- .setValue(entry.getValue())
- .build();
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(13, parameters);
- }
if (((bitField0_ & 0x00001000) == 0x00001000)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, processNo_);
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, processNo_);
}
if (((bitField0_ & 0x00002000) == 0x00002000)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, address_);
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, address_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
@@ -2826,10 +2370,10 @@ public final class TraceProtocol {
if (obj == this) {
return true;
}
- if (!(obj instanceof TraceProtocol.RequestSpan)) {
+ if (!(obj instanceof com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan)) {
return super.equals(obj);
}
- TraceProtocol.RequestSpan other = (TraceProtocol.RequestSpan) obj;
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan other = (com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan) obj;
boolean result = true;
result = result && (hasTraceId() == other.hasTraceId());
@@ -2892,8 +2436,6 @@ public final class TraceProtocol {
result = result && getAgentId()
.equals(other.getAgentId());
}
- result = result && internalGetParameters().equals(
- other.internalGetParameters());
result = result && (hasProcessNo() == other.hasProcessNo());
if (hasProcessNo()) {
result = result && getProcessNo()
@@ -2964,10 +2506,6 @@ public final class TraceProtocol {
hash = (37 * hash) + AGENTID_FIELD_NUMBER;
hash = (53 * hash) + getAgentId().hashCode();
}
- if (!internalGetParameters().getMap().isEmpty()) {
- hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
- hash = (53 * hash) + internalGetParameters().hashCode();
- }
if (hasProcessNo()) {
hash = (37 * hash) + PROCESSNO_FIELD_NUMBER;
hash = (53 * hash) + getProcessNo().hashCode();
@@ -2981,58 +2519,58 @@ public final class TraceProtocol {
return hash;
}
- public static TraceProtocol.RequestSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static TraceProtocol.RequestSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static TraceProtocol.RequestSpan parseFrom(byte[] data)
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static TraceProtocol.RequestSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static TraceProtocol.RequestSpan parseFrom(java.io.InputStream input)
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static TraceProtocol.RequestSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static TraceProtocol.RequestSpan parseDelimitedFrom(java.io.InputStream input)
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static TraceProtocol.RequestSpan parseDelimitedFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static TraceProtocol.RequestSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static TraceProtocol.RequestSpan parseFrom(
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -3044,7 +2582,7 @@ public final class TraceProtocol {
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(TraceProtocol.RequestSpan prototype) {
+ public static Builder newBuilder(com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
@@ -3064,42 +2602,20 @@ public final class TraceProtocol {
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:RequestSpan)
- TraceProtocol.RequestSpanOrBuilder {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpanOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return TraceProtocol.internal_static_RequestSpan_descriptor;
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_RequestSpan_descriptor;
}
- @SuppressWarnings({"rawtypes"})
- protected com.google.protobuf.MapField internalGetMapField(
- int number) {
- switch (number) {
- case 13:
- return internalGetParameters();
- default:
- throw new RuntimeException(
- "Invalid map field number: " + number);
- }
- }
- @SuppressWarnings({"rawtypes"})
- protected com.google.protobuf.MapField internalGetMutableMapField(
- int number) {
- switch (number) {
- case 13:
- return internalGetMutableParameters();
- default:
- throw new RuntimeException(
- "Invalid map field number: " + number);
- }
- }
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return TraceProtocol.internal_static_RequestSpan_fieldAccessorTable
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_RequestSpan_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- TraceProtocol.RequestSpan.class, TraceProtocol.RequestSpan.Builder.class);
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan.class, com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan.Builder.class);
}
- // Construct using TraceProtocol.RequestSpan.newBuilder()
+ // Construct using com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -3140,33 +2656,32 @@ public final class TraceProtocol {
bitField0_ = (bitField0_ & ~0x00000400);
agentId_ = "";
bitField0_ = (bitField0_ & ~0x00000800);
- internalGetMutableParameters().clear();
processNo_ = "";
- bitField0_ = (bitField0_ & ~0x00002000);
+ bitField0_ = (bitField0_ & ~0x00001000);
address_ = "";
- bitField0_ = (bitField0_ & ~0x00004000);
+ bitField0_ = (bitField0_ & ~0x00002000);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return TraceProtocol.internal_static_RequestSpan_descriptor;
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_RequestSpan_descriptor;
}
- public TraceProtocol.RequestSpan getDefaultInstanceForType() {
- return TraceProtocol.RequestSpan.getDefaultInstance();
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan getDefaultInstanceForType() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan.getDefaultInstance();
}
- public TraceProtocol.RequestSpan build() {
- TraceProtocol.RequestSpan result = buildPartial();
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan build() {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
- public TraceProtocol.RequestSpan buildPartial() {
- TraceProtocol.RequestSpan result = new TraceProtocol.RequestSpan(this);
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan buildPartial() {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan result = new com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
@@ -3217,13 +2732,11 @@ public final class TraceProtocol {
to_bitField0_ |= 0x00000800;
}
result.agentId_ = agentId_;
- result.parameters_ = internalGetParameters();
- result.parameters_.makeImmutable();
- if (((from_bitField0_ & 0x00002000) == 0x00002000)) {
+ if (((from_bitField0_ & 0x00001000) == 0x00001000)) {
to_bitField0_ |= 0x00001000;
}
result.processNo_ = processNo_;
- if (((from_bitField0_ & 0x00004000) == 0x00004000)) {
+ if (((from_bitField0_ & 0x00002000) == 0x00002000)) {
to_bitField0_ |= 0x00002000;
}
result.address_ = address_;
@@ -3259,16 +2772,16 @@ public final class TraceProtocol {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof TraceProtocol.RequestSpan) {
- return mergeFrom((TraceProtocol.RequestSpan)other);
+ if (other instanceof com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan) {
+ return mergeFrom((com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(TraceProtocol.RequestSpan other) {
- if (other == TraceProtocol.RequestSpan.getDefaultInstance()) return this;
+ public Builder mergeFrom(com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan other) {
+ if (other == com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan.getDefaultInstance()) return this;
if (other.hasTraceId()) {
bitField0_ |= 0x00000001;
traceId_ = other.traceId_;
@@ -3323,15 +2836,13 @@ public final class TraceProtocol {
agentId_ = other.agentId_;
onChanged();
}
- internalGetMutableParameters().mergeFrom(
- other.internalGetParameters());
if (other.hasProcessNo()) {
- bitField0_ |= 0x00002000;
+ bitField0_ |= 0x00001000;
processNo_ = other.processNo_;
onChanged();
}
if (other.hasAddress()) {
- bitField0_ |= 0x00004000;
+ bitField0_ |= 0x00002000;
address_ = other.address_;
onChanged();
}
@@ -3384,11 +2895,11 @@ public final class TraceProtocol {
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- TraceProtocol.RequestSpan parsedMessage = null;
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (TraceProtocol.RequestSpan) e.getUnfinishedMessage();
+ parsedMessage = (com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -4179,6 +3690,1059 @@ public final class TraceProtocol {
return this;
}
+ private java.lang.Object processNo_ = "";
+ /**
+ * required string processNo = 13;
+ */
+ public boolean hasProcessNo() {
+ return ((bitField0_ & 0x00001000) == 0x00001000);
+ }
+ /**
+ * required string processNo = 13;
+ */
+ public java.lang.String getProcessNo() {
+ java.lang.Object ref = processNo_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ processNo_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * required string processNo = 13;
+ */
+ public com.google.protobuf.ByteString
+ getProcessNoBytes() {
+ java.lang.Object ref = processNo_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ processNo_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * required string processNo = 13;
+ */
+ public Builder setProcessNo(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00001000;
+ processNo_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required string processNo = 13;
+ */
+ public Builder clearProcessNo() {
+ bitField0_ = (bitField0_ & ~0x00001000);
+ processNo_ = getDefaultInstance().getProcessNo();
+ onChanged();
+ return this;
+ }
+ /**
+ * required string processNo = 13;
+ */
+ public Builder setProcessNoBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00001000;
+ processNo_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object address_ = "";
+ /**
+ * required string address = 14;
+ */
+ public boolean hasAddress() {
+ return ((bitField0_ & 0x00002000) == 0x00002000);
+ }
+ /**
+ * required string address = 14;
+ */
+ public java.lang.String getAddress() {
+ java.lang.Object ref = address_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ address_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * required string address = 14;
+ */
+ public com.google.protobuf.ByteString
+ getAddressBytes() {
+ java.lang.Object ref = address_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ address_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * required string address = 14;
+ */
+ public Builder setAddress(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00002000;
+ address_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required string address = 14;
+ */
+ public Builder clearAddress() {
+ bitField0_ = (bitField0_ & ~0x00002000);
+ address_ = getDefaultInstance().getAddress();
+ onChanged();
+ return this;
+ }
+ /**
+ * required string address = 14;
+ */
+ public Builder setAddressBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00002000;
+ address_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:RequestSpan)
+ }
+
+ // @@protoc_insertion_point(class_scope:RequestSpan)
+ private static final com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan();
+ }
+
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ public RequestSpan parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new RequestSpan(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.RequestSpan getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface InputParametersSpanOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:InputParametersSpan)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required string traceId = 1;
+ */
+ boolean hasTraceId();
+ /**
+ * required string traceId = 1;
+ */
+ java.lang.String getTraceId();
+ /**
+ * required string traceId = 1;
+ */
+ com.google.protobuf.ByteString
+ getTraceIdBytes();
+
+ /**
+ * optional string traceLevelId = 2;
+ */
+ boolean hasTraceLevelId();
+ /**
+ * optional string traceLevelId = 2;
+ */
+ java.lang.String getTraceLevelId();
+ /**
+ * optional string traceLevelId = 2;
+ */
+ com.google.protobuf.ByteString
+ getTraceLevelIdBytes();
+
+ /**
+ * map<string, string> parameters = 3;
+ */
+ int getParametersCount();
+ /**
+ * map<string, string> parameters = 3;
+ */
+ boolean containsParameters(
+ java.lang.String key);
+ /**
+ * Use {@link #getParametersMap()} instead.
+ */
+ @java.lang.Deprecated
+ java.util.Map
+ getParameters();
+ /**
+ * map<string, string> parameters = 3;
+ */
+ java.util.Map
+ getParametersMap();
+ /**
+ * map<string, string> parameters = 3;
+ */
+
+ java.lang.String getParametersOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue);
+ /**
+ * map<string, string> parameters = 3;
+ */
+
+ java.lang.String getParametersOrThrow(
+ java.lang.String key);
+ }
+ /**
+ * Protobuf type {@code InputParametersSpan}
+ */
+ public static final class InputParametersSpan extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:InputParametersSpan)
+ InputParametersSpanOrBuilder {
+ // Use InputParametersSpan.newBuilder() to construct.
+ private InputParametersSpan(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private InputParametersSpan() {
+ traceId_ = "";
+ traceLevelId_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private InputParametersSpan(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000001;
+ traceId_ = bs;
+ break;
+ }
+ case 18: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000002;
+ traceLevelId_ = bs;
+ break;
+ }
+ case 26: {
+ if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ parameters_ = com.google.protobuf.MapField.newMapField(
+ ParametersDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000004;
+ }
+ com.google.protobuf.MapEntry
+ parameters = input.readMessage(
+ ParametersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+ parameters_.getMutableMap().put(parameters.getKey(), parameters.getValue());
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_InputParametersSpan_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 3:
+ return internalGetParameters();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_InputParametersSpan_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan.class, com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int TRACEID_FIELD_NUMBER = 1;
+ private volatile java.lang.Object traceId_;
+ /**
+ * required string traceId = 1;
+ */
+ public boolean hasTraceId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required string traceId = 1;
+ */
+ public java.lang.String getTraceId() {
+ java.lang.Object ref = traceId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ traceId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * required string traceId = 1;
+ */
+ public com.google.protobuf.ByteString
+ getTraceIdBytes() {
+ java.lang.Object ref = traceId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ traceId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TRACELEVELID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object traceLevelId_;
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public boolean hasTraceLevelId() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public java.lang.String getTraceLevelId() {
+ java.lang.Object ref = traceLevelId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ traceLevelId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public com.google.protobuf.ByteString
+ getTraceLevelIdBytes() {
+ java.lang.Object ref = traceLevelId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ traceLevelId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PARAMETERS_FIELD_NUMBER = 3;
+ private static final class ParametersDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, java.lang.String> defaultEntry =
+ com.google.protobuf.MapEntry
+ .newDefaultInstance(
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_InputParametersSpan_ParametersEntry_descriptor,
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "",
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "");
+ }
+ private com.google.protobuf.MapField<
+ java.lang.String, java.lang.String> parameters_;
+ private com.google.protobuf.MapField
+ internalGetParameters() {
+ if (parameters_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ ParametersDefaultEntryHolder.defaultEntry);
+ }
+ return parameters_;
+ }
+
+ public int getParametersCount() {
+ return internalGetParameters().getMap().size();
+ }
+ /**
+ * map<string, string> parameters = 3;
+ */
+
+ public boolean containsParameters(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ return internalGetParameters().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getParametersMap()} instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Map getParameters() {
+ return getParametersMap();
+ }
+ /**
+ * map<string, string> parameters = 3;
+ */
+
+ public java.util.Map getParametersMap() {
+ return internalGetParameters().getMap();
+ }
+ /**
+ * map<string, string> parameters = 3;
+ */
+
+ public java.lang.String getParametersOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map map =
+ internalGetParameters().getMap();
+ return map.containsKey(key) ? map.get(key) : defaultValue;
+ }
+ /**
+ * map<string, string> parameters = 3;
+ */
+
+ public java.lang.String getParametersOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map map =
+ internalGetParameters().getMap();
+ if (!map.containsKey(key)) {
+ throw new java.lang.IllegalArgumentException();
+ }
+ return map.get(key);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasTraceId()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, traceId_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, traceLevelId_);
+ }
+ for (java.util.Map.Entry entry
+ : internalGetParameters().getMap().entrySet()) {
+ com.google.protobuf.MapEntry
+ parameters = ParametersDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ output.writeMessage(3, parameters);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, traceId_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, traceLevelId_);
+ }
+ for (java.util.Map.Entry entry
+ : internalGetParameters().getMap().entrySet()) {
+ com.google.protobuf.MapEntry
+ parameters = ParametersDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, parameters);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan)) {
+ return super.equals(obj);
+ }
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan other = (com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan) obj;
+
+ boolean result = true;
+ result = result && (hasTraceId() == other.hasTraceId());
+ if (hasTraceId()) {
+ result = result && getTraceId()
+ .equals(other.getTraceId());
+ }
+ result = result && (hasTraceLevelId() == other.hasTraceLevelId());
+ if (hasTraceLevelId()) {
+ result = result && getTraceLevelId()
+ .equals(other.getTraceLevelId());
+ }
+ result = result && internalGetParameters().equals(
+ other.internalGetParameters());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ if (hasTraceId()) {
+ hash = (37 * hash) + TRACEID_FIELD_NUMBER;
+ hash = (53 * hash) + getTraceId().hashCode();
+ }
+ if (hasTraceLevelId()) {
+ hash = (37 * hash) + TRACELEVELID_FIELD_NUMBER;
+ hash = (53 * hash) + getTraceLevelId().hashCode();
+ }
+ if (!internalGetParameters().getMap().isEmpty()) {
+ hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
+ hash = (53 * hash) + internalGetParameters().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code InputParametersSpan}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:InputParametersSpan)
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpanOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_InputParametersSpan_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 3:
+ return internalGetParameters();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMutableMapField(
+ int number) {
+ switch (number) {
+ case 3:
+ return internalGetMutableParameters();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_InputParametersSpan_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan.class, com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan.Builder.class);
+ }
+
+ // Construct using com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ traceId_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ traceLevelId_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ internalGetMutableParameters().clear();
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_InputParametersSpan_descriptor;
+ }
+
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan getDefaultInstanceForType() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan.getDefaultInstance();
+ }
+
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan build() {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan buildPartial() {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan result = new com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.traceId_ = traceId_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.traceLevelId_ = traceLevelId_;
+ result.parameters_ = internalGetParameters();
+ result.parameters_.makeImmutable();
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan) {
+ return mergeFrom((com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan other) {
+ if (other == com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan.getDefaultInstance()) return this;
+ if (other.hasTraceId()) {
+ bitField0_ |= 0x00000001;
+ traceId_ = other.traceId_;
+ onChanged();
+ }
+ if (other.hasTraceLevelId()) {
+ bitField0_ |= 0x00000002;
+ traceLevelId_ = other.traceLevelId_;
+ onChanged();
+ }
+ internalGetMutableParameters().mergeFrom(
+ other.internalGetParameters());
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasTraceId()) {
+ return false;
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object traceId_ = "";
+ /**
+ * required string traceId = 1;
+ */
+ public boolean hasTraceId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required string traceId = 1;
+ */
+ public java.lang.String getTraceId() {
+ java.lang.Object ref = traceId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ traceId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * required string traceId = 1;
+ */
+ public com.google.protobuf.ByteString
+ getTraceIdBytes() {
+ java.lang.Object ref = traceId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ traceId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * required string traceId = 1;
+ */
+ public Builder setTraceId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ traceId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required string traceId = 1;
+ */
+ public Builder clearTraceId() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ traceId_ = getDefaultInstance().getTraceId();
+ onChanged();
+ return this;
+ }
+ /**
+ * required string traceId = 1;
+ */
+ public Builder setTraceIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ traceId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object traceLevelId_ = "";
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public boolean hasTraceLevelId() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public java.lang.String getTraceLevelId() {
+ java.lang.Object ref = traceLevelId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ traceLevelId_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public com.google.protobuf.ByteString
+ getTraceLevelIdBytes() {
+ java.lang.Object ref = traceLevelId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ traceLevelId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public Builder setTraceLevelId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ traceLevelId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public Builder clearTraceLevelId() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ traceLevelId_ = getDefaultInstance().getTraceLevelId();
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public Builder setTraceLevelIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ traceLevelId_ = value;
+ onChanged();
+ return this;
+ }
+
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> parameters_;
private com.google.protobuf.MapField
@@ -4206,7 +4770,7 @@ public final class TraceProtocol {
return internalGetParameters().getMap().size();
}
/**
- * map<string, string> parameters = 13;
+ * map<string, string> parameters = 3;
*/
public boolean containsParameters(
@@ -4222,14 +4786,14 @@ public final class TraceProtocol {
return getParametersMap();
}
/**
- * map<string, string> parameters = 13;
+ * map<string, string> parameters = 3;
*/
public java.util.Map getParametersMap() {
return internalGetParameters().getMap();
}
/**
- * map<string, string> parameters = 13;
+ * map<string, string> parameters = 3;
*/
public java.lang.String getParametersOrDefault(
@@ -4241,7 +4805,7 @@ public final class TraceProtocol {
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
- * map<string, string> parameters = 13;
+ * map<string, string> parameters = 3;
*/
public java.lang.String getParametersOrThrow(
@@ -4260,7 +4824,7 @@ public final class TraceProtocol {
return this;
}
/**
- * map<string, string> parameters = 13;
+ * map<string, string> parameters = 3;
*/
public Builder removeParameters(
@@ -4278,7 +4842,7 @@ public final class TraceProtocol {
return internalGetMutableParameters().getMutableMap();
}
/**
- * map<string, string> parameters = 13;
+ * map<string, string> parameters = 3;
*/
public Builder putParameters(
java.lang.String key,
@@ -4289,7 +4853,7 @@ public final class TraceProtocol {
return this;
}
/**
- * map<string, string> parameters = 13;
+ * map<string, string> parameters = 3;
*/
public Builder putAllParameters(
@@ -4297,25 +4861,685 @@ public final class TraceProtocol {
getMutableParameters().putAll(values);
return this;
}
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
- private java.lang.Object processNo_ = "";
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:InputParametersSpan)
+ }
+
+ // @@protoc_insertion_point(class_scope:InputParametersSpan)
+ private static final com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan();
+ }
+
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ public InputParametersSpan parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new InputParametersSpan(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.InputParametersSpan getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface OutputParametersSpanOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:OutputParametersSpan)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required string traceId = 1;
+ */
+ boolean hasTraceId();
+ /**
+ * required string traceId = 1;
+ */
+ java.lang.String getTraceId();
+ /**
+ * required string traceId = 1;
+ */
+ com.google.protobuf.ByteString
+ getTraceIdBytes();
+
+ /**
+ * optional string traceLevelId = 2;
+ */
+ boolean hasTraceLevelId();
+ /**
+ * optional string traceLevelId = 2;
+ */
+ java.lang.String getTraceLevelId();
+ /**
+ * optional string traceLevelId = 2;
+ */
+ com.google.protobuf.ByteString
+ getTraceLevelIdBytes();
+
+ /**
+ * required string outputParameter = 3;
+ */
+ boolean hasOutputParameter();
+ /**
+ * required string outputParameter = 3;
+ */
+ java.lang.String getOutputParameter();
+ /**
+ * required string outputParameter = 3;
+ */
+ com.google.protobuf.ByteString
+ getOutputParameterBytes();
+ }
+ /**
+ * Protobuf type {@code OutputParametersSpan}
+ */
+ public static final class OutputParametersSpan extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:OutputParametersSpan)
+ OutputParametersSpanOrBuilder {
+ // Use OutputParametersSpan.newBuilder() to construct.
+ private OutputParametersSpan(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private OutputParametersSpan() {
+ traceId_ = "";
+ traceLevelId_ = "";
+ outputParameter_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private OutputParametersSpan(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000001;
+ traceId_ = bs;
+ break;
+ }
+ case 18: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000002;
+ traceLevelId_ = bs;
+ break;
+ }
+ case 26: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000004;
+ outputParameter_ = bs;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_OutputParametersSpan_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_OutputParametersSpan_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan.class, com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int TRACEID_FIELD_NUMBER = 1;
+ private volatile java.lang.Object traceId_;
+ /**
+ * required string traceId = 1;
+ */
+ public boolean hasTraceId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required string traceId = 1;
+ */
+ public java.lang.String getTraceId() {
+ java.lang.Object ref = traceId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ traceId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * required string traceId = 1;
+ */
+ public com.google.protobuf.ByteString
+ getTraceIdBytes() {
+ java.lang.Object ref = traceId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ traceId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TRACELEVELID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object traceLevelId_;
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public boolean hasTraceLevelId() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public java.lang.String getTraceLevelId() {
+ java.lang.Object ref = traceLevelId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ traceLevelId_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string traceLevelId = 2;
+ */
+ public com.google.protobuf.ByteString
+ getTraceLevelIdBytes() {
+ java.lang.Object ref = traceLevelId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ traceLevelId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int OUTPUTPARAMETER_FIELD_NUMBER = 3;
+ private volatile java.lang.Object outputParameter_;
+ /**
+ * required string outputParameter = 3;
+ */
+ public boolean hasOutputParameter() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * required string outputParameter = 3;
+ */
+ public java.lang.String getOutputParameter() {
+ java.lang.Object ref = outputParameter_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ outputParameter_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * required string outputParameter = 3;
+ */
+ public com.google.protobuf.ByteString
+ getOutputParameterBytes() {
+ java.lang.Object ref = outputParameter_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ outputParameter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasTraceId()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasOutputParameter()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, traceId_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, traceLevelId_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, outputParameter_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, traceId_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, traceLevelId_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, outputParameter_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan)) {
+ return super.equals(obj);
+ }
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan other = (com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan) obj;
+
+ boolean result = true;
+ result = result && (hasTraceId() == other.hasTraceId());
+ if (hasTraceId()) {
+ result = result && getTraceId()
+ .equals(other.getTraceId());
+ }
+ result = result && (hasTraceLevelId() == other.hasTraceLevelId());
+ if (hasTraceLevelId()) {
+ result = result && getTraceLevelId()
+ .equals(other.getTraceLevelId());
+ }
+ result = result && (hasOutputParameter() == other.hasOutputParameter());
+ if (hasOutputParameter()) {
+ result = result && getOutputParameter()
+ .equals(other.getOutputParameter());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ if (hasTraceId()) {
+ hash = (37 * hash) + TRACEID_FIELD_NUMBER;
+ hash = (53 * hash) + getTraceId().hashCode();
+ }
+ if (hasTraceLevelId()) {
+ hash = (37 * hash) + TRACELEVELID_FIELD_NUMBER;
+ hash = (53 * hash) + getTraceLevelId().hashCode();
+ }
+ if (hasOutputParameter()) {
+ hash = (37 * hash) + OUTPUTPARAMETER_FIELD_NUMBER;
+ hash = (53 * hash) + getOutputParameter().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code OutputParametersSpan}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:OutputParametersSpan)
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpanOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_OutputParametersSpan_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_OutputParametersSpan_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan.class, com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan.Builder.class);
+ }
+
+ // Construct using com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ traceId_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ traceLevelId_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ outputParameter_ = "";
+ bitField0_ = (bitField0_ & ~0x00000004);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.internal_static_OutputParametersSpan_descriptor;
+ }
+
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan getDefaultInstanceForType() {
+ return com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan.getDefaultInstance();
+ }
+
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan build() {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan buildPartial() {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan result = new com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.traceId_ = traceId_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.traceLevelId_ = traceLevelId_;
+ if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ result.outputParameter_ = outputParameter_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan) {
+ return mergeFrom((com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan other) {
+ if (other == com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan.getDefaultInstance()) return this;
+ if (other.hasTraceId()) {
+ bitField0_ |= 0x00000001;
+ traceId_ = other.traceId_;
+ onChanged();
+ }
+ if (other.hasTraceLevelId()) {
+ bitField0_ |= 0x00000002;
+ traceLevelId_ = other.traceLevelId_;
+ onChanged();
+ }
+ if (other.hasOutputParameter()) {
+ bitField0_ |= 0x00000004;
+ outputParameter_ = other.outputParameter_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasTraceId()) {
+ return false;
+ }
+ if (!hasOutputParameter()) {
+ return false;
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object traceId_ = "";
/**
- * required string processNo = 14;
+ * required string traceId = 1;
*/
- public boolean hasProcessNo() {
- return ((bitField0_ & 0x00002000) == 0x00002000);
+ public boolean hasTraceId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
- * required string processNo = 14;
+ * required string traceId = 1;
*/
- public java.lang.String getProcessNo() {
- java.lang.Object ref = processNo_;
+ public java.lang.String getTraceId() {
+ java.lang.Object ref = traceId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
- processNo_ = s;
+ traceId_ = s;
}
return s;
} else {
@@ -4323,75 +5547,75 @@ public final class TraceProtocol {
}
}
/**
- * required string processNo = 14;
+ * required string traceId = 1;
*/
public com.google.protobuf.ByteString
- getProcessNoBytes() {
- java.lang.Object ref = processNo_;
+ getTraceIdBytes() {
+ java.lang.Object ref = traceId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
- processNo_ = b;
+ traceId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
- * required string processNo = 14;
+ * required string traceId = 1;
*/
- public Builder setProcessNo(
+ public Builder setTraceId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
- bitField0_ |= 0x00002000;
- processNo_ = value;
+ bitField0_ |= 0x00000001;
+ traceId_ = value;
onChanged();
return this;
}
/**
- * required string processNo = 14;
+ * required string traceId = 1;
*/
- public Builder clearProcessNo() {
- bitField0_ = (bitField0_ & ~0x00002000);
- processNo_ = getDefaultInstance().getProcessNo();
+ public Builder clearTraceId() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ traceId_ = getDefaultInstance().getTraceId();
onChanged();
return this;
}
/**
- * required string processNo = 14;
+ * required string traceId = 1;
*/
- public Builder setProcessNoBytes(
+ public Builder setTraceIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
- bitField0_ |= 0x00002000;
- processNo_ = value;
+ bitField0_ |= 0x00000001;
+ traceId_ = value;
onChanged();
return this;
}
- private java.lang.Object address_ = "";
+ private java.lang.Object traceLevelId_ = "";
/**
- * required string address = 15;
+ * optional string traceLevelId = 2;
*/
- public boolean hasAddress() {
- return ((bitField0_ & 0x00004000) == 0x00004000);
+ public boolean hasTraceLevelId() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
- * required string address = 15;
+ * optional string traceLevelId = 2;
*/
- public java.lang.String getAddress() {
- java.lang.Object ref = address_;
+ public java.lang.String getTraceLevelId() {
+ java.lang.Object ref = traceLevelId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
- address_ = s;
+ traceLevelId_ = s;
}
return s;
} else {
@@ -4399,53 +5623,129 @@ public final class TraceProtocol {
}
}
/**
- * required string address = 15;
+ * optional string traceLevelId = 2;
*/
public com.google.protobuf.ByteString
- getAddressBytes() {
- java.lang.Object ref = address_;
+ getTraceLevelIdBytes() {
+ java.lang.Object ref = traceLevelId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
- address_ = b;
+ traceLevelId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
- * required string address = 15;
+ * optional string traceLevelId = 2;
*/
- public Builder setAddress(
+ public Builder setTraceLevelId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
- bitField0_ |= 0x00004000;
- address_ = value;
+ bitField0_ |= 0x00000002;
+ traceLevelId_ = value;
onChanged();
return this;
}
/**
- * required string address = 15;
+ * optional string traceLevelId = 2;
*/
- public Builder clearAddress() {
- bitField0_ = (bitField0_ & ~0x00004000);
- address_ = getDefaultInstance().getAddress();
+ public Builder clearTraceLevelId() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ traceLevelId_ = getDefaultInstance().getTraceLevelId();
onChanged();
return this;
}
/**
- * required string address = 15;
+ * optional string traceLevelId = 2;
*/
- public Builder setAddressBytes(
+ public Builder setTraceLevelIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
- bitField0_ |= 0x00004000;
- address_ = value;
+ bitField0_ |= 0x00000002;
+ traceLevelId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object outputParameter_ = "";
+ /**
+ * required string outputParameter = 3;
+ */
+ public boolean hasOutputParameter() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * required string outputParameter = 3;
+ */
+ public java.lang.String getOutputParameter() {
+ java.lang.Object ref = outputParameter_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ outputParameter_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * required string outputParameter = 3;
+ */
+ public com.google.protobuf.ByteString
+ getOutputParameterBytes() {
+ java.lang.Object ref = outputParameter_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ outputParameter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * required string outputParameter = 3;
+ */
+ public Builder setOutputParameter(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ outputParameter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required string outputParameter = 3;
+ */
+ public Builder clearOutputParameter() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ outputParameter_ = getDefaultInstance().getOutputParameter();
+ onChanged();
+ return this;
+ }
+ /**
+ * required string outputParameter = 3;
+ */
+ public Builder setOutputParameterBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ outputParameter_ = value;
onChanged();
return this;
}
@@ -4460,39 +5760,39 @@ public final class TraceProtocol {
}
- // @@protoc_insertion_point(builder_scope:RequestSpan)
+ // @@protoc_insertion_point(builder_scope:OutputParametersSpan)
}
- // @@protoc_insertion_point(class_scope:RequestSpan)
- private static final TraceProtocol.RequestSpan DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:OutputParametersSpan)
+ private static final com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new TraceProtocol.RequestSpan();
+ DEFAULT_INSTANCE = new com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan();
}
- public static TraceProtocol.RequestSpan getDefaultInstance() {
+ public static com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan getDefaultInstance() {
return DEFAULT_INSTANCE;
}
- @java.lang.Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- public RequestSpan parsePartialFrom(
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ public OutputParametersSpan parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new RequestSpan(input, extensionRegistry);
+ return new OutputParametersSpan(input, extensionRegistry);
}
};
- public static com.google.protobuf.Parser parser() {
+ public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
+ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
- public TraceProtocol.RequestSpan getDefaultInstanceForType() {
+ public com.a.eye.skywalking.protocol.proto.TraceProtocol.OutputParametersSpan getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -4503,21 +5803,26 @@ public final class TraceProtocol {
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_AckSpan_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_AckSpan_ParametersEntry_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_AckSpan_ParametersEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_RequestSpan_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_RequestSpan_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_RequestSpan_ParametersEntry_descriptor;
+ internal_static_InputParametersSpan_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_RequestSpan_ParametersEntry_fieldAccessorTable;
+ internal_static_InputParametersSpan_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_InputParametersSpan_ParametersEntry_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_InputParametersSpan_ParametersEntry_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_OutputParametersSpan_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_OutputParametersSpan_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
@@ -4527,24 +5832,25 @@ public final class TraceProtocol {
descriptor;
static {
java.lang.String[] descriptorData = {
- "\n\023TraceProtocol.proto\"\360\001\n\007AckSpan\022\017\n\007tra" +
+ "\n\023TraceProtocol.proto\"\217\001\n\007AckSpan\022\017\n\007tra" +
"ceId\030\001 \002(\t\022\023\n\013parentLevel\030\002 \001(\t\022\017\n\007level" +
"Id\030\003 \002(\005\022\014\n\004cost\030\004 \002(\003\022\022\n\nstatusCode\030\005 \002" +
"(\005\022\026\n\016exceptionStack\030\006 \001(\t\022\023\n\013viewpointI" +
- "d\030\007 \002(\t\022,\n\nparameters\030\010 \003(\0132\030.AckSpan.Pa" +
- "rametersEntry\0321\n\017ParametersEntry\022\013\n\003key\030" +
- "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\375\002\n\013RequestSpan" +
- "\022\017\n\007traceId\030\001 \002(\t\022\023\n\013parentLevel\030\002 \001(\t\022\017" +
- "\n\007levelId\030\003 \002(\005\022\023\n\013viewPointId\030\004 \002(\t\022\021\n\t" +
- "startDate\030\005 \002(\003\022\024\n\014spanTypeDesc\030\006 \002(\t\022\020\n",
- "\010callType\030\007 \002(\t\022\020\n\010spanType\030\010 \002(\r\022\025\n\rapp" +
- "licationId\030\t \002(\t\022\016\n\006userId\030\n \002(\t\022\024\n\014buss" +
- "inessKey\030\013 \001(\t\022\017\n\007agentId\030\014 \002(\t\0220\n\nparam" +
- "eters\030\r \003(\0132\034.RequestSpan.ParametersEntr" +
- "y\022\021\n\tprocessNo\030\016 \002(\t\022\017\n\007address\030\017 \002(\t\0321\n" +
- "\017ParametersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" +
- " \001(\t:\0028\001B(\n&com.a.eye.skywalking.prot" +
- "ocol.proto"
+ "d\030\007 \002(\t\"\230\002\n\013RequestSpan\022\017\n\007traceId\030\001 \002(\t" +
+ "\022\023\n\013parentLevel\030\002 \001(\t\022\017\n\007levelId\030\003 \002(\005\022\023" +
+ "\n\013viewPointId\030\004 \002(\t\022\021\n\tstartDate\030\005 \002(\003\022\024" +
+ "\n\014spanTypeDesc\030\006 \002(\t\022\020\n\010callType\030\007 \002(\t\022\020" +
+ "\n\010spanType\030\010 \002(\r\022\025\n\rapplicationId\030\t \002(\t\022" +
+ "\016\n\006userId\030\n \002(\t\022\024\n\014bussinessKey\030\013 \001(\t\022\017\n",
+ "\007agentId\030\014 \002(\t\022\021\n\tprocessNo\030\r \002(\t\022\017\n\007add" +
+ "ress\030\016 \002(\t\"\251\001\n\023InputParametersSpan\022\017\n\007tr" +
+ "aceId\030\001 \002(\t\022\024\n\014traceLevelId\030\002 \001(\t\0228\n\npar" +
+ "ameters\030\003 \003(\0132$.InputParametersSpan.Para" +
+ "metersEntry\0321\n\017ParametersEntry\022\013\n\003key\030\001 " +
+ "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"V\n\024OutputParamete" +
+ "rsSpan\022\017\n\007traceId\030\001 \002(\t\022\024\n\014traceLevelId\030" +
+ "\002 \001(\t\022\027\n\017outputParameter\030\003 \002(\tB%\n#com.a." +
+ "eye.skywalking.protocol.proto"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -4563,25 +5869,31 @@ public final class TraceProtocol {
internal_static_AckSpan_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_AckSpan_descriptor,
- new java.lang.String[] { "TraceId", "ParentLevel", "LevelId", "Cost", "StatusCode", "ExceptionStack", "ViewpointId", "Parameters", });
- internal_static_AckSpan_ParametersEntry_descriptor =
- internal_static_AckSpan_descriptor.getNestedTypes().get(0);
- internal_static_AckSpan_ParametersEntry_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_AckSpan_ParametersEntry_descriptor,
- new java.lang.String[] { "Key", "Value", });
+ new java.lang.String[] { "TraceId", "ParentLevel", "LevelId", "Cost", "StatusCode", "ExceptionStack", "ViewpointId", });
internal_static_RequestSpan_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_RequestSpan_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_RequestSpan_descriptor,
- new java.lang.String[] { "TraceId", "ParentLevel", "LevelId", "ViewPointId", "StartDate", "SpanTypeDesc", "CallType", "SpanType", "ApplicationId", "UserId", "BussinessKey", "AgentId", "Parameters", "ProcessNo", "Address", });
- internal_static_RequestSpan_ParametersEntry_descriptor =
- internal_static_RequestSpan_descriptor.getNestedTypes().get(0);
- internal_static_RequestSpan_ParametersEntry_fieldAccessorTable = new
+ new java.lang.String[] { "TraceId", "ParentLevel", "LevelId", "ViewPointId", "StartDate", "SpanTypeDesc", "CallType", "SpanType", "ApplicationId", "UserId", "BussinessKey", "AgentId", "ProcessNo", "Address", });
+ internal_static_InputParametersSpan_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_InputParametersSpan_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_RequestSpan_ParametersEntry_descriptor,
+ internal_static_InputParametersSpan_descriptor,
+ new java.lang.String[] { "TraceId", "TraceLevelId", "Parameters", });
+ internal_static_InputParametersSpan_ParametersEntry_descriptor =
+ internal_static_InputParametersSpan_descriptor.getNestedTypes().get(0);
+ internal_static_InputParametersSpan_ParametersEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_InputParametersSpan_ParametersEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
+ internal_static_OutputParametersSpan_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_OutputParametersSpan_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_OutputParametersSpan_descriptor,
+ new java.lang.String[] { "TraceId", "TraceLevelId", "OutputParameter", });
}
// @@protoc_insertion_point(outer_class_scope)
diff --git a/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/AckSpan.java b/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/AckSpan.java
index 47c99eecc..89fa335fa 100644
--- a/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/AckSpan.java
+++ b/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/AckSpan.java
@@ -43,10 +43,6 @@ public class AckSpan extends AbstractDataSerializable {
*/
private String exceptionStack = "";
- /**
- * 埋点入参列表,补充时触发
- */
- private Map paramters = new HashMap();
private String viewPointId;
@@ -66,7 +62,6 @@ public class AckSpan extends AbstractDataSerializable {
this.exceptionStack = spanData.getExceptionStack();
this.userId = spanData.getUserId();
this.applicationId = spanData.getApplicationId();
- this.paramters.putAll(spanData.getParameters());
this.viewPointId = spanData.getViewPointId();
}
@@ -133,11 +128,6 @@ public class AckSpan extends AbstractDataSerializable {
builder = TraceProtocol.AckSpan.newBuilder().setTraceId(traceId).setParentLevel(parentLevel).
setLevelId(levelId).setCost(cost).setViewpointId(viewPointId).setStatusCode(statusCode)
.setExceptionStack(exceptionStack);
-
- if (paramters != null && paramters.size() > 0){
- builder.putAllParameters(paramters);
- }
-
return builder.build().toByteArray();
}
@@ -153,7 +143,6 @@ public class AckSpan extends AbstractDataSerializable {
ackSpan.setExceptionStack(ackSpanProtocol.getExceptionStack());
ackSpan.setStatusCode((byte) ackSpanProtocol.getStatusCode());
ackSpan.viewPointId = ackSpanProtocol.getViewpointId();
- ackSpan.paramters = ackSpanProtocol.getParametersMap();
} catch (InvalidProtocolBufferException e) {
throw new ConvertFailedException(e.getMessage(),e);
}
diff --git a/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/InputParametersSpan.java b/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/InputParametersSpan.java
new file mode 100644
index 000000000..158fd1ba0
--- /dev/null
+++ b/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/InputParametersSpan.java
@@ -0,0 +1,105 @@
+package com.a.eye.skywalking.protocol;
+
+import com.a.eye.skywalking.protocol.common.AbstractDataSerializable;
+import com.a.eye.skywalking.protocol.exception.ConvertFailedException;
+import com.a.eye.skywalking.protocol.proto.TraceProtocol;
+import com.google.protobuf.InvalidProtocolBufferException;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class InputParametersSpan extends AbstractDataSerializable {
+
+ private static final InputParametersSpan INSTANCE = new InputParametersSpan();
+
+ private static int parameterIndex = 0;
+ /**
+ * tid,调用链的全局唯一标识
+ */
+ private String traceId;
+ /**
+ * 当前调用链的描述
+ */
+ private String traceLevelId;
+
+ /**
+ * 埋点入参列表,补充时触发
+ */
+ private Map parameters = new HashMap();
+
+
+ public InputParametersSpan() {
+ }
+
+ public InputParametersSpan(String traceId, String traceLevelId) {
+ this.traceLevelId = traceLevelId;
+ this.traceId = traceId;
+ }
+
+ public int getDataType() {
+ return 3;
+ }
+
+ public byte[] getData() {
+ TraceProtocol.InputParametersSpan.Builder builder =
+ TraceProtocol.InputParametersSpan.newBuilder().setTraceId(traceId).setTraceLevelId(traceLevelId);
+
+ if (parameters != null && parameters.size() > 0) {
+ builder.putAllParameters(parameters);
+ }
+
+ return builder.build().toByteArray();
+ }
+
+ public AbstractDataSerializable convertData(byte[] data) throws ConvertFailedException {
+ InputParametersSpan result = new InputParametersSpan();
+ try {
+ TraceProtocol.InputParametersSpan parametersSpan = TraceProtocol.InputParametersSpan.parseFrom(data);
+ result.traceId = parametersSpan.getTraceId();
+ result.traceLevelId = parametersSpan.getTraceLevelId();
+ result.parameters = parametersSpan.getParametersMap();
+ } catch (InvalidProtocolBufferException e) {
+ throw new ConvertFailedException("Failed to convert to parametersSpan", e);
+ }
+ return result;
+ }
+
+ public static InputParametersSpan convert(byte[] data) throws ConvertFailedException {
+ return (InputParametersSpan) INSTANCE.convertData(data);
+ }
+
+ public boolean isNull() {
+ return false;
+ }
+
+ public String getTraceId() {
+ return traceId;
+ }
+
+ public void setTraceId(String traceId) {
+ this.traceId = traceId;
+ }
+
+
+ public String getTraceLevelId() {
+ return traceLevelId;
+ }
+
+ public void setTraceLevelId(String traceLevelId) {
+ this.traceLevelId = traceLevelId;
+ }
+
+
+ public void addParameter(String parameter) {
+ parameters.put("_" + parameterIndex, parameter);
+ parameterIndex++;
+ }
+
+ public Map getParameters() {
+ return parameters;
+ }
+
+ public void setParameters(Map parameters) {
+ this.parameters = parameters;
+ }
+}
diff --git a/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/OutputParameterSpan.java b/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/OutputParameterSpan.java
new file mode 100644
index 000000000..8dae9055b
--- /dev/null
+++ b/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/OutputParameterSpan.java
@@ -0,0 +1,89 @@
+package com.a.eye.skywalking.protocol;
+
+import com.a.eye.skywalking.protocol.common.AbstractDataSerializable;
+import com.a.eye.skywalking.protocol.exception.ConvertFailedException;
+import com.a.eye.skywalking.protocol.proto.TraceProtocol;
+
+/**
+ * Created by xin on 16/8/16.
+ */
+public class OutputParameterSpan extends AbstractDataSerializable {
+ private static final OutputParameterSpan INSTANCE = new OutputParameterSpan();
+
+ /**
+ * tid,调用链的全局唯一标识
+ */
+ private String traceId;
+ /**
+ * 当前调用链的描述
+ */
+ private String traceLevelId;
+
+ private String outputParameter;
+
+ public OutputParameterSpan() {
+ }
+
+ public OutputParameterSpan(String traceId, String traceLevelId) {
+ this.traceId = traceId;
+ this.traceLevelId = traceLevelId;
+ }
+
+ public int getDataType() {
+ return 4;
+ }
+
+ public byte[] getData() {
+ return TraceProtocol.OutputParametersSpan.newBuilder().setOutputParameter(getOutputParameter())
+ .setTraceId(getTraceId()).setTraceLevelId(getTraceLevelId()).build().toByteArray();
+ }
+
+ public AbstractDataSerializable convertData(byte[] data) throws ConvertFailedException {
+ try {
+ OutputParameterSpan outputParameterSpan = new OutputParameterSpan();
+ TraceProtocol.OutputParametersSpan _protobufOutputSpan = TraceProtocol.OutputParametersSpan.parseFrom(data);
+ outputParameterSpan.setOutputParameter(_protobufOutputSpan.getOutputParameter());
+ outputParameterSpan.setTraceId(_protobufOutputSpan.getTraceId());
+ outputParameterSpan.setTraceLevelId(_protobufOutputSpan.getTraceLevelId());
+ return outputParameterSpan;
+ } catch (Exception e) {
+ throw new ConvertFailedException("Failed to convert output parameter span.", e);
+ }
+
+ }
+
+ public static OutputParameterSpan convert(byte[] data) throws ConvertFailedException {
+ return (OutputParameterSpan) INSTANCE.convertData(data);
+ }
+
+ public boolean isNull() {
+ return false;
+ }
+
+ public String getTraceId() {
+ return traceId;
+ }
+
+ public void setTraceId(String traceId) {
+ this.traceId = traceId;
+ }
+
+ public String getTraceLevelId() {
+ return traceLevelId;
+ }
+
+ public void setTraceLevelId(String traceLevelId) {
+ this.traceLevelId = traceLevelId;
+ }
+
+ public String getOutputParameter() {
+ if (outputParameter == null) {
+ return "";
+ }
+ return outputParameter;
+ }
+
+ public void setOutputParameter(String outputParameter) {
+ this.outputParameter = outputParameter;
+ }
+}
diff --git a/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/RequestSpan.java b/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/RequestSpan.java
index da9c44be0..cd07eae36 100644
--- a/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/RequestSpan.java
+++ b/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/RequestSpan.java
@@ -70,11 +70,6 @@ public class RequestSpan extends AbstractDataSerializable {
*/
private String userId = "";
- /**
- * 埋点入参列表
- */
- private Map parameters = new HashMap();
-
/**
* 业务字段
*/
@@ -196,14 +191,6 @@ public class RequestSpan extends AbstractDataSerializable {
this.userId = userId;
}
- public Map getParameters() {
- return parameters;
- }
-
- public void setParameters(Map parameters) {
- this.parameters = parameters;
- }
-
@Override
public int getDataType() {
return 1;
@@ -220,10 +207,6 @@ public class RequestSpan extends AbstractDataSerializable {
builder.setBussinessKey(businessKey);
}
- if (parameters != null && parameters.size() > 0) {
- builder.putAllParameters(parameters);
- }
-
return builder.setCallType(callType).setApplicationId(applicationId).setUserId(userId).setAgentId(agentId)
.build().toByteArray();
}
@@ -247,7 +230,6 @@ public class RequestSpan extends AbstractDataSerializable {
requestSpan.setAgentId(requestSpanByte.getAgentId());
requestSpan.setProcessNo(requestSpanByte.getProcessNo());
requestSpan.setAddress(requestSpanByte.getAddress());
- requestSpan.setParameters(requestSpanByte.getParametersMap());
} catch (InvalidProtocolBufferException e) {
throw new ConvertFailedException(e.getMessage(), e);
}
@@ -311,11 +293,6 @@ public class RequestSpan extends AbstractDataSerializable {
return this;
}
- public RequestSpanBuilder parameters(Map parameters) {
- requestSpan.parameters = parameters;
- return this;
- }
-
public RequestSpan build() {
return requestSpan;
}
diff --git a/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/Span.java b/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/Span.java
index 2d3c91558..27d6591de 100644
--- a/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/Span.java
+++ b/skywalking-protocol/src/main/java/com/a/eye/skywalking/protocol/Span.java
@@ -47,11 +47,6 @@ public class Span {
*/
protected String exceptionStack = "";
- /**
- * 节点调用过程中的业务字段
- * 如:业务系统设置的订单号,SQL语句等
- */
- protected Map parameters = new HashMap();
/**
* 节点类型
* 如:RPC Client,RPC Server,Local
@@ -127,14 +122,6 @@ public class Span {
this.exceptionStack = exceptionStack;
}
- public Map getParameters() {
- return parameters;
- }
-
- public void setParameters(Map parameters) {
- this.parameters = parameters;
- }
-
public void setSpanType(SpanType spanType) {
this.spanType = spanType;
}
@@ -183,10 +170,6 @@ public class Span {
this.businessKey = businessKey;
}
- public void appendParameters(Map parameters) {
- this.parameters.putAll(parameters);
- }
-
public String getApplicationId() {
return applicationId;
}
@@ -208,12 +191,7 @@ public class Span {
this.viewPointId = viewPointId;
}
- public void setInvokeResult(String result){
- if (result == null){
- result = "null";
- }
- this.parameters.put(INVOKE_RESULT_PARAMETER_KEY, result);
- }
+
public String getViewPointId() {
return viewPointId;
diff --git a/skywalking-protocol/src/main/proto/TraceProtocol.proto b/skywalking-protocol/src/main/proto/TraceProtocol.proto
index cc7c59fe4..c542b80ed 100644
--- a/skywalking-protocol/src/main/proto/TraceProtocol.proto
+++ b/skywalking-protocol/src/main/proto/TraceProtocol.proto
@@ -10,7 +10,6 @@ message AckSpan {
required int32 statusCode = 5;
optional string exceptionStack = 6;
required string viewpointId = 7;
- map parameters = 8;
}
message RequestSpan {
@@ -26,7 +25,18 @@ message RequestSpan {
required string userId = 10;
optional string bussinessKey = 11;
required string agentId = 12;
- map parameters = 13;
- required string processNo = 14;
- required string address = 15;
+ required string processNo = 13;
+ required string address = 14;
+}
+
+message InputParametersSpan{
+ required string traceId = 1;
+ optional string traceLevelId = 2;
+ map parameters = 3;
+}
+
+message OutputParametersSpan{
+ required string traceId = 1;
+ optional string traceLevelId = 2;
+ required string outputParameter = 3;
}
diff --git a/skywalking-protocol/src/main/resources/META-INF/services/com.a.eye.skywalking.protocol.common.AbstractDataSerializable b/skywalking-protocol/src/main/resources/META-INF/services/com.a.eye.skywalking.protocol.common.AbstractDataSerializable
index fc592473e..45ccd8590 100644
--- a/skywalking-protocol/src/main/resources/META-INF/services/com.a.eye.skywalking.protocol.common.AbstractDataSerializable
+++ b/skywalking-protocol/src/main/resources/META-INF/services/com.a.eye.skywalking.protocol.common.AbstractDataSerializable
@@ -1,3 +1,5 @@
com.a.eye.skywalking.protocol.AckSpan
com.a.eye.skywalking.protocol.RequestSpan
+com.a.eye.skywalking.protocol.InputParametersSpan
+com.a.eye.skywalking.protocol.OutputParameterSpan
com.a.eye.skywalking.protocol.BufferFileEOFProtocol
diff --git a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/conf/Config.java b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/conf/Config.java
index 096da3a53..dbecb0009 100644
--- a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/conf/Config.java
+++ b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/conf/Config.java
@@ -89,9 +89,20 @@ public class Config {
public static class HBaseConfig {
- public static String TABLE_NAME = "sw-call-chain";
+ public static class TraceDataTable {
- public static String FAMILY_COLUMN_NAME = "call-chain";
+ public static String TABLE_NAME = "trace-data";
+
+ public static String FAMILY_COLUMN_NAME = "call-chain";
+
+ }
+
+ public static class TraceParamTable {
+
+ public static String TABLE_NAME = "trace-param";
+
+ public static String FAMILY_COLUMN_NAME = "param-data";
+ }
public static String ZK_HOSTNAME;
diff --git a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/peresistent/BufferFileReader.java b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/peresistent/BufferFileReader.java
index fac6adc97..9c76025d1 100644
--- a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/peresistent/BufferFileReader.java
+++ b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/peresistent/BufferFileReader.java
@@ -4,6 +4,7 @@ import com.a.eye.skywalking.protocol.SerializedFactory;
import com.a.eye.skywalking.protocol.common.AbstractDataSerializable;
import com.a.eye.skywalking.protocol.exception.ConvertFailedException;
import com.a.eye.skywalking.protocol.util.IntegerAssist;
+import com.a.eye.skywalking.reciever.conf.Config;
import com.a.eye.skywalking.reciever.selfexamination.ServerHealthCollector;
import com.a.eye.skywalking.reciever.selfexamination.ServerHeathReading;
import org.apache.commons.io.FileUtils;
@@ -24,7 +25,7 @@ public class BufferFileReader {
private static final byte[] DATA_SPILT = new byte[] {127, 127, 127, 127};
private int remainderLength = 0;
private byte[] remainderByte = null;
- private Logger logger = LogManager.getLogger(BufferFileReader.class);
+ private static Logger logger = LogManager.getLogger(BufferFileReader.class);
private List serializables;
public BufferFileReader(File bufferFile, int currentOffset) {
@@ -200,8 +201,7 @@ public class BufferFileReader {
AbstractDataSerializable abstractDataSerializable = SerializedFactory.deserialize(data);
serializeData.add(abstractDataSerializable);
} catch (ConvertFailedException e) {
- // FIXME: 16/8/4 logger日志输出
- e.printStackTrace();
+ logger.error("Failed to convert span.", e);
}
currentLength += 4 + dataLength;
diff --git a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/AbstractSpanProcessor.java b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/AbstractSpanProcessor.java
index dd34838e9..6cb26727f 100644
--- a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/AbstractSpanProcessor.java
+++ b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/AbstractSpanProcessor.java
@@ -1,63 +1,17 @@
package com.a.eye.skywalking.reciever.processor;
-import com.a.eye.skywalking.reciever.processor.exception.HBaseInitFailedException;
import com.a.eye.skywalking.protocol.common.AbstractDataSerializable;
-import com.a.eye.skywalking.reciever.conf.Config;
-import com.a.eye.skywalking.reciever.selfexamination.ServerHealthCollector;
-import com.a.eye.skywalking.reciever.selfexamination.ServerHeathReading;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.client.Admin;
+import com.a.eye.skywalking.reciever.util.HBaseUtil;
import org.apache.hadoop.hbase.client.Connection;
-import org.apache.hadoop.hbase.client.ConnectionFactory;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import java.io.IOException;
import java.util.List;
-import static org.apache.hadoop.hbase.util.Bytes.toBytes;
-
-public abstract class AbstractSpanProcessor implements IProcessor {
- private static Logger logger = LogManager.getLogger(AbstractSpanProcessor.class);
- private static Configuration configuration = null;
- private static Connection connection;
-
- static {
- if (configuration == null) {
- configuration = HBaseConfiguration.create();
- if (Config.HBaseConfig.ZK_HOSTNAME == null || "".equals(Config.HBaseConfig.ZK_HOSTNAME)) {
- logger.error("Miss HBase ZK quorum Configuration", new IllegalArgumentException("Miss HBase ZK quorum Configuration"));
- System.exit(-1);
- }
- configuration.set("hbase.zookeeper.quorum", Config.HBaseConfig.ZK_HOSTNAME);
- configuration.set("hbase.zookeeper.property.clientPort", Config.HBaseConfig.CLIENT_PORT);
- }
-
- try {
- connection = ConnectionFactory.createConnection(configuration);
- Admin admin = connection.getAdmin();
- if (!admin.tableExists(TableName.valueOf(Config.HBaseConfig.TABLE_NAME))){
- HTableDescriptor descriptor = new HTableDescriptor(TableName.valueOf(Config.HBaseConfig.TABLE_NAME));
- HColumnDescriptor family = new HColumnDescriptor(toBytes(Config.HBaseConfig.FAMILY_COLUMN_NAME));
- descriptor.addFamily(family);
- admin.createTable(descriptor);
- }
- } catch (IOException e) {
- ServerHealthCollector.getCurrentHeathReading("hbase").updateData(ServerHeathReading.ERROR, "connect to hbase failure.");
- throw new HBaseInitFailedException("initHBaseClient failure", e);
- }
-
-
- }
+public abstract class AbstractSpanProcessor implements IProcessor{
@Override
public void process(List serializedObjects) {
doAlarm(serializedObjects);
- doSaveHBase(connection, serializedObjects);
+ doSaveHBase(HBaseUtil.getConnection(), serializedObjects);
}
public abstract void doAlarm(List serializedObjects);
diff --git a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/AckSpanProcessor.java b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/AckSpanProcessor.java
index 3f52e3343..09b01e14a 100644
--- a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/AckSpanProcessor.java
+++ b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/AckSpanProcessor.java
@@ -54,12 +54,12 @@ public class AckSpanProcessor extends AbstractSpanProcessor {
// appending suffix
columnName += "-ACK";
- put.addColumn(Bytes.toBytes(Config.HBaseConfig.FAMILY_COLUMN_NAME), Bytes.toBytes(columnName),
+ put.addColumn(Bytes.toBytes(Config.HBaseConfig.TraceDataTable.FAMILY_COLUMN_NAME), Bytes.toBytes(columnName),
ackSpan.getData());
puts.add(put);
}
// save
- HBaseUtil.batchSavePuts(connection, Config.HBaseConfig.TABLE_NAME, puts);
+ HBaseUtil.batchSavePuts(connection, Config.HBaseConfig.TraceDataTable.TABLE_NAME, puts);
}
@Override
diff --git a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/InputParameterSpanProcessor.java b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/InputParameterSpanProcessor.java
new file mode 100644
index 000000000..ca3c5be59
--- /dev/null
+++ b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/InputParameterSpanProcessor.java
@@ -0,0 +1,37 @@
+package com.a.eye.skywalking.reciever.processor;
+
+import com.a.eye.skywalking.protocol.InputParametersSpan;
+import com.a.eye.skywalking.protocol.common.AbstractDataSerializable;
+import com.a.eye.skywalking.reciever.conf.Config;
+import com.a.eye.skywalking.reciever.util.HBaseUtil;
+import com.a.eye.skywalking.reciever.util.SpanUtil;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.util.Bytes;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@DefaultProcessor
+public class InputParameterSpanProcessor extends ParameterSpanProcessor {
+ @Override
+ public void doSaveHBase(Connection connection, List serializedObjects) {
+ List puts = new ArrayList();
+ // convert to put
+ for (AbstractDataSerializable serializedObject : serializedObjects) {
+ InputParametersSpan inputParametersSpan = (InputParametersSpan) serializedObject;
+ Put put = new Put(Bytes.toBytes(inputParametersSpan.getTraceId()),
+ SpanUtil.getTSBySpanTraceId(inputParametersSpan.getTraceId()));
+ put.addColumn(Bytes.toBytes(Config.HBaseConfig.TraceParamTable.FAMILY_COLUMN_NAME),
+ Bytes.toBytes(inputParametersSpan.getTraceLevelId()), inputParametersSpan.getData());
+ puts.add(put);
+ }
+ // save
+ HBaseUtil.batchSavePuts(connection, Config.HBaseConfig.TraceParamTable.TABLE_NAME, puts);
+ }
+
+ @Override
+ public int getProtocolType() {
+ return 3;
+ }
+}
diff --git a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/OutputParameterSpanProcessor.java b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/OutputParameterSpanProcessor.java
new file mode 100644
index 000000000..8bae311e8
--- /dev/null
+++ b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/OutputParameterSpanProcessor.java
@@ -0,0 +1,38 @@
+package com.a.eye.skywalking.reciever.processor;
+
+import com.a.eye.skywalking.protocol.OutputParameterSpan;
+import com.a.eye.skywalking.protocol.common.AbstractDataSerializable;
+import com.a.eye.skywalking.reciever.conf.Config;
+import com.a.eye.skywalking.reciever.util.HBaseUtil;
+import com.a.eye.skywalking.reciever.util.SpanUtil;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.util.Bytes;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@DefaultProcessor
+public class OutputParameterSpanProcessor extends ParameterSpanProcessor {
+ @Override
+ public void doSaveHBase(Connection connection, List serializedObjects) {
+ List puts = new ArrayList();
+ // convert to put
+ for (AbstractDataSerializable serializedObject : serializedObjects) {
+ OutputParameterSpan inputParametersSpan = (OutputParameterSpan) serializedObject;
+ String columnName = inputParametersSpan.getTraceLevelId() + "-RET";
+ Put put = new Put(Bytes.toBytes(inputParametersSpan.getTraceId()),
+ SpanUtil.getTSBySpanTraceId(inputParametersSpan.getTraceId()));
+ put.addColumn(Bytes.toBytes(Config.HBaseConfig.TraceParamTable.FAMILY_COLUMN_NAME),
+ Bytes.toBytes(columnName), inputParametersSpan.getData());
+ puts.add(put);
+ }
+ // save
+ HBaseUtil.batchSavePuts(connection, Config.HBaseConfig.TraceParamTable.TABLE_NAME, puts);
+ }
+
+ @Override
+ public int getProtocolType() {
+ return 4;
+ }
+}
diff --git a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/ParameterSpanProcessor.java b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/ParameterSpanProcessor.java
new file mode 100644
index 000000000..659780979
--- /dev/null
+++ b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/ParameterSpanProcessor.java
@@ -0,0 +1,18 @@
+package com.a.eye.skywalking.reciever.processor;
+
+import com.a.eye.skywalking.protocol.common.AbstractDataSerializable;
+import com.a.eye.skywalking.reciever.util.HBaseUtil;
+
+import java.util.List;
+
+public abstract class ParameterSpanProcessor extends AbstractSpanProcessor {
+ @Override
+ public void process(List serializedObjects) {
+ doSaveHBase(HBaseUtil.getConnection(), serializedObjects);
+ }
+
+ @Override
+ public void doAlarm(List serializedObjects) {
+ // do Nothing
+ }
+}
diff --git a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/RequestSpanProcessor.java b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/RequestSpanProcessor.java
index 20de0fbdb..40ac0f892 100644
--- a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/RequestSpanProcessor.java
+++ b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/processor/RequestSpanProcessor.java
@@ -35,12 +35,12 @@ public class RequestSpanProcessor extends AbstractSpanProcessor {
} else {
columnName = requestSpan.getParentLevel() + "." + requestSpan.getLevelId();
}
- put.addColumn(Bytes.toBytes(Config.HBaseConfig.FAMILY_COLUMN_NAME), Bytes.toBytes(columnName),
+ put.addColumn(Bytes.toBytes(Config.HBaseConfig.TraceDataTable.FAMILY_COLUMN_NAME), Bytes.toBytes(columnName),
requestSpan.getData());
puts.add(put);
}
// save
- HBaseUtil.batchSavePuts(connection, Config.HBaseConfig.TABLE_NAME, puts);
+ HBaseUtil.batchSavePuts(connection, Config.HBaseConfig.TraceDataTable.TABLE_NAME, puts);
}
@Override
diff --git a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/util/HBaseUtil.java b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/util/HBaseUtil.java
index 5ebdc12a7..ca7201238 100644
--- a/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/util/HBaseUtil.java
+++ b/skywalking-server/src/main/java/com/a/eye/skywalking/reciever/util/HBaseUtil.java
@@ -1,15 +1,23 @@
package com.a.eye.skywalking.reciever.util;
+import com.a.eye.skywalking.reciever.conf.Config;
+import com.a.eye.skywalking.reciever.processor.exception.HBaseInitFailedException;
+import com.a.eye.skywalking.reciever.selfexamination.ServerHealthCollector;
+import com.a.eye.skywalking.reciever.selfexamination.ServerHeathReading;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.HColumnDescriptor;
+import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.client.Connection;
-import org.apache.hadoop.hbase.client.Put;
-import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.client.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.io.IOException;
import java.util.List;
+import static org.apache.hadoop.hbase.util.Bytes.toBytes;
+
public class HBaseUtil {
private static Logger logger = LogManager.getLogger(HBaseUtil.class);
@@ -24,4 +32,49 @@ public class HBaseUtil {
logger.error("batchSavePuts failure.", e);
}
}
+
+ private static Connection connection;
+
+ public static Connection initConnection() {
+ Configuration configuration = HBaseConfiguration.create();
+ if (Config.HBaseConfig.ZK_HOSTNAME == null || "".equals(Config.HBaseConfig.ZK_HOSTNAME)) {
+ logger.error("Miss HBase ZK quorum Configuration",
+ new IllegalArgumentException("Miss HBase ZK quorum Configuration"));
+ System.exit(-1);
+ }
+ configuration.set("hbase.zookeeper.quorum", Config.HBaseConfig.ZK_HOSTNAME);
+ configuration.set("hbase.zookeeper.property.clientPort", Config.HBaseConfig.CLIENT_PORT);
+
+ try {
+ Connection connection = ConnectionFactory.createConnection(configuration);
+ Admin admin = connection.getAdmin();
+ if (!admin.tableExists(TableName.valueOf(Config.HBaseConfig.TraceDataTable.TABLE_NAME))) {
+ HTableDescriptor descriptor = new HTableDescriptor(TableName.valueOf(Config.HBaseConfig.TraceDataTable.TABLE_NAME));
+ HColumnDescriptor family = new HColumnDescriptor(toBytes(Config.HBaseConfig.TraceDataTable.FAMILY_COLUMN_NAME));
+ descriptor.addFamily(family);
+ admin.createTable(descriptor);
+ }
+
+ if (!admin.tableExists(TableName.valueOf(Config.HBaseConfig.TraceParamTable.TABLE_NAME))) {
+ HTableDescriptor descriptor = new HTableDescriptor(TableName.valueOf(Config.HBaseConfig.TraceParamTable.TABLE_NAME));
+ HColumnDescriptor family = new HColumnDescriptor(toBytes(Config.HBaseConfig.TraceParamTable.FAMILY_COLUMN_NAME));
+ descriptor.addFamily(family);
+ admin.createTable(descriptor);
+ }
+
+ return connection;
+ } catch (IOException e) {
+ ServerHealthCollector.getCurrentHeathReading("hbase")
+ .updateData(ServerHeathReading.ERROR, "connect to hbase failure.");
+ throw new HBaseInitFailedException("initHBaseClient failure", e);
+ }
+ }
+
+ public static Connection getConnection() {
+ if (connection == null) {
+ connection = initConnection();
+ }
+
+ return connection;
+ }
}
diff --git a/skywalking-server/src/main/resources/META-INF/services/com.a.eye.skywalking.reciever.processor.IProcessor b/skywalking-server/src/main/resources/META-INF/services/com.a.eye.skywalking.reciever.processor.IProcessor
index 54e296e32..097774748 100644
--- a/skywalking-server/src/main/resources/META-INF/services/com.a.eye.skywalking.reciever.processor.IProcessor
+++ b/skywalking-server/src/main/resources/META-INF/services/com.a.eye.skywalking.reciever.processor.IProcessor
@@ -1,2 +1,4 @@
com.a.eye.skywalking.reciever.processor.RequestSpanProcessor
com.a.eye.skywalking.reciever.processor.AckSpanProcessor
+com.a.eye.skywalking.reciever.processor.InputParameterSpanProcessor
+com.a.eye.skywalking.reciever.processor.OutputParameterSpanProcessor
diff --git a/skywalking-server/src/main/resources/config.properties b/skywalking-server/src/main/resources/config.properties
index bb1ab0152..6d3e561a8 100644
--- a/skywalking-server/src/main/resources/config.properties
+++ b/skywalking-server/src/main/resources/config.properties
@@ -23,7 +23,7 @@ persistence.switch_file_wait_time=5000
#追加EOF标志位的线程数量
persistence.max_append_eof_flags_thread_number=1
#持久化线程个数
-persistence.max_deal_data_thread_number=0
+persistence.max_deal_data_thread_number=1
#偏移量注册文件的目录
registerpersistence.register_file_parent_directory=/tmp/skywalking/data/offset
@@ -35,14 +35,20 @@ registerpersistence.register_bak_file_name=offset.txt.bak
registerpersistence.offset_written_file_wait_cycle=5000
-#hbase表名
-hbaseconfig.table_name=trace-data
-#hbase列簇名字
-hbaseconfig.family_column_name=call-chain
+#trace data hbase表名
+hbaseconfig.tracedatatable.table_name=trace-data
+#trace data hbase列簇名字
+hbaseconfig.tracedatatable.family_column_name=call-chain
+
+#trace data hbase表名
+hbaseconfig.traceparamtable.table_name=trace-param
+#trace data hbase列簇名字
+hbaseconfig.traceparamtable.family_column_name=param-data
+
#hbase zk quorum
-hbaseconfig.zk_hostname=10.1.235.197,10.1.235.198,10.1.235.199
+hbaseconfig.zk_hostname=swhbaseenv
#hbase zk port
-hbaseconfig.client_port=29181
+hbaseconfig.client_port=2181
#告警失效时间
alarm.alarm_expire_seconds=5400