Undo accidental FSNamesystem change introduced in HDFS-6224 commit.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1586515 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fad8620a71
commit
3b008baf35
|
@ -7336,7 +7336,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
cacheManager.waitForRescanIfNeeded();
|
cacheManager.waitForRescanIfNeeded();
|
||||||
}
|
}
|
||||||
writeLock();
|
writeLock();
|
||||||
String effectiveDirectiveStr = null;
|
|
||||||
Long result = null;
|
Long result = null;
|
||||||
try {
|
try {
|
||||||
checkOperation(OperationCategory.WRITE);
|
checkOperation(OperationCategory.WRITE);
|
||||||
|
@ -7353,7 +7352,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
getEditLog().logAddCacheDirectiveInfo(effectiveDirective,
|
getEditLog().logAddCacheDirectiveInfo(effectiveDirective,
|
||||||
cacheEntry != null);
|
cacheEntry != null);
|
||||||
result = effectiveDirective.getId();
|
result = effectiveDirective.getId();
|
||||||
effectiveDirectiveStr = effectiveDirective.toString();
|
|
||||||
success = true;
|
success = true;
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
|
@ -7361,7 +7359,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
getEditLog().logSync();
|
getEditLog().logSync();
|
||||||
}
|
}
|
||||||
if (isAuditEnabled() && isExternalInvocation()) {
|
if (isAuditEnabled() && isExternalInvocation()) {
|
||||||
logAuditEvent(success, "addCacheDirective", effectiveDirectiveStr, null, null);
|
logAuditEvent(success, "addCacheDirective", null, null, null);
|
||||||
}
|
}
|
||||||
RetryCache.setState(cacheEntry, success, result);
|
RetryCache.setState(cacheEntry, success, result);
|
||||||
}
|
}
|
||||||
|
@ -7398,8 +7396,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
getEditLog().logSync();
|
getEditLog().logSync();
|
||||||
}
|
}
|
||||||
if (isAuditEnabled() && isExternalInvocation()) {
|
if (isAuditEnabled() && isExternalInvocation()) {
|
||||||
String idStr = "{id: " + directive.getId().toString() + "}";
|
logAuditEvent(success, "modifyCacheDirective", null, null, null);
|
||||||
logAuditEvent(success, "modifyCacheDirective", idStr, directive.toString(), null);
|
|
||||||
}
|
}
|
||||||
RetryCache.setState(cacheEntry, success);
|
RetryCache.setState(cacheEntry, success);
|
||||||
}
|
}
|
||||||
|
@ -7427,8 +7424,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
if (isAuditEnabled() && isExternalInvocation()) {
|
if (isAuditEnabled() && isExternalInvocation()) {
|
||||||
String idStr = "{id: " + id.toString() + "}";
|
logAuditEvent(success, "removeCacheDirective", null, null,
|
||||||
logAuditEvent(success, "removeCacheDirective", idStr, null,
|
|
||||||
null);
|
null);
|
||||||
}
|
}
|
||||||
RetryCache.setState(cacheEntry, success);
|
RetryCache.setState(cacheEntry, success);
|
||||||
|
@ -7453,7 +7449,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
} finally {
|
} finally {
|
||||||
readUnlock();
|
readUnlock();
|
||||||
if (isAuditEnabled() && isExternalInvocation()) {
|
if (isAuditEnabled() && isExternalInvocation()) {
|
||||||
logAuditEvent(success, "listCacheDirectives", filter.toString(), null,
|
logAuditEvent(success, "listCacheDirectives", null, null,
|
||||||
null);
|
null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7470,7 +7466,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
}
|
}
|
||||||
writeLock();
|
writeLock();
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
String poolInfoStr = null;
|
|
||||||
try {
|
try {
|
||||||
checkOperation(OperationCategory.WRITE);
|
checkOperation(OperationCategory.WRITE);
|
||||||
if (isInSafeMode()) {
|
if (isInSafeMode()) {
|
||||||
|
@ -7481,13 +7476,12 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
pc.checkSuperuserPrivilege();
|
pc.checkSuperuserPrivilege();
|
||||||
}
|
}
|
||||||
CachePoolInfo info = cacheManager.addCachePool(req);
|
CachePoolInfo info = cacheManager.addCachePool(req);
|
||||||
poolInfoStr = info.toString();
|
|
||||||
getEditLog().logAddCachePool(info, cacheEntry != null);
|
getEditLog().logAddCachePool(info, cacheEntry != null);
|
||||||
success = true;
|
success = true;
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
if (isAuditEnabled() && isExternalInvocation()) {
|
if (isAuditEnabled() && isExternalInvocation()) {
|
||||||
logAuditEvent(success, "addCachePool", poolInfoStr, null, null);
|
logAuditEvent(success, "addCachePool", req.getPoolName(), null, null);
|
||||||
}
|
}
|
||||||
RetryCache.setState(cacheEntry, success);
|
RetryCache.setState(cacheEntry, success);
|
||||||
}
|
}
|
||||||
|
@ -7520,8 +7514,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
if (isAuditEnabled() && isExternalInvocation()) {
|
if (isAuditEnabled() && isExternalInvocation()) {
|
||||||
String poolNameStr = "{poolName: " + req.getPoolName() + "}";
|
logAuditEvent(success, "modifyCachePool", req.getPoolName(), null, null);
|
||||||
logAuditEvent(success, "modifyCachePool", poolNameStr, req.toString(), null);
|
|
||||||
}
|
}
|
||||||
RetryCache.setState(cacheEntry, success);
|
RetryCache.setState(cacheEntry, success);
|
||||||
}
|
}
|
||||||
|
@ -7554,8 +7547,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
writeUnlock();
|
||||||
if (isAuditEnabled() && isExternalInvocation()) {
|
if (isAuditEnabled() && isExternalInvocation()) {
|
||||||
String poolNameStr = "{poolName: " + cachePoolName + "}";
|
logAuditEvent(success, "removeCachePool", cachePoolName, null, null);
|
||||||
logAuditEvent(success, "removeCachePool", poolNameStr, null, null);
|
|
||||||
}
|
}
|
||||||
RetryCache.setState(cacheEntry, success);
|
RetryCache.setState(cacheEntry, success);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue