diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointAvgIndicator.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointAvgIndicator.java new file mode 100644 index 0000000000000000000000000000000000000000..934d0dc8c1b6d947af00ddca1f7c0015b6480cb0 --- /dev/null +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointAvgIndicator.java @@ -0,0 +1,131 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.analysis.generated.endpoint; + +import java.util.*; +import lombok.*; +import org.apache.skywalking.oap.server.core.analysis.indicator.*; +import org.apache.skywalking.oap.server.core.analysis.indicator.annotation.IndicatorType; +import org.apache.skywalking.oap.server.core.remote.annotation.StreamData; +import org.apache.skywalking.oap.server.core.remote.grpc.proto.RemoteData; +import org.apache.skywalking.oap.server.core.storage.annotation.*; +import org.apache.skywalking.oap.server.core.storage.StorageBuilder; + +/** + * This class is auto generated. Please don't change this class manually. + * + * @author Observability Analysis Language code generator + */ +@IndicatorType +@StreamData +@StorageEntity(name = "endpoint_avg", builder = EndpointAvgIndicator.Builder.class) +public class EndpointAvgIndicator extends AvgIndicator { + + @Setter @Getter @Column(columnName = "id") private int id; + @Setter @Getter @Column(columnName = "service_id") private int serviceId; + @Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId; + + @Override public String id() { + return String.valueOf(id); + } + + @Override public int hashCode() { + int result = 17; + result = 31 * result + id; + result = 31 * result + (int)getTimeBucket(); + return result; + } + + + @Override public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + + EndpointAvgIndicator indicator = (EndpointAvgIndicator)obj; + if (id != indicator.id) + return false; + if (getTimeBucket() != indicator.getTimeBucket()) + return false; + + return true; + } + + + @Override public RemoteData.Builder serialize() { + RemoteData.Builder remoteBuilder = RemoteData.newBuilder(); + + remoteBuilder.setDataLongs(0, getTimeBucket()); + remoteBuilder.setDataLongs(1, getSummation()); + remoteBuilder.setDataLongs(2, getValue()); + remoteBuilder.setDataLongs(3, getTimeBucket()); + + + remoteBuilder.setDataIntegers(0, getId()); + remoteBuilder.setDataIntegers(1, getServiceId()); + remoteBuilder.setDataIntegers(2, getServiceInstanceId()); + remoteBuilder.setDataIntegers(3, getCount()); + + return remoteBuilder; + } + + @Override public void deserialize(RemoteData remoteData) { + + setTimeBucket(remoteData.getDataLongs(0)); + setSummation(remoteData.getDataLongs(1)); + setValue(remoteData.getDataLongs(2)); + setTimeBucket(remoteData.getDataLongs(3)); + + + setId(remoteData.getDataIntegers(0)); + setServiceId(remoteData.getDataIntegers(1)); + setServiceInstanceId(remoteData.getDataIntegers(2)); + setCount(remoteData.getDataIntegers(3)); + } + + public static class Builder implements StorageBuilder { + + @Override public Map data2Map(EndpointAvgIndicator storageData) { + Map map = new HashMap<>(); + map.put("id", storageData.getId()); + map.put("service_id", storageData.getServiceId()); + map.put("service_instance_id", storageData.getServiceInstanceId()); + map.put("summation", storageData.getSummation()); + map.put("count", storageData.getCount()); + map.put("value", storageData.getValue()); + map.put("time_bucket", storageData.getTimeBucket()); + return map; + } + + @Override public EndpointAvgIndicator map2Data(Map dbMap) { + EndpointAvgIndicator indicator = new EndpointAvgIndicator(); + indicator.setId((int)dbMap.get("id")); + indicator.setServiceId((int)dbMap.get("service_id")); + indicator.setServiceInstanceId((int)dbMap.get("service_instance_id")); + indicator.setSummation((long)dbMap.get("summation")); + indicator.setCount((int)dbMap.get("count")); + indicator.setValue((long)dbMap.get("value")); + indicator.setTimeBucket((long)dbMap.get("time_bucket")); + return indicator; + } + } +} diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointDispatcher.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointDispatcher.java new file mode 100644 index 0000000000000000000000000000000000000000..4f54a6b5e458501bc21df6182fbb1966bd40faa1 --- /dev/null +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointDispatcher.java @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.analysis.generated.endpoint; + +import org.apache.skywalking.oap.server.core.analysis.SourceDispatcher; +import org.apache.skywalking.oap.server.core.analysis.worker.IndicatorProcess; +import org.apache.skywalking.oap.server.core.source.Endpoint; + +/** + * This class is auto generated. Please don't change this class manually. + * + * @author Observability Analysis Language code generator + */ +public class EndpointDispatcher implements SourceDispatcher { + + + @Override public void dispatch(Endpoint source) { + doEndpointAvg(source); + doEndpointPercent(source); + } + + private void doEndpointAvg(Endpoint source) { + EndpointAvgIndicator indicator = new EndpointAvgIndicator(); + + indicator.setTimeBucket(source.getTimeBucket()); + indicator.setId(source.getId()); + indicator.setServiceId(source.getServiceId()); + indicator.setServiceInstanceId(source.getServiceInstanceId()); + indicator.combine(source.getLatency(), 1); + IndicatorProcess.INSTANCE.in(indicator); + } + private void doEndpointPercent(Endpoint source) { + EndpointPercentIndicator indicator = new EndpointPercentIndicator(); + + indicator.setTimeBucket(source.getTimeBucket()); + indicator.setId(source.getId()); + indicator.setServiceId(source.getServiceId()); + indicator.setServiceInstanceId(source.getServiceInstanceId()); + indicator.combine(new org.apache.skywalking.oap.server.core.analysis.indicator.expression.BooleanBinaryMatch(), source.isStatus(), true); + IndicatorProcess.INSTANCE.in(indicator); + } +} diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointPercentIndicator.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointPercentIndicator.java new file mode 100644 index 0000000000000000000000000000000000000000..7df931a45a8332fb9da316239413e81b216941b4 --- /dev/null +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointPercentIndicator.java @@ -0,0 +1,131 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.analysis.generated.endpoint; + +import java.util.*; +import lombok.*; +import org.apache.skywalking.oap.server.core.analysis.indicator.*; +import org.apache.skywalking.oap.server.core.analysis.indicator.annotation.IndicatorType; +import org.apache.skywalking.oap.server.core.remote.annotation.StreamData; +import org.apache.skywalking.oap.server.core.remote.grpc.proto.RemoteData; +import org.apache.skywalking.oap.server.core.storage.annotation.*; +import org.apache.skywalking.oap.server.core.storage.StorageBuilder; + +/** + * This class is auto generated. Please don't change this class manually. + * + * @author Observability Analysis Language code generator + */ +@IndicatorType +@StreamData +@StorageEntity(name = "endpoint_percent", builder = EndpointPercentIndicator.Builder.class) +public class EndpointPercentIndicator extends PercentIndicator { + + @Setter @Getter @Column(columnName = "id") private int id; + @Setter @Getter @Column(columnName = "service_id") private int serviceId; + @Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId; + + @Override public String id() { + return String.valueOf(id); + } + + @Override public int hashCode() { + int result = 17; + result = 31 * result + id; + result = 31 * result + (int)getTimeBucket(); + return result; + } + + + @Override public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + + EndpointPercentIndicator indicator = (EndpointPercentIndicator)obj; + if (id != indicator.id) + return false; + if (getTimeBucket() != indicator.getTimeBucket()) + return false; + + return true; + } + + + @Override public RemoteData.Builder serialize() { + RemoteData.Builder remoteBuilder = RemoteData.newBuilder(); + + remoteBuilder.setDataLongs(0, getTimeBucket()); + remoteBuilder.setDataLongs(1, getTotal()); + remoteBuilder.setDataLongs(2, getMatch()); + remoteBuilder.setDataLongs(3, getTimeBucket()); + + + remoteBuilder.setDataIntegers(0, getId()); + remoteBuilder.setDataIntegers(1, getServiceId()); + remoteBuilder.setDataIntegers(2, getServiceInstanceId()); + remoteBuilder.setDataIntegers(3, getPercentage()); + + return remoteBuilder; + } + + @Override public void deserialize(RemoteData remoteData) { + + setTimeBucket(remoteData.getDataLongs(0)); + setTotal(remoteData.getDataLongs(1)); + setMatch(remoteData.getDataLongs(2)); + setTimeBucket(remoteData.getDataLongs(3)); + + + setId(remoteData.getDataIntegers(0)); + setServiceId(remoteData.getDataIntegers(1)); + setServiceInstanceId(remoteData.getDataIntegers(2)); + setPercentage(remoteData.getDataIntegers(3)); + } + + public static class Builder implements StorageBuilder { + + @Override public Map data2Map(EndpointPercentIndicator storageData) { + Map map = new HashMap<>(); + map.put("id", storageData.getId()); + map.put("service_id", storageData.getServiceId()); + map.put("service_instance_id", storageData.getServiceInstanceId()); + map.put("total", storageData.getTotal()); + map.put("percentage", storageData.getPercentage()); + map.put("match", storageData.getMatch()); + map.put("time_bucket", storageData.getTimeBucket()); + return map; + } + + @Override public EndpointPercentIndicator map2Data(Map dbMap) { + EndpointPercentIndicator indicator = new EndpointPercentIndicator(); + indicator.setId((int)dbMap.get("id")); + indicator.setServiceId((int)dbMap.get("service_id")); + indicator.setServiceInstanceId((int)dbMap.get("service_instance_id")); + indicator.setTotal((long)dbMap.get("total")); + indicator.setPercentage((int)dbMap.get("percentage")); + indicator.setMatch((long)dbMap.get("match")); + indicator.setTimeBucket((long)dbMap.get("time_bucket")); + return indicator; + } + } +} diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/service/ServiceDispatcher.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/service/ServiceDispatcher.java new file mode 100644 index 0000000000000000000000000000000000000000..7452ccd2c310be2dc8bc085fe866a1008fc7ed9e --- /dev/null +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/service/ServiceDispatcher.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.analysis.generated.service; + +import org.apache.skywalking.oap.server.core.analysis.SourceDispatcher; +import org.apache.skywalking.oap.server.core.source.Service; + +/** + * This class is auto generated. Please don't change this class manually. + * + * @author Observability Analysis Language code generator + */ +public class ServiceDispatcher implements SourceDispatcher { + @Override public void dispatch(Service source) { + } + +} diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/PercentIndicator.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/PercentIndicator.java new file mode 100644 index 0000000000000000000000000000000000000000..ab590e817990be54e97d0f0c6b597a85af16fc5a --- /dev/null +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/PercentIndicator.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.analysis.indicator; + +import lombok.Getter; +import lombok.Setter; +import org.apache.skywalking.oap.server.core.analysis.indicator.annotation.Entrance; +import org.apache.skywalking.oap.server.core.analysis.indicator.annotation.Expression; +import org.apache.skywalking.oap.server.core.analysis.indicator.annotation.ExpressionArg0; +import org.apache.skywalking.oap.server.core.analysis.indicator.annotation.ExpressionArg1; +import org.apache.skywalking.oap.server.core.analysis.indicator.annotation.IndicatorOperator; +import org.apache.skywalking.oap.server.core.analysis.indicator.expression.BooleanBinaryMatch; +import org.apache.skywalking.oap.server.core.storage.annotation.Column; + +/** + * @author wusheng + */ +@IndicatorOperator +public abstract class PercentIndicator extends Indicator { + protected static final String TOTAL = "total"; + protected static final String MATCH = "match"; + protected static final String PERCENTAGE = "percentage"; + + @Getter @Setter @Column(columnName = TOTAL) private long total; + @Getter @Setter @Column(columnName = PERCENTAGE) private int percentage; + @Getter @Setter @Column(columnName = MATCH) private long match; + + @Entrance + public final void combine(@Expression BooleanBinaryMatch expression, @ExpressionArg0 Object leftValue, + @ExpressionArg1 Object rightValue) { + expression.setLeft(leftValue); + expression.setRight(rightValue); + if (expression.match()) { + match++; + } + total++; + } + + @Override public final void combine(Indicator indicator) { + total += ((PercentIndicator)indicator).total; + match += ((PercentIndicator)indicator).match; + } +} diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/Expression.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/Expression.java new file mode 100644 index 0000000000000000000000000000000000000000..e763bc0d2a2abd67f2b9a82efaea9aa73fe17777 --- /dev/null +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/Expression.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.analysis.indicator.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author wusheng + */ +@Target(ElementType.PARAMETER) +@Retention(RetentionPolicy.RUNTIME) +public @interface Expression { +} diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/ExpressionArg0.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/ExpressionArg0.java new file mode 100644 index 0000000000000000000000000000000000000000..8bde31a24e48a4f845ef8c17f8285e498557fb95 --- /dev/null +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/ExpressionArg0.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.analysis.indicator.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author wusheng + */ +@Target(ElementType.PARAMETER) +@Retention(RetentionPolicy.RUNTIME) +public @interface ExpressionArg0 { +} diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/ExpressionArg1.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/ExpressionArg1.java new file mode 100644 index 0000000000000000000000000000000000000000..70dfc9a49e729fc964f5de6ff82131230305ca1d --- /dev/null +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/ExpressionArg1.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.analysis.indicator.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author wusheng + */ +@Target(ElementType.PARAMETER) +@Retention(RetentionPolicy.RUNTIME) +public @interface ExpressionArg1 { +} diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/expression/BinaryMatchExpression.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/expression/BinaryMatchExpression.java new file mode 100644 index 0000000000000000000000000000000000000000..ef8cc809dbbe9e0c6e72512996f98ea0826d802b --- /dev/null +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/expression/BinaryMatchExpression.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.analysis.indicator.expression; + +/** + * BinaryMatchExpression accepts two calculate factors, + * and return the True/False result. + * + * @author wusheng + */ +public abstract class BinaryMatchExpression { + protected Object left; + protected Object right; + + public void setLeft(Object left) { + this.left = left; + } + + public void setRight(Object right) { + this.right = right; + } + + public abstract boolean match(); +} diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/expression/BooleanBinaryMatch.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/expression/BooleanBinaryMatch.java new file mode 100644 index 0000000000000000000000000000000000000000..dc55b83d34b188f83910e0330db98e0e825d7c49 --- /dev/null +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/expression/BooleanBinaryMatch.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.analysis.indicator.expression; + +/** + * + * @author wusheng + */ +public class BooleanBinaryMatch extends BinaryMatchExpression { + @Override public boolean match() { + return left == right; + } +} diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Service.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Service.java new file mode 100644 index 0000000000000000000000000000000000000000..15f28e3b808f7d8e995b350fc8c64f7781149a50 --- /dev/null +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Service.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.source; + +import org.apache.skywalking.oap.server.core.source.annotation.SourceType; + +/** + * @author wusheng + */ +@SourceType +public class Service extends Source { + @Override public Scope scope() { + return Scope.Service; + } +}