Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Shardingsphere
提交
2db00682
Shardingsphere
项目概览
apache
/
Shardingsphere
通知
56
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Shardingsphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2db00682
编写于
3月 21, 2019
作者:
T
tristaZero
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of
ssh://github.com/shardingjdbc/sharding-jdbc
into dev
上级
c6daa529
804da0c1
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
651 addition
and
299 deletion
+651
-299
DISCLAIMER
DISCLAIMER
+5
-0
NOTICE
NOTICE
+5
-0
pom.xml
pom.xml
+1
-0
sharding-core/sharding-core-parse/sharding-core-parse-test/pom.xml
...core/sharding-core-parse/sharding-core-parse-test/pom.xml
+4
-0
sharding-proxy/pom.xml
sharding-proxy/pom.xml
+0
-4
sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/text/admin/UnicastBackendHandler.java
...ardingproxy/backend/text/admin/UnicastBackendHandler.java
+7
-1
sharding-proxy/sharding-proxy-backend/src/test/java/org/apache/shardingsphere/shardingproxy/backend/text/admin/UnicastBackendHandlerTest.java
...ngproxy/backend/text/admin/UnicastBackendHandlerTest.java
+4
-0
sharding-proxy/sharding-proxy-bootstrap/pom.xml
sharding-proxy/sharding-proxy-bootstrap/pom.xml
+10
-43
sharding-sql-test/pom.xml
sharding-sql-test/pom.xml
+1
-1
shardingsphere-distribution/pom.xml
shardingsphere-distribution/pom.xml
+6
-243
shardingsphere-distribution/shardingsphere-basic-distribution/pom.xml
...re-distribution/shardingsphere-basic-distribution/pom.xml
+272
-0
shardingsphere-distribution/shardingsphere-basic-distribution/src/main/assembly/binary-distribution.xml
...ic-distribution/src/main/assembly/binary-distribution.xml
+4
-2
shardingsphere-distribution/shardingsphere-basic-distribution/src/main/assembly/source-distribution.xml
...ic-distribution/src/main/assembly/source-distribution.xml
+3
-2
shardingsphere-distribution/shardingsphere-proxy-distribution/pom.xml
...re-distribution/shardingsphere-proxy-distribution/pom.xml
+103
-0
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/assembly/proxy-distribution.xml
...oxy-distribution/src/main/assembly/proxy-distribution.xml
+10
-1
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/docker/Dockerfile
...rdingsphere-proxy-distribution/src/main/docker/Dockerfile
+2
-2
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/bin/start.bat
...phere-proxy-distribution/src/main/resources/bin/start.bat
+0
-0
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/bin/start.sh
...sphere-proxy-distribution/src/main/resources/bin/start.sh
+0
-0
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/bin/stop.sh
...gsphere-proxy-distribution/src/main/resources/bin/stop.sh
+0
-0
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/config-master_slave.yaml
...ribution/src/main/resources/conf/config-master_slave.yaml
+61
-0
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/config-sharding.yaml
...distribution/src/main/resources/conf/config-sharding.yaml
+75
-0
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/server.yaml
...re-proxy-distribution/src/main/resources/conf/server.yaml
+45
-0
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/logback.xml
...gsphere-proxy-distribution/src/main/resources/logback.xml
+33
-0
未找到文件。
DISCLAIMER
0 → 100644
浏览文件 @
2db00682
Apache ShardingSphere (incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC.
Incubation is required of all newly accepted projects until a further review indicates that the infrastructure,
communications, and decision making process have stabilized in a manner consistent with other successful ASF projects.
While incubation status is not necessarily a reflection of the completeness or stability of the code,
it does indicate that the project has yet to be fully endorsed by the ASF.
NOTICE
0 → 100644
浏览文件 @
2db00682
Apache ShardingSphere (incubating)
Copyright 2018-2019 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
pom.xml
浏览文件 @
2db00682
...
...
@@ -491,6 +491,7 @@
</dependencies>
<build>
<finalName>
apache-shardingsphere-incubating-${project.version}
</finalName>
<extensions>
<extension>
<groupId>
kr.motd.maven
</groupId>
...
...
sharding-core/sharding-core-parse/sharding-core-parse-test/pom.xml
浏览文件 @
2db00682
...
...
@@ -26,6 +26,10 @@
<artifactId>
sharding-core-parse-test
</artifactId>
<name>
${project.artifactId}
</name>
<properties>
<maven.deploy.skip>
true
</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
...
...
sharding-proxy/pom.xml
浏览文件 @
2db00682
...
...
@@ -34,8 +34,4 @@
<module>
sharding-proxy-backend
</module>
<module>
sharding-proxy-bootstrap
</module>
</modules>
<properties>
<maven.deploy.skip>
false
</maven.deploy.skip>
</properties>
</project>
sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/text/admin/UnicastBackendHandler.java
浏览文件 @
2db00682
...
...
@@ -23,6 +23,7 @@ import org.apache.shardingsphere.shardingproxy.backend.communication.DatabaseCom
import
org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.connection.BackendConnection
;
import
org.apache.shardingsphere.shardingproxy.backend.response.BackendResponse
;
import
org.apache.shardingsphere.shardingproxy.backend.response.query.QueryData
;
import
org.apache.shardingsphere.shardingproxy.backend.schema.LogicSchema
;
import
org.apache.shardingsphere.shardingproxy.backend.schema.LogicSchemas
;
import
org.apache.shardingsphere.shardingproxy.backend.text.TextProtocolBackendHandler
;
...
...
@@ -46,7 +47,12 @@ public final class UnicastBackendHandler implements TextProtocolBackendHandler {
@Override
public
BackendResponse
execute
()
{
databaseCommunicationEngine
=
databaseCommunicationEngineFactory
.
newTextProtocolInstance
(
LogicSchemas
.
getInstance
().
getLogicSchemas
().
values
().
iterator
().
next
(),
sql
,
backendConnection
);
LogicSchema
logicSchema
=
backendConnection
.
getLogicSchema
();
if
(
null
==
logicSchema
)
{
logicSchema
=
LogicSchemas
.
getInstance
().
getLogicSchemas
().
values
().
iterator
().
next
();
backendConnection
.
setCurrentSchema
(
logicSchema
.
getName
());
}
databaseCommunicationEngine
=
databaseCommunicationEngineFactory
.
newTextProtocolInstance
(
logicSchema
,
sql
,
backendConnection
);
return
databaseCommunicationEngine
.
execute
();
}
...
...
sharding-proxy/sharding-proxy-backend/src/test/java/org/apache/shardingsphere/shardingproxy/backend/text/admin/UnicastBackendHandlerTest.java
浏览文件 @
2db00682
...
...
@@ -30,6 +30,7 @@ import org.junit.Before;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.mockito.Mock
;
import
org.mockito.Spy
;
import
org.mockito.junit.MockitoJUnitRunner
;
import
java.lang.reflect.Field
;
...
...
@@ -39,11 +40,13 @@ import static org.junit.Assert.assertThat;
import
static
org
.
mockito
.
ArgumentMatchers
.
any
;
import
static
org
.
mockito
.
ArgumentMatchers
.
anyString
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
verify
;
import
static
org
.
mockito
.
Mockito
.
when
;
@RunWith
(
MockitoJUnitRunner
.
class
)
public
final
class
UnicastBackendHandlerTest
{
@Spy
private
BackendConnection
backendConnection
=
new
BackendConnection
(
TransactionType
.
LOCAL
);
@Mock
...
...
@@ -61,6 +64,7 @@ public final class UnicastBackendHandlerTest {
setDatabaseCommunicationEngine
(
backendHandler
);
BackendResponse
actual
=
backendHandler
.
execute
();
assertThat
(
actual
,
instanceOf
(
UpdateResponse
.
class
));
verify
(
backendConnection
).
setCurrentSchema
(
null
);
backendHandler
.
execute
();
}
...
...
sharding-proxy/sharding-proxy-bootstrap/pom.xml
浏览文件 @
2db00682
...
...
@@ -77,7 +77,7 @@
<artifactId>
sharding-opentracing
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.zaxxer
</groupId>
<artifactId>
HikariCP-java7
</artifactId>
...
...
@@ -85,52 +85,19 @@
</dependency>
<dependency>
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-classic
</artifactId>
<groupId>
org.postgresql
</groupId>
<artifactId>
postgresql
</artifactId>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.postgresql
</groupId>
<artifactId>
postgresql
</artifactId>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<dependency>
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-classic
</artifactId>
<scope>
runtime
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<configuration>
<finalName>
${project.parent.artifactId}-${project.parent.version}
</finalName>
<descriptors>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>
assembly
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
com.spotify
</groupId>
<artifactId>
docker-maven-plugin
</artifactId>
<configuration>
<imageName>
shardingsphere/sharding-proxy:4.0.0-RC1
</imageName>
<dockerDirectory>
${project.basedir}/src/main/docker
</dockerDirectory>
<resources>
<resource>
<targetPath>
/
</targetPath>
<directory>
${project.build.directory}
</directory>
<include>
${project.build.finalName}.tar.gz
</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</project>
sharding-sql-test/pom.xml
浏览文件 @
2db00682
...
...
@@ -27,6 +27,6 @@
<name>
${project.artifactId}
</name>
<properties>
<maven.deploy.skip>
fals
e
</maven.deploy.skip>
<maven.deploy.skip>
tru
e
</maven.deploy.skip>
</properties>
</project>
shardingsphere-distribution/pom.xml
浏览文件 @
2db00682
...
...
@@ -26,252 +26,15 @@
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
shardingsphere-distribution
</artifactId>
<packaging>
pom
</packaging>
<name>
${project.artifactId}
</name>
<properties>
<maven.deploy.skip>
fals
e
</maven.deploy.skip>
<maven.deploy.skip>
tru
e
</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-common
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-spi
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-common
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-mysql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-postgresql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-oracle
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-sqlserver
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-optimize
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-route
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-rewrite
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-execute
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-merge
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-entry
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-orchestration
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-common
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-transport-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-transport-mysql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-transport-postgresql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-frontend-spi
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-frontend-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-frontend-mysql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-frontend-postgresql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-backend
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-bootstrap
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-transaction-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-transaction-xa-spi
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-transaction-xa-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-orchestration-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-orchestration-reg-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-orchestration-reg-zookeeper-curator
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-orchestration-reg-etcd
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-opentracing
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-spring-boot-starter
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-spring-namespace
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-orchestration-spring-boot-starter
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-orchestration-spring-namespace
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-transaction-spring
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-transaction-spring-boot-starter
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>
release
</id>
<build>
<finalName>
apache-shardingsphere-incubating-${project.version}
</finalName>
<plugins>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<executions>
<execution>
<id>
src
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/source-distribution.xml
</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>
bin
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/binary-distribution.xml
</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<modules>
<module>
shardingsphere-basic-distribution
</module>
<module>
shardingsphere-proxy-distribution
</module>
</modules>
</project>
shardingsphere-distribution/shardingsphere-basic-distribution/pom.xml
0 → 100644
浏览文件 @
2db00682
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->
<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>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
shardingsphere-distribution
</artifactId>
<version>
4.0.0-RC1-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
shardingsphere-basic-distribution
</artifactId>
<name>
${project.artifactId}
</name>
<dependencies>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-common
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-spi
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-common
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-mysql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-postgresql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-oracle
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-parse-sqlserver
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-optimize
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-route
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-rewrite
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-execute
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-merge
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-core-entry
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-orchestration
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-common
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-transport-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-transport-mysql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-transport-postgresql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-frontend-spi
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-frontend-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-frontend-mysql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-frontend-postgresql
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-backend
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-bootstrap
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-transaction-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-transaction-xa-spi
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-transaction-xa-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-orchestration-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-orchestration-reg-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-orchestration-reg-zookeeper-curator
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-orchestration-reg-etcd
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-opentracing
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-spring-boot-starter
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-spring-namespace
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-orchestration-spring-boot-starter
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-orchestration-spring-namespace
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-transaction-spring
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-transaction-spring-boot-starter
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>
release
</id>
<build>
<plugins>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<executions>
<execution>
<id>
src
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/source-distribution.xml
</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>
bin
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/binary-distribution.xml
</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
shardingsphere-distribution/src/main/assembly/binary-distribution.xml
→
shardingsphere-distribution/s
hardingsphere-basic-distribution/s
rc/main/assembly/binary-distribution.xml
浏览文件 @
2db00682
...
...
@@ -22,12 +22,15 @@
<format>
zip
</format>
</formats>
<includeBaseDirectory>
true
</includeBaseDirectory>
<baseDirectory>
${project.build.finalName}-bin-release
</baseDirectory>
<fileSets>
<fileSet>
<directory>
../
</directory>
<directory>
../
../
</directory>
<includes>
<include>
LICENSE
</include>
<include>
NOTICE
</include>
<include>
DISCLAIMER
</include>
</includes>
</fileSet>
</fileSets>
...
...
@@ -37,7 +40,6 @@
<useProjectArtifact>
true
</useProjectArtifact>
<unpack>
false
</unpack>
<outputDirectory>
/lib
</outputDirectory>
<scope>
runtime
</scope>
<includes>
<include>
org.apache.shardingsphere:*
</include>
</includes>
...
...
shardingsphere-distribution/src/main/assembly/source-distribution.xml
→
shardingsphere-distribution/s
hardingsphere-basic-distribution/s
rc/main/assembly/source-distribution.xml
浏览文件 @
2db00682
...
...
@@ -22,17 +22,18 @@
<format>
zip
</format>
</formats>
<includeBaseDirectory>
true
</includeBaseDirectory>
<baseDirectory>
${project.build.finalName}-src-release
</baseDirectory>
<fileSets>
<fileSet>
<directory>
../
</directory>
<directory>
../
../
</directory>
<useDefaultExcludes>
true
</useDefaultExcludes>
<includes>
<include>
**/*
</include>
</includes>
<excludes>
<!-- github ignore -->
<exclude>
.github
</exclude>
<exclude>
**/.github/**
</exclude>
<exclude>
**/*.md
</exclude>
<exclude>
.travis.yml
</exclude>
...
...
shardingsphere-distribution/shardingsphere-proxy-distribution/pom.xml
0 → 100644
浏览文件 @
2db00682
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->
<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>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
shardingsphere-distribution
</artifactId>
<version>
4.0.0-RC1-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
shardingsphere-proxy-distribution
</artifactId>
<name>
${project.artifactId}
</name>
<dependencies>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-proxy-bootstrap
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.zaxxer
</groupId>
<artifactId>
HikariCP-java7
</artifactId>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
org.postgresql
</groupId>
<artifactId>
postgresql
</artifactId>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-classic
</artifactId>
<scope>
runtime
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
com.spotify
</groupId>
<artifactId>
docker-maven-plugin
</artifactId>
<configuration>
<imageName>
shardingsphere/sharding-proxy:4.0.0-RC1
</imageName>
<dockerDirectory>
${project.basedir}/src/main/docker
</dockerDirectory>
<resources>
<resource>
<targetPath>
/
</targetPath>
<directory>
${project.build.directory}
</directory>
<include>
${project.build.finalName}.tar.gz
</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>
release
</id>
<build>
<plugins>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/proxy-distribution.xml
</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>
sharding-proxy
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
\ No newline at end of file
sharding
-proxy/sharding-proxy-bootstrap/src/main/assembly/assembly
.xml
→
sharding
sphere-distribution/shardingsphere-proxy-distribution/src/main/assembly/proxy-distribution
.xml
浏览文件 @
2db00682
...
...
@@ -17,11 +17,12 @@
<assembly
xmlns=
"http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd"
>
<id>
assembl
y
</id>
<id>
sharding-prox
y
</id>
<formats>
<format>
tar.gz
</format>
</formats>
<includeBaseDirectory>
true
</includeBaseDirectory>
<baseDirectory>
${project.build.finalName}-sharding-proxy
</baseDirectory>
<fileSets>
<fileSet>
...
...
@@ -43,6 +44,14 @@
<outputDirectory>
conf
</outputDirectory>
<fileMode>
0644
</fileMode>
</fileSet>
<fileSet>
<directory>
../../
</directory>
<includes>
<include>
LICENSE
</include>
<include>
NOTICE
</include>
<include>
DISCLAIMER
</include>
</includes>
</fileSet>
</fileSets>
<dependencySets>
...
...
sharding
-proxy/sharding-proxy-bootstrap
/src/main/docker/Dockerfile
→
sharding
sphere-distribution/shardingsphere-proxy-distribution
/src/main/docker/Dockerfile
浏览文件 @
2db00682
...
...
@@ -18,6 +18,6 @@
FROM
java:7
MAINTAINER
caohao "caohaoch@gmail.com"
ADD
sharding-proxy-4.0.0-RC1
.tar.gz /
RUN
mv
/
sharding-proxy-4.0.0-RC1
/opt/sharding-proxy
ADD
apache-shardingsphere-incubating-4.0.0-RC1-sharding-proxy
.tar.gz /
RUN
mv
/
apache-shardingsphere-incubating-4.0.0-RC1-sharding-proxy
/opt/sharding-proxy
ENTRYPOINT
/opt/sharding-proxy/bin/start.sh $PORT && tail -f /opt/sharding-proxy/logs/stdout.log
sharding
-proxy/sharding-proxy-bootstrap
/src/main/resources/bin/start.bat
→
sharding
sphere-distribution/shardingsphere-proxy-distribution
/src/main/resources/bin/start.bat
浏览文件 @
2db00682
文件已移动
sharding
-proxy/sharding-proxy-bootstrap
/src/main/resources/bin/start.sh
→
sharding
sphere-distribution/shardingsphere-proxy-distribution
/src/main/resources/bin/start.sh
浏览文件 @
2db00682
文件已移动
sharding
-proxy/sharding-proxy-bootstrap
/src/main/resources/bin/stop.sh
→
sharding
sphere-distribution/shardingsphere-proxy-distribution
/src/main/resources/bin/stop.sh
浏览文件 @
2db00682
文件已移动
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/config-master_slave.yaml
0 → 100644
浏览文件 @
2db00682
#
# 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.
#
######################################################################################################
#
# Here you can configure the rules for the proxy.
# This example is configuration of master-slave rule.
#
# If you want to use master-slave, please refer to this file;
# if you want to use sharding, please refer to the config-sharding.yaml.
#
######################################################################################################
#
#schemaName: master_slave_db
#
#dataSources:
# master_ds:
# url: jdbc:mysql://127.0.0.1:3306/demo_ds_master?serverTimezone=UTC&useSSL=false
# username: root
# password:
# connectionTimeoutMilliseconds: 30000
# idleTimeoutMilliseconds: 60000
# maxLifetimeMilliseconds: 1800000
# maxPoolSize: 50
# slave_ds_0:
# url: jdbc:mysql://127.0.0.1:3306/demo_ds_slave_0?serverTimezone=UTC&useSSL=false
# username: root
# password:
# connectionTimeoutMilliseconds: 30000
# idleTimeoutMilliseconds: 60000
# maxLifetimeMilliseconds: 1800000
# maxPoolSize: 50
# slave_ds_1:
# url: jdbc:mysql://127.0.0.1:3306/demo_ds_slave_1?serverTimezone=UTC&useSSL=false
# username: root
# password:
# connectionTimeoutMilliseconds: 30000
# idleTimeoutMilliseconds: 60000
# maxLifetimeMilliseconds: 1800000
# maxPoolSize: 50
#
#masterSlaveRule:
# name: ms_ds
# masterDataSourceName: master_ds
# slaveDataSourceNames:
# - slave_ds_0
# - slave_ds_1
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/config-sharding.yaml
0 → 100644
浏览文件 @
2db00682
#
# 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.
#
######################################################################################################
#
# Here you can configure the rules for the proxy.
# This example is configuration of sharding rule.
#
# If you want to use sharding, please refer to this file;
# if you want to use master-slave, please refer to the config-master_slave.yaml.
#
######################################################################################################
#
#schemaName: sharding_db
#
#dataSources:
# ds_0:
# url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
# username: root
# password:
# connectionTimeoutMilliseconds: 30000
# idleTimeoutMilliseconds: 60000
# maxLifetimeMilliseconds: 1800000
# maxPoolSize: 50
# ds_1:
# url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
# username: root
# password:
# connectionTimeoutMilliseconds: 30000
# idleTimeoutMilliseconds: 60000
# maxLifetimeMilliseconds: 1800000
# maxPoolSize: 50
#
#shardingRule:
# tables:
# t_order:
# actualDataNodes: ds_${0..1}.t_order_${0..1}
# tableStrategy:
# inline:
# shardingColumn: order_id
# algorithmExpression: t_order_${order_id % 2}
# keyGenerator:
# type: SNOWFLAKE
# column: order_id
# t_order_item:
# actualDataNodes: ds_${0..1}.t_order_item_${0..1}
# tableStrategy:
# inline:
# shardingColumn: order_id
# algorithmExpression: t_order_item_${order_id % 2}
# keyGenerator:
# type: SNOWFLAKE
# column: order_item_id
# bindingTables:
# - t_order,t_order_item
# defaultDatabaseStrategy:
# inline:
# shardingColumn: user_id
# algorithmExpression: ds_${user_id % 2}
# defaultTableStrategy:
# none:
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/conf/server.yaml
0 → 100644
浏览文件 @
2db00682
#
# 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.
#
######################################################################################################
#
# If you want to configure orchestration, authorization and proxy properties, please refer to this file.
#
######################################################################################################
#orchestration:
# name: orchestration_ds
# overwrite: true
# registry:
# serverLists: localhost:2181
# namespace: orchestration
#
#authentication:
# username: root
# password: root
#
#props:
# max.connections.size.per.query: 1
# acceptor.size: 16 # The default value is available processors count * 2.
# executor.size: 16 # Infinite by default.
# proxy.frontend.flush.threshold: 128 # The default value is 128.
# # LOCAL: Proxy will run with LOCAL transaction.
# # XA: Proxy will run with XA transaction.
# # BASE: Proxy will run with B.A.S.E transaction.
# proxy.transaction.type: LOCAL
# proxy.opentracing.enabled: false
# sql.show: false
shardingsphere-distribution/shardingsphere-proxy-distribution/src/main/resources/logback.xml
0 → 100644
浏览文件 @
2db00682
<?xml version="1.0"?>
<!--
~ 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.
-->
<configuration>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<logger
name=
"org.apache.shardingsphere"
level=
"info"
additivity=
"false"
>
<appender-ref
ref=
"console"
/>
</logger>
<root>
<level
value=
"info"
/>
<appender-ref
ref=
"console"
/>
</root>
</configuration>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录