Skip to content

Commit

Permalink
Merge pull request #36 from sharding-sphere/dev
Browse files Browse the repository at this point in the history
update from origin
  • Loading branch information
beckhampu authored Sep 28, 2018
2 parents 8b7a9be + 0623d39 commit 0f230c5
Show file tree
Hide file tree
Showing 98 changed files with 791 additions and 1,559 deletions.
155 changes: 104 additions & 51 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,41 @@
<project.build.locale>zh_CN</project.build.locale>

<guava.version>18.0</guava.version>
<guava-retrying.version>2.0.0</guava-retrying.version>
<common-lang3>3.6</common-lang3>
<slf4j.version>1.7.7</slf4j.version>

<groovy.version>2.4.5</groovy.version>
<snakeyaml.version>1.16</snakeyaml.version>

<netty.version>4.1.16.Final</netty.version>
<commons-codec.version>1.10</commons-codec.version>

<javax.transaction.version>1.1</javax.transaction.version>
<atomikos.version>4.0.4</atomikos.version>

<curator.version>2.10.0</curator.version>
<grpc.version>1.7.0</grpc.version>
<protobuf.version>3.4.0</protobuf.version>
<curator.version>2.10.0</curator.version>
<guava-retrying.version>2.0.0</guava-retrying.version>

<opentracing.version>0.30.0</opentracing.version>
<slf4j.version>1.7.7</slf4j.version>
<logback.version>1.2.0</logback.version>

<lombok.version>1.16.4</lombok.version>

<springframework.version>[4.3.6.RELEASE,5.0.0.M1)</springframework.version>
<spring-boot.version>[1.5.0.RELEASE,2.0.0.M1)</spring-boot.version>
<commons-pool.version>1.6</commons-pool.version>
<commons-dbcp2.version>2.2.0</commons-dbcp2.version>
<mysql-connector-java.version>5.1.42</mysql-connector-java.version>

<junit.version>4.12</junit.version>
<hamcrest.version>1.3</hamcrest.version>
<mockito.version>2.7.21</mockito.version>
<logback.version>1.2.0</logback.version>

<h2.version>1.4.196</h2.version>
<mysql-connector-java.version>5.1.42</mysql-connector-java.version>
<postgresql.version>9.4.1212</postgresql.version>
<mssql.version>6.1.7.jre7-preview</mssql.version>
<hikari-cp.version>2.4.11</hikari-cp.version>
<junit.version>4.12</junit.version>
<hamcrest.version>1.3</hamcrest.version>
<mockito.version>2.7.21</mockito.version>
<commons-dbcp2.version>2.2.0</commons-dbcp2.version>
<commons-pool.version>1.6</commons-pool.version>

<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
<maven-assembly-plugin.version>3.1.0</maven-assembly-plugin.version>
Expand Down Expand Up @@ -91,15 +99,16 @@
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.github.rholder</groupId>
<artifactId>guava-retrying</artifactId>
<version>${guava-retrying.version}</version>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${common-lang3}</version>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>

<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
Expand All @@ -111,6 +120,7 @@
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
Expand All @@ -121,16 +131,7 @@
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>

<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
Expand All @@ -151,6 +152,7 @@
<artifactId>transactions-jdbc</artifactId>
<version>${atomikos.version}</version>
</dependency>

<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
Expand Down Expand Up @@ -187,6 +189,12 @@
<artifactId>grpc-stub</artifactId>
<version>${grpc.version}</version>
</dependency>
<dependency>
<groupId>com.github.rholder</groupId>
<artifactId>guava-retrying</artifactId>
<version>${guava-retrying.version}</version>
</dependency>

<dependency>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-util</artifactId>
Expand Down Expand Up @@ -224,6 +232,12 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand All @@ -242,6 +256,25 @@
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java7</artifactId>
<version>${hikari-cp.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
Expand Down Expand Up @@ -284,18 +317,6 @@
<version>${mssql.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java7</artifactId>
<version>${hikari-cp.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
Expand All @@ -308,18 +329,6 @@
<version>${curator.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand All @@ -335,6 +344,47 @@
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
</dependencies>

<build>
<extensions>
<extension>
Expand Down Expand Up @@ -547,6 +597,9 @@
<format>xml</format>
<instrumentation>
<ignoreTrivial>true</ignoreTrivial>
<ignoreMethodAnnotations>
<ignoreMethodAnnotation>lombok.Generated</ignoreMethodAnnotation>
</ignoreMethodAnnotations>
<excludes>
<exclude>io/shardingsphere/**/*Test.class</exclude>
<exclude>io/shardingsphere/**/Test*.class</exclude>
Expand Down
50 changes: 2 additions & 48 deletions sharding-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,8 @@
</parent>
<artifactId>sharding-core</artifactId>
<name>${project.artifactId}</name>

<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
Expand All @@ -39,49 +28,14 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java7</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@

import com.google.common.base.Preconditions;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
* Default distributed primary key generator.
Expand All @@ -45,7 +42,6 @@
*
* @author gaohongtao
*/
@Slf4j
public final class DefaultKeyGenerator implements KeyGenerator {

public static final long EPOCH;
Expand Down Expand Up @@ -108,9 +104,6 @@ public synchronized Number generateKey() {
sequence = 0;
}
lastTime = currentMillis;
if (log.isDebugEnabled()) {
log.debug("{}-{}-{}", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date(lastTime)), workerId, sequence);
}
return ((currentMillis - EPOCH) << TIMESTAMP_LEFT_SHIFT_BITS) | (workerId << WORKER_ID_LEFT_SHIFT_BITS) | sequence;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package io.shardingsphere.core.merger.dql.groupby.aggregation;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.math.BigDecimal;
import java.util.List;
Expand All @@ -29,7 +28,6 @@
* @author zhangliang
*/
@RequiredArgsConstructor
@Slf4j
public final class AccumulationAggregationUnit implements AggregationUnit {

private BigDecimal result;
Expand All @@ -43,7 +41,6 @@ public void merge(final List<Comparable<?>> values) {
result = new BigDecimal("0");
}
result = result.add(new BigDecimal(values.get(0).toString()));
log.trace("Accumulation result: {}", result.toString());
}

@Override
Expand Down
Loading

0 comments on commit 0f230c5

Please sign in to comment.