Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d70a40a3c9
|
|
@ -8,7 +8,7 @@ install:
|
|||
- cd ..
|
||||
|
||||
script:
|
||||
- cd skywalking-protocol
|
||||
- cd skywalking-network
|
||||
- mvn clean install -Dmaven.test.skip=true
|
||||
- cd ..
|
||||
- mvn clean install -Dmaven.test.skip=true
|
||||
|
|
|
|||
2
pom.xml
2
pom.xml
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<groupId>com.a.eye</groupId>
|
||||
<artifactId>skywalking</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<version>2.0-2016</version>
|
||||
|
||||
<modules>
|
||||
<module>skywalking-alarm</module>
|
||||
|
|
|
|||
|
|
@ -8,21 +8,13 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>skywalking-logging</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>skywalking-logging</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<modules>
|
||||
<module>skywalking-logging-api</module>
|
||||
<module>skywalking-logging-log4j-impl</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>skywalking-logging</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>2.0-2016</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>skywalking-logging-api</artifactId>
|
||||
|
||||
</project>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.a.eye.skywalking.logging;
|
||||
package com.a.eye.skywalking.logging.api;
|
||||
|
||||
/**
|
||||
* Created by xin on 2016/11/10.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.a.eye.skywalking.logging;
|
||||
package com.a.eye.skywalking.logging.api;
|
||||
|
||||
/**
|
||||
* Created by xin on 2016/11/10.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.a.eye.skywalking.logging;
|
||||
package com.a.eye.skywalking.logging.api;
|
||||
|
||||
/**
|
||||
* Created by xin on 2016/11/10.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.a.eye.skywalking.logging;
|
||||
package com.a.eye.skywalking.logging.api;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>skywalking-logging</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>2.0-2016</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>skywalking-logging-impl-log4j2</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<artifactId>skywalking-logging-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.4.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.a.eye.skywalking.logging.impl.log4j2;
|
||||
|
||||
import com.a.eye.skywalking.logging.api.ILog;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Created by wusheng on 2016/11/11.
|
||||
*/
|
||||
public class Log4j2Logger implements ILog {
|
||||
private Logger logger;
|
||||
|
||||
public Log4j2Logger(Logger logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(String message) {
|
||||
logger.info(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(String message, Object... arguments) {
|
||||
logger.info(message, arguments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(String message, Throwable e) {
|
||||
logger.error(message, e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(String message, Object argument, Throwable e) {
|
||||
logger.error(message, argument, e);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.a.eye.skywalking.logging.impl.log4j2;
|
||||
|
||||
import com.a.eye.skywalking.logging.api.ILog;
|
||||
import com.a.eye.skywalking.logging.api.LogResolver;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
/**
|
||||
* Created by wusheng on 2016/11/11.
|
||||
*/
|
||||
public class Log4j2Resolver implements LogResolver {
|
||||
@Override
|
||||
public ILog getLogger(Class<?> clazz) {
|
||||
return new Log4j2Logger(LogManager.getLogger(clazz));
|
||||
}
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.4.1</version>
|
||||
<version>2.4.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
|
|
@ -103,6 +103,18 @@
|
|||
<shadedPattern>${shade.io.netty.target}</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
<artifactSet>
|
||||
<includes>
|
||||
<include>io.grpc:grpc-*:jar:*</include>
|
||||
<inclued>io.netty:netty-*:jar:*</inclued>
|
||||
<inclued>com.google.protobuf:*:jar:*</inclued>
|
||||
<inclued>com.google.code.gson:gson:jar:*</inclued>
|
||||
<include>com.google.guava:guava:jar:*</include>
|
||||
</includes>
|
||||
</artifactSet>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
|
|||
|
|
@ -6,9 +6,12 @@ option java_package = "com.a.eye.skywalking.network.grpc";
|
|||
import "Spans.proto";
|
||||
|
||||
service TraceSearchService{
|
||||
rpc search(string) returns (SearchResult){};
|
||||
rpc search(TraceSearchCondition) returns (SearchResult){};
|
||||
}
|
||||
|
||||
message TraceSearchCondition{
|
||||
string traceid = 1;
|
||||
}
|
||||
|
||||
message SearchResult{
|
||||
repeated Span spans= 1;
|
||||
|
|
|
|||
|
|
@ -25,32 +25,8 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<artifactId>skywalking-logging</artifactId>
|
||||
<artifactId>skywalking-logging-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>local-central</id>
|
||||
<url>http://10.128.7.197:8081/nexus/content/groups/public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>apmparty</id>
|
||||
<url>http://10.128.7.197:8081/nexus/content/repositories/apmparty/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.a.eye.skywalking.registry.impl.zookeeper;
|
||||
|
||||
import com.a.eye.skywalking.logging.ILog;
|
||||
import com.a.eye.skywalking.logging.LogManager;
|
||||
import com.a.eye.skywalking.logging.api.ILog;
|
||||
import com.a.eye.skywalking.logging.api.LogManager;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.a.eye.skywalking.registry.impl.zookeeper;
|
||||
|
||||
import com.a.eye.skywalking.logging.ILog;
|
||||
import com.a.eye.skywalking.logging.LogManager;
|
||||
import com.a.eye.skywalking.logging.api.ILog;
|
||||
import com.a.eye.skywalking.logging.api.LogManager;
|
||||
import com.a.eye.skywalking.registry.api.*;
|
||||
import org.apache.zookeeper.*;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,15 +16,19 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<artifactId>skywalking-network</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.4.1</version>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<artifactId>skywalking-registry</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<artifactId>skywalking-logging-impl-log4j2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
|
|
@ -36,6 +40,13 @@
|
|||
<artifactId>data-carrier</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.a.eye.skywalking.storage.block.index;
|
||||
|
||||
import com.a.eye.skywalking.logging.api.ILog;
|
||||
import com.a.eye.skywalking.logging.api.LogManager;
|
||||
import com.a.eye.skywalking.storage.block.index.exception.BlockIndexPersistenceFailedException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -14,7 +14,7 @@ import static com.a.eye.skywalking.storage.config.Config.BlockIndex.STORAGE_BASE
|
|||
|
||||
public class BlockIndexUpdator {
|
||||
|
||||
private static Logger logger = LogManager.getLogger(BlockIndexUpdator.class);
|
||||
private static ILog logger = LogManager.getLogger(BlockIndexUpdator.class);
|
||||
private L1Cache l1Cache;
|
||||
private L2Cache l2Cache;
|
||||
|
||||
|
|
@ -64,8 +64,7 @@ public class BlockIndexUpdator {
|
|||
List<Long> indexData = new ArrayList<>();
|
||||
BufferedReader indexFileReader = null;
|
||||
try {
|
||||
indexFileReader =
|
||||
new BufferedReader(new FileReader(new File(STORAGE_BASE_PATH, DATA_FILE_INDEX_FILE_NAME)));
|
||||
indexFileReader = new BufferedReader(new FileReader(new File(STORAGE_BASE_PATH, DATA_FILE_INDEX_FILE_NAME)));
|
||||
String indexDataStr = null;
|
||||
while ((indexDataStr = indexFileReader.readLine()) != null) {
|
||||
indexData.add(Long.parseLong(indexDataStr));
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.a.eye.skywalking.storage.block.index;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import com.a.eye.skywalking.logging.api.ILog;
|
||||
import com.a.eye.skywalking.logging.api.LogManager;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.TreeSet;
|
||||
|
|
@ -11,13 +11,13 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
|||
|
||||
/**
|
||||
* 块索引的一级缓存
|
||||
*
|
||||
* <p>
|
||||
* Created by xin on 2016/11/2.
|
||||
*/
|
||||
public class L1Cache {
|
||||
|
||||
private static final int MAX_DATA_KEEP_SIZE = 30;
|
||||
private static Logger logger = LogManager.getLogger(L1Cache.class);
|
||||
private static ILog logger = LogManager.getLogger(L1Cache.class);
|
||||
private TreeSet<Long> cacheData = new TreeSet<Long>();
|
||||
private final ReadWriteLock updateLock = new ReentrantReadWriteLock();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
package com.a.eye.skywalking.storage.data;
|
||||
|
||||
import com.a.eye.skywalking.logging.api.ILog;
|
||||
import com.a.eye.skywalking.logging.api.LogManager;
|
||||
import com.a.eye.skywalking.storage.block.index.BlockIndexEngine;
|
||||
import com.a.eye.skywalking.storage.data.index.IndexDBConnector;
|
||||
import org.apache.jute.Index;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
|
@ -16,7 +15,7 @@ import static com.a.eye.skywalking.storage.config.Config.DataIndex.MAX_CAPACITY_
|
|||
*/
|
||||
public class IndexDataCapacityMonitor extends Thread {
|
||||
|
||||
private static Logger logger = LogManager.getLogger(IndexDataCapacityMonitor.class);
|
||||
private static ILog logger = LogManager.getLogger(IndexDataCapacityMonitor.class);
|
||||
private static Detector detector;
|
||||
|
||||
public static void addIndexData(long timestamp, int size) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package com.a.eye.skywalking.storage.data.index;
|
||||
|
||||
import com.a.eye.skywalking.logging.api.ILog;
|
||||
import com.a.eye.skywalking.logging.api.LogManager;
|
||||
import com.a.eye.skywalking.storage.config.Config;
|
||||
import com.a.eye.skywalking.storage.data.exception.ConnectorInitializeFailedException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.sql.*;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ public class IndexDBConnector {
|
|||
|
||||
private static final int MAX_BATCH_SIZE = 20;
|
||||
|
||||
private static Logger logger = LogManager.getLogger(IndexDBConnector.class);
|
||||
private static ILog logger = LogManager.getLogger(IndexDBConnector.class);
|
||||
|
||||
static {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue