ALTER MIGRATION RULE

Description

The ALTER MIGRATION RULE syntax is used to alter migration rule.

Syntax

Grammar Railroad diagram

  1. AlterMigrationRule ::=
  2. 'ALTER' 'MIGRATION' 'RULE' ('(' (readConfiguration ',')? (writeConfiguration ',')? (dataChannel)? ')')?
  3. readConfiguration ::=
  4. 'READ' '(' ('WORKER_THREAD' '=' workerThreadPoolSize ',')? ('BATCH_SIZE' '=' batchSize ',')? ('SHARDING_SIZE' '=' shardingSize ',')? (rateLimiter)? ')'
  5. writeConfiguration ::=
  6. 'WRITE' '(' ('WORKER_THREAD' '=' workerThreadPoolSize ',')? ('BATCH_SIZE' '=' batchSize ',')? ('SHARDING_SIZE' '=' shardingSize ',')? (rateLimiter)? ')'
  7. dataChannel ::=
  8. 'STREAM_CHANNEL' '(' 'TYPE' '(' 'NAME' '=' algorithmName ',' propertiesDefinition ')' ')'
  9. workerThreadPoolSize ::=
  10. int
  11. batchSize ::=
  12. int
  13. shardingSize ::=
  14. int
  15. rateLimiter ::=
  16. 'RATE_LIMITER' '(' 'TYPE' '(' 'NAME' '=' algorithmName ',' propertiesDefinition ')' ')'
  17. algorithmName ::=
  18. string
  19. propertiesDefinition ::=
  20. 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
  21. key ::=
  22. string
  23. value ::=
  24. literal

Supplement

  • ALTER MIGRATION RULE able to modify only one configuration in the data migration rule without affecting other configurations.

Example

  • Alter migration rule
  1. ALTER MIGRATION RULE (
  2. READ( WORKER_THREAD=40, BATCH_SIZE=1000, SHARDING_SIZE=10000000, RATE_LIMITER (TYPE(NAME='QPS',PROPERTIES('qps'='500')))),
  3. WRITE( WORKER_THREAD=40, BATCH_SIZE=1000, RATE_LIMITER (TYPE(NAME='TPS',PROPERTIES('tps'='2000')))),
  4. STREAM_CHANNEL ( TYPE(NAME='MEMORY',PROPERTIES('block-queue-size'='10000')))
  5. );
  • Alter read configuration only in migration rule
  1. ALTER MIGRATION RULE (
  2. READ(WORKER_THREAD=40, BATCH_SIZE=1000, SHARDING_SIZE=10000000, RATE_LIMITER (TYPE(NAME='QPS',PROPERTIES('qps'='500'))))
  3. );
  • Alter write configuration only in migration rule
  1. ALTER MIGRATION RULE (
  2. WRITE(WORKER_THREAD=40, BATCH_SIZE=1000, SHARDING_SIZE=10000000, RATE_LIMITER (TYPE(NAME='QPS',PROPERTIES('qps'='500'))))
  3. );
  • Alter stream channel configuration in migration rule
  1. ALTER MIGRATION RULE (
  2. STREAM_CHANNEL ( TYPE( NAME='MEMORY', PROPERTIES('block-queue-size'='10000')))
  3. );

Reserved word

ALTER, MIGRATION, RULE, READ, WRITE, WORKER_THREAD, BATCH_SIZE, SHARDING_SIZE, STREAM_CHANNEL, TYPE, NAME, PROPERTIES