Skip to content

Commit

Permalink
Merge 3fa1e4b into 52c0eef
Browse files Browse the repository at this point in the history
  • Loading branch information
sijie committed Jun 12, 2017
2 parents 52c0eef + 3fa1e4b commit 443e256
Show file tree
Hide file tree
Showing 275 changed files with 2,708 additions and 320 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -27,3 +27,6 @@ logs/

# vagrant
.vagrant

# shade plugins
*dependency-reduced-pom.xml
4 changes: 2 additions & 2 deletions distributedlog-benchmark/pom.xml
Expand Up @@ -27,12 +27,12 @@
<dependencies>
<dependency>
<groupId>org.apache.distributedlog</groupId>
<artifactId>distributedlog-client</artifactId>
<artifactId>distributedlog-proxy-client</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.distributedlog</groupId>
<artifactId>distributedlog-service</artifactId>
<artifactId>distributedlog-proxy-server</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
Expand Down
Expand Up @@ -28,6 +28,7 @@
import org.apache.distributedlog.io.CompressionCodec;
import org.apache.distributedlog.service.DistributedLogClient;
import org.apache.distributedlog.service.DistributedLogClientBuilder;
import org.apache.distributedlog.thrift.service.StatusCode;
import org.apache.distributedlog.util.SchedulerUtils;
import com.twitter.finagle.builder.ClientBuilder;
import com.twitter.finagle.stats.StatsReceiver;
Expand Down Expand Up @@ -278,7 +279,7 @@ public void run() {
exceptionsLogger.getCounter(cause.getClass().getName()).inc();
if (cause instanceof DLException) {
DLException dle = (DLException) cause;
dlErrorCodeLogger.getCounter(dle.getCode().toString()).inc();
dlErrorCodeLogger.getCounter(StatusCode.findByValue(dle.getCode()).toString()).inc();
}
}
}
Expand Down
55 changes: 32 additions & 23 deletions distributedlog-core/pom.xml
Expand Up @@ -87,12 +87,7 @@
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>${libthrift.version}</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>scrooge-core_2.11</artifactId>
<version>${scrooge.version}</version>
<version>0.9.3</version>
</dependency>
<dependency>
<groupId>org.apache.bookkeeper</groupId>
Expand Down Expand Up @@ -149,23 +144,6 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.twitter</groupId>
<artifactId>scrooge-maven-plugin</artifactId>
<version>${scrooge-maven-plugin.version}</version>
<configuration>
<language>java</language>
</configuration>
<executions>
<execution>
<id>thrift-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
Expand Down Expand Up @@ -206,6 +184,37 @@
<excludeFilterFile>${basedir}/src/main/resources/findbugsExclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin.version}</version>
<configuration>
<!-- put your configurations here -->
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<artifactSet>
<includes>
<include>org.apache.thrift:libthrift</include>
</includes>
</artifactSet>
<minimizeJar>true</minimizeJar>
<relocations>
<relocation>
<pattern>org.apache.thrift</pattern>
<shadedPattern>dl-shade.org.apache.thrift</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
Expand Down
Expand Up @@ -17,7 +17,6 @@
*/
package org.apache.distributedlog.exceptions;

import org.apache.distributedlog.thrift.service.StatusCode;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.KeeperException.Code;

Expand Down

0 comments on commit 443e256

Please sign in to comment.