swuferhong commented on code in PR #1452:
URL: https://github.com/apache/fluss/pull/1452#discussion_r2664852362
##########
fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorService.java:
##########
@@ -309,12 +316,29 @@ public CompletableFuture<CreateTableResponse>
createTable(CreateTableRequest req
// first, generate the assignment
TableAssignment tableAssignment = null;
+ Map<String, String> properties = tableDescriptor.getProperties();
+ boolean generateUnbalanceAssignment;
+ if
(properties.containsKey(ConfigOptions.TABLE_GENERATE_UNBALANCE_TABLE_ASSIGNMENT.key()))
{
+ generateUnbalanceAssignment =
+ Boolean.parseBoolean(
+ properties.get(
+
ConfigOptions.TABLE_GENERATE_UNBALANCE_TABLE_ASSIGNMENT.key()));
+ } else {
+ generateUnbalanceAssignment = false;
+ }
// only when it's no partitioned table do we generate the assignment
for it
if (!tableDescriptor.isPartitioned()) {
// the replication factor must be set now
int replicaFactor = tableDescriptor.getReplicationFactor();
TabletServerInfo[] servers = metadataCache.getLiveServers();
- tableAssignment = generateAssignment(bucketCount, replicaFactor,
servers);
+ if (generateUnbalanceAssignment) {
+ // this branch is only used for testing.
+ tableAssignment =
+ new TableAssignment(
+ generateUnBalanceAssignment(bucketCount,
replicaFactor));
Review Comment:
This logic already moved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]