Skip to content

Commit

Permalink
chore(pd): translate CJK punctuations to English (apache#2625)
Browse files Browse the repository at this point in the history
  • Loading branch information
VGalaxies authored Aug 10, 2024
1 parent dc3070f commit 2e27c58
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ public void changePeerList(String peerList) throws PDException {

/**
* Working mode
* AutoIf the number of partitions on each store reaches the maximum value, you need to
* Auto: If the number of partitions on each store reaches the maximum value, you need to
* specify the store group id. The store group id is 0, which is the default partition
* splitData(ClusterOp.OperationMode mode, int storeGroupId, List<ClusterOp.SplitDataParam>
* params)
Expand All @@ -1038,9 +1038,9 @@ public void splitData() throws PDException {

/**
* Working mode
* AutoIf the number of partitions on each store reaches the maximum value, you need to
* Auto: If the number of partitions on each store reaches the maximum value, you need to
* specify the store group id. The store group id is 0, which is the default partition
* Expert:Expert ModeSpecifier is required splitParams, limit SplitDataParam in the same
* Expert: Expert Mode, Specifier is required splitParams, limit SplitDataParam in the same
* store group
*
* @param mode
Expand Down Expand Up @@ -1085,11 +1085,11 @@ public void balancePartition() throws PDException {

/**
* Migrate partitions in manual mode
* //Working mode
* // AutoAutomatic transfer to the same number of partitions per Store
* // Expert:Expert ModeSpecifier is required transferParams
* // Working mode
* // Auto: Automatic transfer to the same number of partitions per Store
* // Expert: Expert Mode, Specifier is required transferParams
*
* @param params Designation transferParams, expert moderequest source store / target store
* @param params Designation transferParams, expert mode, request source store / target store
* in the same store group
* @throws PDException
*/
Expand Down Expand Up @@ -1228,7 +1228,7 @@ public void deleteShardGroup(int groupId) throws PDException {
* Used for the store's shard list rebuild
*
* @param groupId shard group id
* @param shards shard listdelete when shards size is 0
* @param shards shard list, delete when shards size is 0
*/
public void updateShardGroupOp(int groupId, List<Metapb.Shard> shards) throws PDException {
Pdpb.ChangeShardRequest request = Pdpb.ChangeShardRequest.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public Metapb.PartitionShard getPartitionByCode(String graphName, long code) thr
partition, 0))
.build();
log.debug(
"{} Partition get code = {}, partition id = {}, start = {}, end = {} leader = {}",
"{} Partition get code = {}, partition id = {}, start = {}, end = {}, leader = {}",
graphName, (code), partition.getId(), partition.getStartKey(),
partition.getEndKey(), partShard.getLeader());

Expand Down Expand Up @@ -264,7 +264,7 @@ private Metapb.Partition newPartition(String graphName, long code) throws PDExce
}

/**
* compute graph partition idpartition gap * store group id + offset
* compute graph partition id, partition gap * store group id + offset
*
* @param graph graph
* @param offset offset
Expand Down Expand Up @@ -764,7 +764,7 @@ private synchronized void splitPartition(Metapb.Graph graph,
}

/**
* transfer leader to other shard
* transfer leader to other shard
* Just transfer a partition
*/
public void transferLeader(Integer partId, Metapb.Shard shard) {
Expand Down Expand Up @@ -862,7 +862,7 @@ private synchronized void combineGraphPartition(Metapb.Graph graph, int toCount,

var groupSize = partitions.size() / toCount; // merge group size
// 0~12 to 4 partitions
// scheme0,1,2 => 0, 3,4,5 -> 1, 6,7,8 ->2, 9,10,11 -> 3
// scheme: 0,1,2 => 0, 3,4,5 => 1, 6,7,8 => 2, 9,10,11 => 3
// Ensure the continuity of partitions
for (int i = 0; i < toCount; i++) {
var startKey = partitions.get(i * groupSize).getStartKey();
Expand Down Expand Up @@ -1010,7 +1010,7 @@ public void addStatusListener(PartitionStatusListener listener) {
*/
protected void fireChangeShard(Metapb.Partition partition, List<Metapb.Shard> shards,
ConfChangeType changeType) {
log.info("fireChangeShard partition: {}-{} changeType:{} {}", partition.getGraphName(),
log.info("fireChangeShard partition: {}-{}, changeType: {} {}", partition.getGraphName(),
partition.getId(), changeType, shards);
instructionListeners.forEach(cmd -> {
try {
Expand All @@ -1037,7 +1037,7 @@ public void changeShard(int groupId, List<Metapb.Shard> shards) throws PDExcepti
* @param partition
*/
protected void fireSplitPartition(Metapb.Partition partition, SplitPartition splitPartition) {
log.info("fireSplitPartition partition: {}-{} split :{}",
log.info("fireSplitPartition partition: {}-{}, split: {}",
partition.getGraphName(), partition.getId(), splitPartition);
instructionListeners.forEach(cmd -> {
try {
Expand All @@ -1052,7 +1052,7 @@ protected void fireSplitPartition(Metapb.Partition partition, SplitPartition spl
* Send a Leader Switchover message
*/
protected void fireTransferLeader(Metapb.Partition partition, TransferLeader transferLeader) {
log.info("fireTransferLeader partition: {}-{} leader :{}",
log.info("fireTransferLeader partition: {}-{}, leader: {}",
partition.getGraphName(), partition.getId(), transferLeader);
instructionListeners.forEach(cmd -> {
try {
Expand All @@ -1067,7 +1067,7 @@ protected void fireTransferLeader(Metapb.Partition partition, TransferLeader tra
* Send a message to the partition to move data
*
* @param partition Original partition
* @param movePartition Target partitioncontains key range
* @param movePartition Target partition, contains key range
*/
protected void fireMovePartition(Metapb.Partition partition, MovePartition movePartition) {
log.info("fireMovePartition partition: {} -> {}",
Expand Down Expand Up @@ -1159,8 +1159,8 @@ public synchronized void handleMoveTask(MetaTask.Task task) throws PDException {
/**
* When all migration subtasks succeed:
* 1. Send cleanup source partition directives
* 2. Set up target onlinerenewal key range, renewal graph partition count
* 3. delete move taskmission ended
* 2. Set up target online, renewal key range, renewal graph partition count
* 3. delete move task, mission ended
*
* @param subTasks all move sub tasks
* @param graphName graph name
Expand Down Expand Up @@ -1238,7 +1238,7 @@ private void handleMoveTaskAllSuccess(List<MetaTask.Task> subTasks, String graph
fireCleanPartition(source, cleanPartition);
}

// renewal key range, Local updatesclient renewal
// renewal key range, Local updates, client renewal
// updatePartition(targetPartitions);

// renewal target Partition status, source may be deleted, so do not process
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ public synchronized List<Metapb.Shard> reallocShards(Metapb.ShardGroup shardGrou
}

/**
* According to the number of partitionsdistribute group shard
* According to the number of partitions, distribute group shard
*
* @param groups list of (partition id, count)
* @return total groups
Expand Down

0 comments on commit 2e27c58

Please sign in to comment.