YARN-10909. AbstractCSQueue: Annotate all methods with VisibleForTesting that are only used by test code. Contributed by JackWangCS, Szilard Nemeth
This commit is contained in:
parent
6e57449350
commit
9cfd8d0a83
|
@ -287,6 +287,7 @@ public abstract class AbstractCSQueue implements CSQueue {
|
|||
* Set maximum capacity - used only for testing.
|
||||
* @param maximumCapacity new max capacity
|
||||
*/
|
||||
@VisibleForTesting
|
||||
void setMaxCapacity(float maximumCapacity) {
|
||||
writeLock.lock();
|
||||
try {
|
||||
|
@ -1023,7 +1024,8 @@ public abstract class AbstractCSQueue implements CSQueue {
|
|||
return getEffectiveMaxCapacity(nodePartition);
|
||||
}
|
||||
|
||||
public boolean hasChildQueues() {
|
||||
@VisibleForTesting
|
||||
boolean hasChildQueues() {
|
||||
List<CSQueue> childQueues = getChildQueues();
|
||||
return childQueues != null && !childQueues.isEmpty();
|
||||
}
|
||||
|
@ -1608,7 +1610,7 @@ public abstract class AbstractCSQueue implements CSQueue {
|
|||
getAutoExpiredDeletionTime());
|
||||
}
|
||||
|
||||
public void updateLastSubmittedTimeStamp() {
|
||||
void updateLastSubmittedTimeStamp() {
|
||||
writeLock.lock();
|
||||
try {
|
||||
usageTracker.setLastSubmittedTimestamp(Time.monotonicNow());
|
||||
|
@ -1617,7 +1619,8 @@ public abstract class AbstractCSQueue implements CSQueue {
|
|||
}
|
||||
}
|
||||
|
||||
public long getLastSubmittedTimestamp() {
|
||||
@VisibleForTesting
|
||||
long getLastSubmittedTimestamp() {
|
||||
readLock.lock();
|
||||
|
||||
try {
|
||||
|
@ -1628,7 +1631,7 @@ public abstract class AbstractCSQueue implements CSQueue {
|
|||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public void setLastSubmittedTimestamp(long lastSubmittedTimestamp) {
|
||||
void setLastSubmittedTimestamp(long lastSubmittedTimestamp) {
|
||||
writeLock.lock();
|
||||
try {
|
||||
usageTracker.setLastSubmittedTimestamp(lastSubmittedTimestamp);
|
||||
|
|
Loading…
Reference in New Issue