Skip to content

Commit

Permalink
Add javadoc summary where missing
Browse files Browse the repository at this point in the history
The javadoc summary is expected by error-prone's `MissingSummary` check.
Apparently the error-prone version currently in use could not find
these, but a newer version can.
  • Loading branch information
findepi committed Jun 18, 2024
1 parent 6f5ebd7 commit fe24818
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ Map<SortKey, Long> mapStatistics() {
}

/**
* Returns assignment summary for every subtask.
*
* @return assignment summary for every subtask. Key is subtaskId. Value pair is (weight assigned
* to the subtask, number of keys assigned to the subtask)
*/
Expand Down Expand Up @@ -328,7 +330,11 @@ static class KeyAssignment {
}
}

/** @return subtask id */
/**
* Select a subtask for the key.
*
* @return subtask id
*/
int select() {
if (assignedSubtasks.length == 1) {
// only choice. no need to run random number generator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ synchronized boolean hasFullHistory() {
return count >= history.length;
}

/** @return true if split discovery should pause because assigner has too many splits already. */
/**
* Checks whether split discovery should paused.
*
* @return true if split discovery should pause because assigner has too many splits already.
*/
synchronized boolean shouldPauseSplitDiscovery(int pendingSplitCountFromAssigner) {
if (count < history.length) {
// only check throttling when full history is obtained.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ Map<SortKey, Long> mapStatistics() {
}

/**
* Returns assignment summary for every subtask.
*
* @return assignment summary for every subtask. Key is subtaskId. Value pair is (weight assigned
* to the subtask, number of keys assigned to the subtask)
*/
Expand Down Expand Up @@ -328,7 +330,11 @@ static class KeyAssignment {
}
}

/** @return subtask id */
/**
* Select a subtask for the key.
*
* @return subtask id
*/
int select() {
if (assignedSubtasks.length == 1) {
// only choice. no need to run random number generator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ synchronized boolean hasFullHistory() {
return count >= history.length;
}

/** @return true if split discovery should pause because assigner has too many splits already. */
/**
* Checks whether split discovery should paused.
*
* @return true if split discovery should pause because assigner has too many splits already.
*/
synchronized boolean shouldPauseSplitDiscovery(int pendingSplitCountFromAssigner) {
if (count < history.length) {
// only check throttling when full history is obtained.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ Map<SortKey, Long> mapStatistics() {
}

/**
* Returns assignment summary for every subtask.
*
* @return assignment summary for every subtask. Key is subtaskId. Value pair is (weight assigned
* to the subtask, number of keys assigned to the subtask)
*/
Expand Down Expand Up @@ -326,7 +328,11 @@ static class KeyAssignment {
}
}

/** @return subtask id */
/**
* Select a subtask for the key.
*
* @return subtask id
*/
int select() {
if (assignedSubtasks.length == 1) {
// only choice. no need to run random number generator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ synchronized boolean hasFullHistory() {
return count >= history.length;
}

/** @return true if split discovery should pause because assigner has too many splits already. */
/**
* Checks whether split discovery should paused.
*
* @return true if split discovery should pause because assigner has too many splits already.
*/
synchronized boolean shouldPauseSplitDiscovery(int pendingSplitCountFromAssigner) {
if (count < history.length) {
// only check throttling when full history is obtained.
Expand Down

0 comments on commit fe24818

Please sign in to comment.