From 0c17906c3c1c41752e1ec38b37d9e0dec22503ca Mon Sep 17 00:00:00 2001 From: wu-sheng Date: Fri, 10 Nov 2017 11:17:51 +0800 Subject: [PATCH] Fix compile issues. --- .../service/ApplicationCacheGuavaService.java | 12 ++++---- .../service/InstanceCacheGuavaService.java | 6 ++-- .../service/ServiceIdCacheGuavaService.java | 6 ++-- .../service/ServiceNameCacheGuavaService.java | 6 ++-- .../apm/collector/core/graph/Graph.java | 6 ++-- .../collector/core/graph/GraphManager.java | 2 +- .../collector/core/graph/GraphNodeFinder.java | 4 +-- .../apm/collector/core/graph/Next.java | 6 ++-- .../apm/collector/core/graph/Node.java | 4 +-- .../collector/core/graph/NodeProcessor.java | 4 +-- .../apm/collector/core/graph/WayToNode.java | 6 ++-- .../core/graph/GraphManagerTest.java | 20 ++++++------- .../collector/core/graph/Node1Processor.java | 4 +-- .../collector/core/graph/Node2Processor.java | 4 +-- .../collector/core/graph/Node3Processor.java | 4 +-- .../collector/core/graph/Node4Processor.java | 4 +-- .../collector/core/graph/OutputProcessor.java | 30 +++++++++++++++++++ .../collector-remote-kafka-provider/pom.xml | 4 --- .../AbstractLocalAsyncWorkerProvider.java | 4 +-- .../base/AbstractRemoteWorkerProvider.java | 4 +-- .../stream/worker/base/AbstractWorker.java | 4 +-- .../worker/base/AbstractWorkerProvider.java | 4 +-- .../worker/base/LocalAsyncWorkerRef.java | 8 ++--- .../stream/worker/base/RemoteWorkerRef.java | 4 +-- checkStyle.xml | 4 +-- 25 files changed, 95 insertions(+), 69 deletions(-) create mode 100644 apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/OutputProcessor.java diff --git a/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ApplicationCacheGuavaService.java b/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ApplicationCacheGuavaService.java index e167a3bc2..ce7346342 100644 --- a/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ApplicationCacheGuavaService.java +++ b/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ApplicationCacheGuavaService.java @@ -35,7 +35,7 @@ public class ApplicationCacheGuavaService implements ApplicationCacheService { private final Logger logger = LoggerFactory.getLogger(ApplicationCacheGuavaService.class); - private final Cache CODE_CACHE = CacheBuilder.newBuilder().initialCapacity(100).maximumSize(1000).build(); + private final Cache codeCache = CacheBuilder.newBuilder().initialCapacity(100).maximumSize(1000).build(); private final DAOService daoService; @@ -48,7 +48,7 @@ public class ApplicationCacheGuavaService implements ApplicationCacheService { int applicationId = 0; try { - applicationId = CODE_CACHE.get(applicationCode, () -> dao.getApplicationId(applicationCode)); + applicationId = codeCache.get(applicationCode, () -> dao.getApplicationId(applicationCode)); } catch (Throwable e) { logger.error(e.getMessage(), e); } @@ -56,20 +56,20 @@ public class ApplicationCacheGuavaService implements ApplicationCacheService { if (applicationId == 0) { applicationId = dao.getApplicationId(applicationCode); if (applicationId != 0) { - CODE_CACHE.put(applicationCode, applicationId); + codeCache.put(applicationCode, applicationId); } } return applicationId; } - private final Cache ID_CACHE = CacheBuilder.newBuilder().maximumSize(1000).build(); + private final Cache idCache = CacheBuilder.newBuilder().maximumSize(1000).build(); public String get(int applicationId) { IApplicationCacheDAO dao = (IApplicationCacheDAO)daoService.get(IApplicationCacheDAO.class); String applicationCode = Const.EMPTY_STRING; try { - applicationCode = ID_CACHE.get(applicationId, () -> dao.getApplicationCode(applicationId)); + applicationCode = idCache.get(applicationId, () -> dao.getApplicationCode(applicationId)); } catch (Throwable e) { logger.error(e.getMessage(), e); } @@ -77,7 +77,7 @@ public class ApplicationCacheGuavaService implements ApplicationCacheService { if (StringUtils.isEmpty(applicationCode)) { applicationCode = dao.getApplicationCode(applicationId); if (StringUtils.isNotEmpty(applicationCode)) { - CODE_CACHE.put(applicationCode, applicationId); + codeCache.put(applicationCode, applicationId); } } return applicationCode; diff --git a/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/InstanceCacheGuavaService.java b/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/InstanceCacheGuavaService.java index 82f4311db..056de2503 100644 --- a/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/InstanceCacheGuavaService.java +++ b/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/InstanceCacheGuavaService.java @@ -33,7 +33,7 @@ public class InstanceCacheGuavaService implements InstanceCacheService { private final Logger logger = LoggerFactory.getLogger(InstanceCacheGuavaService.class); - private final Cache INSTANCE_CACHE = CacheBuilder.newBuilder().initialCapacity(100).maximumSize(5000).build(); + private final Cache integerCache = CacheBuilder.newBuilder().initialCapacity(100).maximumSize(5000).build(); private final DAOService daoService; @@ -46,7 +46,7 @@ public class InstanceCacheGuavaService implements InstanceCacheService { int applicationId = 0; try { - applicationId = INSTANCE_CACHE.get(applicationInstanceId, () -> dao.getApplicationId(applicationInstanceId)); + applicationId = integerCache.get(applicationInstanceId, () -> dao.getApplicationId(applicationInstanceId)); } catch (Throwable e) { logger.error(e.getMessage(), e); } @@ -54,7 +54,7 @@ public class InstanceCacheGuavaService implements InstanceCacheService { if (applicationId == 0) { applicationId = dao.getApplicationId(applicationInstanceId); if (applicationId != 0) { - INSTANCE_CACHE.put(applicationInstanceId, applicationId); + integerCache.put(applicationInstanceId, applicationId); } } return applicationId; diff --git a/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ServiceIdCacheGuavaService.java b/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ServiceIdCacheGuavaService.java index 8d7fe1def..3d6105d3e 100644 --- a/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ServiceIdCacheGuavaService.java +++ b/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ServiceIdCacheGuavaService.java @@ -34,7 +34,7 @@ public class ServiceIdCacheGuavaService implements ServiceIdCacheService { private final Logger logger = LoggerFactory.getLogger(ServiceIdCacheGuavaService.class); - private final Cache SERVICE_CACHE = CacheBuilder.newBuilder().maximumSize(1000).build(); + private final Cache serviceIdCache = CacheBuilder.newBuilder().maximumSize(1000).build(); private final DAOService daoService; @@ -47,7 +47,7 @@ public class ServiceIdCacheGuavaService implements ServiceIdCacheService { int serviceId = 0; try { - serviceId = SERVICE_CACHE.get(applicationId + Const.ID_SPLIT + serviceName, () -> dao.getServiceId(applicationId, serviceName)); + serviceId = serviceIdCache.get(applicationId + Const.ID_SPLIT + serviceName, () -> dao.getServiceId(applicationId, serviceName)); } catch (Throwable e) { logger.error(e.getMessage(), e); } @@ -55,7 +55,7 @@ public class ServiceIdCacheGuavaService implements ServiceIdCacheService { if (serviceId == 0) { serviceId = dao.getServiceId(applicationId, serviceName); if (serviceId != 0) { - SERVICE_CACHE.put(applicationId + Const.ID_SPLIT + serviceName, serviceId); + serviceIdCache.put(applicationId + Const.ID_SPLIT + serviceName, serviceId); } } return serviceId; diff --git a/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ServiceNameCacheGuavaService.java b/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ServiceNameCacheGuavaService.java index 7056f4e8e..9a895eb1f 100644 --- a/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ServiceNameCacheGuavaService.java +++ b/apm-collector/apm-collector-cache/collector-cache-guava-provider/src/main/java/org/skywalking/apm/collector/cache/guava/service/ServiceNameCacheGuavaService.java @@ -35,7 +35,7 @@ public class ServiceNameCacheGuavaService implements ServiceNameCacheService { private final Logger logger = LoggerFactory.getLogger(ServiceNameCacheGuavaService.class); - private final Cache CACHE = CacheBuilder.newBuilder().maximumSize(10000).build(); + private final Cache serviceNameCache = CacheBuilder.newBuilder().maximumSize(10000).build(); private final DAOService daoService; @@ -48,7 +48,7 @@ public class ServiceNameCacheGuavaService implements ServiceNameCacheService { String serviceName = Const.EMPTY_STRING; try { - serviceName = CACHE.get(serviceId, () -> dao.getServiceName(serviceId)); + serviceName = serviceNameCache.get(serviceId, () -> dao.getServiceName(serviceId)); } catch (Throwable e) { logger.error(e.getMessage(), e); } @@ -56,7 +56,7 @@ public class ServiceNameCacheGuavaService implements ServiceNameCacheService { if (StringUtils.isEmpty(serviceName)) { serviceName = dao.getServiceName(serviceId); if (StringUtils.isNotEmpty(serviceName)) { - CACHE.put(serviceId, serviceName); + serviceNameCache.put(serviceId, serviceName); } } diff --git a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Graph.java b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Graph.java index 9e825ab19..801dab7a5 100644 --- a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Graph.java +++ b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Graph.java @@ -32,8 +32,8 @@ public final class Graph { this.id = id; } - public void start(INPUT INPUT) { - entryWay.in(INPUT); + public void start(INPUT input) { + entryWay.in(input); } public Node addNode(NodeProcessor nodeProcessor) { @@ -53,7 +53,7 @@ public final class Graph { if (nodeIndex.containsKey(nodeId)) { throw new PotentialCyclicGraphException("handler=" + node.getHandler().getClass().getName() - + " already exists in graph[" + id + "】"); + + " already exists in graph[" + id + "]"); } nodeIndex.put(nodeId, node); } diff --git a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/GraphManager.java b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/GraphManager.java index b0803a951..26cd39d5f 100644 --- a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/GraphManager.java +++ b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/GraphManager.java @@ -35,7 +35,7 @@ public enum GraphManager { * @param graphId represents a graph, which is used for finding it. * @return */ - public synchronized Graph createIfAbsent(int graphId, Class input) { + public synchronized Graph createIfAbsent(int graphId, Class input) { if (!allGraphs.containsKey(graphId)) { Graph graph = new Graph(graphId); allGraphs.put(graphId, graph); diff --git a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/GraphNodeFinder.java b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/GraphNodeFinder.java index b48a01516..44a78edf0 100644 --- a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/GraphNodeFinder.java +++ b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/GraphNodeFinder.java @@ -35,10 +35,10 @@ public class GraphNodeFinder { * * @param handlerId of specific node in graph. * @param outputClass of the found node - * @param type of given output class + * @param type of given output class * @return Node instance. */ - public Node findNode(int handlerId, Class outputClass) { + public Node findNode(int handlerId, Class outputClass) { ConcurrentHashMap graphNodeIndex = graph.getNodeIndex(); Node node = graphNodeIndex.get(handlerId); if (node == null) { diff --git a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Next.java b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Next.java index 31ddba477..1bbaedb9f 100644 --- a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Next.java +++ b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Next.java @@ -42,9 +42,9 @@ public class Next implements Executor { /** * Drive to the next nodes * - * @param INPUT + * @param input */ - @Override public void execute(INPUT INPUT) { - ways.forEach(way -> way.in(INPUT)); + @Override public void execute(INPUT input) { + ways.forEach(way -> way.in(input)); } } diff --git a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Node.java b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Node.java index e5bda3038..9df55deeb 100644 --- a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Node.java +++ b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/Node.java @@ -47,8 +47,8 @@ public final class Node { } } - final void execute(INPUT INPUT) { - nodeProcessor.process(INPUT, next); + final void execute(INPUT input) { + nodeProcessor.process(input, next); } NodeProcessor getHandler() { diff --git a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/NodeProcessor.java b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/NodeProcessor.java index 1847f75b5..112f7cd6d 100644 --- a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/NodeProcessor.java +++ b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/NodeProcessor.java @@ -21,7 +21,7 @@ package org.skywalking.apm.collector.core.graph; /** * @author peng-yongsheng, wu-sheng */ -public interface NodeProcessor { +public interface NodeProcessor { /** * The unique id in the certain graph. * @@ -29,5 +29,5 @@ public interface NodeProcessor { */ int id(); - void process(INPUT INPUT, Next next); + void process(input input, Next next); } diff --git a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/WayToNode.java b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/WayToNode.java index 19e30df2c..ecaeec7a3 100644 --- a/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/WayToNode.java +++ b/apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/graph/WayToNode.java @@ -33,10 +33,10 @@ public abstract class WayToNode { destination = new Node(graph, destinationHandler); } - protected abstract void in(INPUT INPUT); + protected abstract void in(INPUT input); - protected void out(INPUT INPUT) { - destination.execute(INPUT); + protected void out(INPUT input) { + destination.execute(input); } Node getDestination() { diff --git a/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/GraphManagerTest.java b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/GraphManagerTest.java index 09d8c3713..c00b0c3cd 100644 --- a/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/GraphManagerTest.java +++ b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/GraphManagerTest.java @@ -31,7 +31,7 @@ import org.junit.Test; public class GraphManagerTest { private static PrintStream OUT_REF; private ByteArrayOutputStream outputStream; - private static String lineSeparator = System.lineSeparator(); + private static String LINE_SEPARATE = System.lineSeparator(); @Before public void initAndHoldOut() { @@ -54,8 +54,8 @@ public class GraphManagerTest { testGraph.start("Input String"); String output = outputStream.toString(); - String expected = "Node1 process: s=Input String" + lineSeparator + - "Node2 process: s=Input String" + lineSeparator; + String expected = "Node1 process: s=Input String" + LINE_SEPARATE + + "Node2 process: s=Input String" + LINE_SEPARATE; Assert.assertEquals(expected, output); } @@ -68,9 +68,9 @@ public class GraphManagerTest { graph.start("Input String"); String output = outputStream.toString(); - String expected = "Node1 process: s=Input String" + lineSeparator + - "Node2 process: s=Input String" + lineSeparator + - "Node4 process: int=123" + lineSeparator; + String expected = "Node1 process: s=Input String" + LINE_SEPARATE + + "Node2 process: s=Input String" + LINE_SEPARATE + + "Node4 process: int=123" + LINE_SEPARATE; Assert.assertEquals(expected, output); } @@ -92,7 +92,7 @@ public class GraphManagerTest { next.execute(123); String output = outputStream.toString(); String expected = - "Node4 process: int=123" + lineSeparator; + "Node4 process: int=123" + LINE_SEPARATE; Assert.assertEquals(expected, output); } @@ -118,14 +118,14 @@ public class GraphManagerTest { public void testDeadEndWay() { Graph graph = GraphManager.INSTANCE.createIfAbsent(7, String.class); graph.addNode(new Node1Processor()).addNext(new WayToNode(new Node2Processor()) { - @Override protected void in(String INPUT) { + @Override protected void in(String input) { //don't call `out(intput)`; } }); graph.start("Input String"); String output = outputStream.toString(); - String expected = "Node1 process: s=Input String" + lineSeparator; + String expected = "Node1 process: s=Input String" + LINE_SEPARATE; Assert.assertEquals(expected, output); } @@ -134,7 +134,7 @@ public class GraphManagerTest { public void testEntryWay() { Graph graph = GraphManager.INSTANCE.createIfAbsent(8, String.class); graph.addNode(new WayToNode(new Node1Processor()) { - @Override protected void in(String INPUT) { + @Override protected void in(String input) { //don't call `out(intput)`; } }).addNext(new Node2Processor()); diff --git a/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node1Processor.java b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node1Processor.java index a87bd87fc..2c7ee68d1 100644 --- a/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node1Processor.java +++ b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node1Processor.java @@ -21,13 +21,13 @@ package org.skywalking.apm.collector.core.graph; /** * @author wusheng */ -public class Node1Processor implements NodeProcessor { +public class Node1Processor extends OutputProcessor implements NodeProcessor { @Override public int id() { return 1; } @Override public void process(String s, Next next) { - System.out.println("Node1 process: s=" + s); + outstream().println("Node1 process: s=" + s); next.execute(s); } } diff --git a/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node2Processor.java b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node2Processor.java index 098e1dea6..c67bbdd8a 100644 --- a/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node2Processor.java +++ b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node2Processor.java @@ -21,13 +21,13 @@ package org.skywalking.apm.collector.core.graph; /** * @author wusheng */ -public class Node2Processor implements NodeProcessor { +public class Node2Processor extends OutputProcessor implements NodeProcessor { @Override public int id() { return 2; } @Override public void process(String s, Next next) { - System.out.println("Node2 process: s=" + s); + outstream().println("Node2 process: s=" + s); next.execute(123); } } diff --git a/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node3Processor.java b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node3Processor.java index 818b536ca..14583c739 100644 --- a/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node3Processor.java +++ b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node3Processor.java @@ -21,14 +21,14 @@ package org.skywalking.apm.collector.core.graph; /** * @author wusheng */ -public class Node3Processor implements NodeProcessor { +public class Node3Processor extends OutputProcessor implements NodeProcessor { @Override public int id() { return 3; } @Override public void process(Long aLong, Next next) { - System.out.println("Node3 process: long=" + aLong); + outstream().println("Node3 process: long=" + aLong); next.execute(aLong); } } diff --git a/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node4Processor.java b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node4Processor.java index 914ab1792..49d52bd91 100644 --- a/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node4Processor.java +++ b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/Node4Processor.java @@ -21,14 +21,14 @@ package org.skywalking.apm.collector.core.graph; /** * @author wusheng */ -public class Node4Processor implements NodeProcessor { +public class Node4Processor extends OutputProcessor implements NodeProcessor { @Override public int id() { return 4; } @Override public void process(Integer in, Next next) { - System.out.println("Node4 process: int=" + in); + outstream().println("Node4 process: int=" + in); next.execute(new Long(in.intValue())); } } diff --git a/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/OutputProcessor.java b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/OutputProcessor.java new file mode 100644 index 000000000..b3524e9ee --- /dev/null +++ b/apm-collector/apm-collector-core/src/test/java/org/skywalking/apm/collector/core/graph/OutputProcessor.java @@ -0,0 +1,30 @@ +/* + * Copyright 2017, OpenSkywalking Organization All rights reserved. + * + * Licensed 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. + * + * Project repository: https://github.com/OpenSkywalking/skywalking + */ + +package org.skywalking.apm.collector.core.graph; + +import java.io.PrintStream; + +/** + * @author wu-sheng + */ +public class OutputProcessor { + protected PrintStream outstream() { + return System.out; + } +} diff --git a/apm-collector/apm-collector-remote/collector-remote-kafka-provider/pom.xml b/apm-collector/apm-collector-remote/collector-remote-kafka-provider/pom.xml index cad87cba8..0b979ebd8 100644 --- a/apm-collector/apm-collector-remote/collector-remote-kafka-provider/pom.xml +++ b/apm-collector/apm-collector-remote/collector-remote-kafka-provider/pom.xml @@ -30,7 +30,6 @@ collector-remote-kafka-provider jar -<<<<<<< HEAD org.skywalking @@ -39,6 +38,3 @@ -======= - ->>>>>>> 406c4f52d8251eb81aa868ec38f17789e18e0dc0 diff --git a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractLocalAsyncWorkerProvider.java b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractLocalAsyncWorkerProvider.java index d87ffebf1..6eae47c4b 100644 --- a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractLocalAsyncWorkerProvider.java +++ b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractLocalAsyncWorkerProvider.java @@ -27,7 +27,7 @@ import org.skywalking.apm.collector.storage.service.DAOService; /** * @author peng-yongsheng */ -public abstract class AbstractLocalAsyncWorkerProvider & QueueExecutor> extends AbstractWorkerProvider { +public abstract class AbstractLocalAsyncWorkerProvider & QueueExecutor> extends AbstractWorkerProvider { public abstract int queueSize(); @@ -41,7 +41,7 @@ public abstract class AbstractLocalAsyncWorkerProvider queueEventHandler = queueCreatorService.create(queueSize(), localAsyncWorker); return new LocalAsyncWorkerRef<>(localAsyncWorker, queueEventHandler); diff --git a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractRemoteWorkerProvider.java b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractRemoteWorkerProvider.java index dce4fe55e..c51e34024 100644 --- a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractRemoteWorkerProvider.java +++ b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractRemoteWorkerProvider.java @@ -30,7 +30,7 @@ import org.skywalking.apm.collector.storage.service.DAOService; * @author peng-yongsheng * @since v3.0-2017 */ -public abstract class AbstractRemoteWorkerProvider> extends AbstractWorkerProvider { +public abstract class AbstractRemoteWorkerProvider> extends AbstractWorkerProvider { private final DAOService daoService; private final RemoteClientService remoteClientService; @@ -48,7 +48,7 @@ public abstract class AbstractRemoteWorkerProvider workerRef = new RemoteWorkerRef<>(remoteWorker); return workerRef; diff --git a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractWorker.java b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractWorker.java index 65bfb4185..7b12aa71d 100644 --- a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractWorker.java +++ b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractWorker.java @@ -41,10 +41,10 @@ public abstract class AbstractWorker im */ protected abstract void onWork(INPUT message) throws WorkerException; - @Override public final void process(INPUT INPUT, Next next) { + @Override public final void process(INPUT input, Next next) { this.next = next; try { - onWork(INPUT); + onWork(input); } catch (WorkerException e) { logger.error(e.getMessage(), e); } diff --git a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractWorkerProvider.java b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractWorkerProvider.java index 3af912766..881a43e5e 100644 --- a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractWorkerProvider.java +++ b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/AbstractWorkerProvider.java @@ -24,6 +24,6 @@ import org.skywalking.apm.collector.storage.service.DAOService; /** * @author peng-yongsheng */ -public abstract class AbstractWorkerProvider> implements Provider { - public abstract WorkerType workerInstance(DAOService daoService); +public abstract class AbstractWorkerProvider> implements Provider { + public abstract WORKER_TYPE workerInstance(DAOService daoService); } diff --git a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/LocalAsyncWorkerRef.java b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/LocalAsyncWorkerRef.java index d0dcbab2c..b5a2b51ed 100644 --- a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/LocalAsyncWorkerRef.java +++ b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/LocalAsyncWorkerRef.java @@ -35,11 +35,11 @@ public class LocalAsyncWorkerRef extend this.queueEventHandler = queueEventHandler; } - @Override protected void in(INPUT INPUT) { - queueEventHandler.tell(INPUT); + @Override protected void in(INPUT input) { + queueEventHandler.tell(input); } - @Override protected void out(INPUT INPUT) { - super.out(INPUT); + @Override protected void out(INPUT input) { + super.out(input); } } diff --git a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/RemoteWorkerRef.java b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/RemoteWorkerRef.java index f06d36400..b03f627ac 100644 --- a/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/RemoteWorkerRef.java +++ b/apm-collector/apm-collector-stream/collector-stream-provider/src/main/java/org/skywalking/apm/collector/stream/worker/base/RemoteWorkerRef.java @@ -61,8 +61,8 @@ public class RemoteWorkerRef extends Wo } } - @Override protected void out(INPUT INPUT) { - super.out(INPUT); + @Override protected void out(INPUT input) { + super.out(input); } private Boolean isAcrossJVM() { diff --git a/checkStyle.xml b/checkStyle.xml index 567beb43f..b1572e965 100644 --- a/checkStyle.xml +++ b/checkStyle.xml @@ -81,11 +81,11 @@ - + - + -- GitLab