Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjian232 committed Aug 30, 2023
1 parent 85e81b5 commit ff81231
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -499,15 +499,15 @@ public synchronized void rotateCache(
* If the first nn in the cache is active, the active nn priority cannot be lowered.
* This happens when other threads have already updated the cache.
*/
if(firstNamenodeContext.getState().equals(ACTIVE)) {
if (firstNamenodeContext.getState().equals(ACTIVE)) {
return namenodeContexts;
}
/*
* If the first nn in the cache at this time is not the nn
* that needs to be lowered in priority, there is no need to rotate.
* This happens when other threads have already rotated the cache.
*/
if(firstNamenodeContext.getRpcAddress().equals(namenode.getRpcAddress())) {
if (firstNamenodeContext.getRpcAddress().equals(namenode.getRpcAddress())) {
List<FederationNamenodeContext> rotatedNnContexts = new ArrayList<>(namenodeContexts);
Collections.rotate(rotatedNnContexts, -1);
return rotatedNnContexts;
Expand Down

0 comments on commit ff81231

Please sign in to comment.