Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Shardingsphere
提交
953682de
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,发现更多精彩内容 >>
提交
953682de
编写于
6月 06, 2019
作者:
T
tristaZero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add worker.id setting
上级
9f2f2ee1
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
24 addition
and
1 deletion
+24
-1
sharding-core/sharding-core-common/src/test/java/org/apache/shardingsphere/core/strategy/keygen/SnowflakeShardingKeyGeneratorTest.java
...re/strategy/keygen/SnowflakeShardingKeyGeneratorTest.java
+1
-0
sharding-core/sharding-core-common/src/test/resources/yaml/sharding-rule.yaml
...ng-core-common/src/test/resources/yaml/sharding-rule.yaml
+2
-0
sharding-core/sharding-core-optimize/src/test/resources/yaml/optimize-rule.yaml
...-core-optimize/src/test/resources/yaml/optimize-rule.yaml
+6
-0
sharding-core/sharding-core-parse/sharding-core-parse-test/src/test/resources/yaml/parse-rule.yaml
...g-core-parse-test/src/test/resources/yaml/parse-rule.yaml
+2
-0
sharding-core/sharding-core-rewrite/src/test/resources/yaml/rewrite-rule.yaml
...ng-core-rewrite/src/test/resources/yaml/rewrite-rule.yaml
+4
-0
sharding-jdbc/sharding-jdbc-orchestration/src/test/resources/yaml/unit/sharding.yaml
...-orchestration/src/test/resources/yaml/unit/sharding.yaml
+4
-0
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/RegistryCenterServiceLoader.java
...ration/internal/registry/RegistryCenterServiceLoader.java
+1
-1
sharding-spring/sharding-jdbc-orchestration-spring/sharding-jdbc-orchestration-spring-boot-starter/src/test/resources/application-sharding.properties
...tarter/src/test/resources/application-sharding.properties
+2
-0
sharding-spring/sharding-jdbc-spring/sharding-jdbc-spring-boot-starter/src/test/resources/application-sharding.properties
...tarter/src/test/resources/application-sharding.properties
+2
-0
未找到文件。
sharding-core/sharding-core-common/src/test/java/org/apache/shardingsphere/core/strategy/keygen/SnowflakeShardingKeyGeneratorTest.java
浏览文件 @
953682de
...
...
@@ -49,6 +49,7 @@ public final class SnowflakeShardingKeyGeneratorTest {
ExecutorService
executor
=
Executors
.
newFixedThreadPool
(
threadNumber
);
int
taskNumber
=
threadNumber
<<
2
;
final
SnowflakeShardingKeyGenerator
keyGenerator
=
new
SnowflakeShardingKeyGenerator
();
keyGenerator
.
setProperties
(
new
Properties
());
Set
<
Comparable
<?>>
actual
=
new
HashSet
<>();
for
(
int
i
=
0
;
i
<
taskNumber
;
i
++)
{
...
...
sharding-core/sharding-core-common/src/test/resources/yaml/sharding-rule.yaml
浏览文件 @
953682de
...
...
@@ -81,6 +81,8 @@ shardingRule:
keyGenerator
:
type
:
SNOWFLAKE
column
:
order_id
props
:
worker.id
:
123
logicIndex
:
order_index
t_order_item
:
actualDataNodes
:
ds_${0..1}.t_order_item_${0..1}
...
...
sharding-core/sharding-core-optimize/src/test/resources/yaml/optimize-rule.yaml
浏览文件 @
953682de
...
...
@@ -42,6 +42,8 @@ shardingRule:
keyGenerator
:
type
:
SNOWFLAKE
column
:
order_id
props
:
worker.id
:
123
logicIndex
:
order_index
t_encrypt
:
actualDataNodes
:
ds_${0..1}.t_encrypt_${0..1}
...
...
@@ -56,6 +58,8 @@ shardingRule:
keyGenerator
:
type
:
SNOWFLAKE
column
:
order_id
props
:
worker.id
:
123
t_encrypt_query
:
actualDataNodes
:
ds_${0..1}.t_encrypt_query${0..1}
databaseStrategy
:
...
...
@@ -69,6 +73,8 @@ shardingRule:
keyGenerator
:
type
:
SNOWFLAKE
column
:
order_id
props
:
worker.id
:
123
encryptRule
:
encryptors
:
t_encryptor
:
...
...
sharding-core/sharding-core-parse/sharding-core-parse-test/src/test/resources/yaml/parse-rule.yaml
浏览文件 @
953682de
...
...
@@ -45,6 +45,8 @@ shardingRule:
keyGenerator
:
type
:
SNOWFLAKE
column
:
item_id
props
:
worker.id
:
123
t_place
:
actualDataNodes
:
db${0..1}.t_place
tableStrategy
:
...
...
sharding-core/sharding-core-rewrite/src/test/resources/yaml/rewrite-rule.yaml
浏览文件 @
953682de
...
...
@@ -34,6 +34,8 @@ shardingRule:
keyGenerator
:
type
:
SNOWFLAKE
column
:
id
props
:
worker.id
:
123
logicIndex
:
logic_index
table_y
:
actualDataNodes
:
db${0..1}.table_y
...
...
@@ -47,6 +49,8 @@ shardingRule:
keyGenerator
:
type
:
SNOWFLAKE
column
:
id
props
:
worker.id
:
123
bindingTables
:
-
table_x, table_y
encryptRule
:
...
...
sharding-jdbc/sharding-jdbc-orchestration/src/test/resources/yaml/unit/sharding.yaml
浏览文件 @
953682de
...
...
@@ -42,6 +42,8 @@ shardingRule:
keyGenerator
:
type
:
SNOWFLAKE
column
:
order_id
props
:
worker.id
:
123
t_order_item
:
actualDataNodes
:
ds_ms.t_order_item_${0..1}
tableStrategy
:
...
...
@@ -51,6 +53,8 @@ shardingRule:
keyGenerator
:
type
:
SNOWFLAKE
column
:
order_item_id
props
:
worker.id
:
123
bindingTables
:
-
t_order,t_order_item
masterSlaveRules
:
...
...
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/RegistryCenterServiceLoader.java
浏览文件 @
953682de
...
...
@@ -37,7 +37,7 @@ public final class RegistryCenterServiceLoader extends TypeBasedSPIServiceLoader
NewInstanceServiceLoader
.
register
(
RegistryCenter
.
class
);
}
RegistryCenterServiceLoader
()
{
public
RegistryCenterServiceLoader
()
{
super
(
RegistryCenter
.
class
);
}
...
...
sharding-spring/sharding-jdbc-orchestration-spring/sharding-jdbc-orchestration-spring-boot-starter/src/test/resources/application-sharding.properties
浏览文件 @
953682de
...
...
@@ -45,11 +45,13 @@ spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-col
spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression
=
t_order_${order_id % 2}
spring.shardingsphere.sharding.tables.t_order.key-generator.type
=
SNOWFLAKE
spring.shardingsphere.sharding.tables.t_order.key-generator.column
=
order_id
spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id
=
123
spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes
=
ds_${0..1}.t_order_item_${0..1}
spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column
=
order_id
spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression
=
t_order_item_${order_id % 2}
spring.shardingsphere.sharding.tables.t_order_item.key-generator.type
=
SNOWFLAKE
spring.shardingsphere.sharding.tables.t_order_item.key-generator.column
=
order_item_id
spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id
=
123
spring.shardingsphere.sharding.binding-tables
=
t_order,t_order_item
spring.shardingsphere.sharding.broadcast-tables
=
t_config
...
...
sharding-spring/sharding-jdbc-spring/sharding-jdbc-spring-boot-starter/src/test/resources/application-sharding.properties
浏览文件 @
953682de
...
...
@@ -45,11 +45,13 @@ spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-col
spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression
=
t_order_${order_id % 2}
spring.shardingsphere.sharding.tables.t_order.key-generator.type
=
SNOWFLAKE
spring.shardingsphere.sharding.tables.t_order.key-generator.column
=
order_id
spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id
=
123
spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes
=
ds_${0..1}.t_order_item_${0..1}
spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column
=
order_id
spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression
=
t_order_item_${order_id % 2}
spring.shardingsphere.sharding.tables.t_order_item.key-generator.type
=
SNOWFLAKE
spring.shardingsphere.sharding.tables.t_order_item.key-generator.column
=
order_item_id
spring.shardingsphere.sharding.tables.t_order_item.key-generator.props.worker.id
=
123
spring.shardingsphere.sharding.binding-tables
=
t_order,t_order_item
spring.shardingsphere.sharding.broadcast-tables
=
t_config
spring.shardingsphere.sharding.encryptRule.encryptors.order_encrypt.qualifiedColumns
=
t_order.pwd1,t_order.pwd2
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录