-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxy write 'CREATE SHARDING TABLE RULE' #32832
Comments
@hongbofan |
@hongbofan CREATE SHARDING TABLE RULE t_order (
DATANODES("ds_${0..2}.t_order_${0..3}"),
DATABASE_STRATEGY(TYPE="standard",
SHARDING_COLUMN=order_id,
SHARDING_ALGORITHM(TYPE(NAME="CLASS_BASED",
PROPERTIES(
"strategy"="standard", "algorithmClassName"="com.sphereex.example.fixture.CustomShardingAlgorithm",
"mod-value-length"=5,"mod-count"=3)
))),
TABLE_STRATEGY(TYPE="standard",
SHARDING_COLUMN=order_id,
SHARDING_ALGORITHM(TYPE(NAME="CLASS_BASED",
PROPERTIES(
"strategy"="standard", "algorithmClassName"="com.sphereex.example.fixture.CustomShardingAlgorithm",
"mod-value-length"=5,"mod-count"=4)
)))
); |
unpack my jar spi.ShardingAlgorithm's context is |
this way i create sharding algorithm, CREATE SHARDING ALGORITHM source_date_complex ( |
It looks correct. Note that this jar needs to be placed under lib before Proxy is started. Next, you need to find the problem locally. |
Please use |
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. |
Question
first put the jar to /lib
then
CREATE SHARDING TABLE RULE test_table(
STORAGE_UNITS(ds0),
SHARDING_COLUMNS=product_source,creation_date,
TYPE(NAME="SOURCE_DATE_COMPLEX",PROPERTIES("defTable"="test_table","sources"="mall,customer","strategy"="COMPLEX","algorithmClassName"="com.qx.agg.client.sharding.SourceDateComplexShardingAlgorithm")),
KEY_GENERATE_STRATEGY(COLUMN=media_id,TYPE(NAME="snowflake"))
);
'SOURCE_DATE_COMPLEX' is SourceDateComplexShardingAlgorithm’s type
'com.qx.agg.client.sharding.SourceDateComplexShardingAlgorithm' is my tableAlgorithm
how to write the distSql right?
For English only, other languages will not accept.
Before asking a question, make sure you have:
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.
The text was updated successfully, but these errors were encountered: