Skip to content

Commit

Permalink
add log and javadoc
Browse files Browse the repository at this point in the history
add log and javadoc
  • Loading branch information
KeeProMise committed Sep 2, 2023
1 parent b8b1dea commit d338de4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ public void setRouterId(String router) {
*/
@Override
public synchronized void rotateCache(
String nsId, FederationNamenodeContext namenode, boolean listObserversFirst) {
String nsId, FederationNamenodeContext namenode, boolean listObserversFirst) {
cacheNS.compute(Pair.of(nsId, listObserversFirst), (ns, namenodeContexts) -> {
if (namenodeContexts == null || namenodeContexts.size() <= 1) {
return namenodeContexts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ public Object invokeMethod(
nsId, rpcAddress, ioe.getMessage());
if (this.namenodeResolver != null) {
this.namenodeResolver.rotateCache(nsId, namenode, shouldUseObserver);
LOG.info("Rotate cache of pair: <ns: {}, observer use: {}>", nsId, shouldUseObserver);
}
// Throw RetriableException so that client can retry
throw new RetriableException(ioe);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,11 @@ public void waitClusterUp() throws IOException {
}
}

/**
* Get cache flush interval in milliseconds.
*
* @return Cache flush interval in milliseconds.
*/
public long getCacheFlushInterval() {
return cacheFlushInterval;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public void setRouterId(String router) {

@Override
public void rotateCache(
String nsId, FederationNamenodeContext namenode, boolean listObserversFirst) {
String nsId, FederationNamenodeContext namenode, boolean listObserversFirst) {
}

/**
Expand Down

0 comments on commit d338de4

Please sign in to comment.