|
@@ -2003,7 +2003,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
|
|
|
HdfsFileStatus resultingStat = null;
|
|
|
FSPermissionChecker pc = getPermissionChecker();
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
waitForLoadingFSImage();
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -2563,7 +2562,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
boolean skipSync = false;
|
|
|
HdfsFileStatus stat = null;
|
|
|
FSPermissionChecker pc = getPermissionChecker();
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
if (blockSize < minBlockSize) {
|
|
|
throw new IOException("Specified block size is less than configured" +
|
|
|
" minimum value (" + DFSConfigKeys.DFS_NAMENODE_MIN_BLOCK_SIZE_KEY
|
|
@@ -3137,7 +3135,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
|
|
|
LocatedBlock lb = null;
|
|
|
FSPermissionChecker pc = getPermissionChecker();
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
byte[][] pathComponents = FSDirectory.getPathComponentsForReservedPath(src);
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -3806,7 +3803,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
throw new IOException("Invalid name: " + dst);
|
|
|
}
|
|
|
FSPermissionChecker pc = getPermissionChecker();
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
byte[][] srcComponents = FSDirectory.getPathComponentsForReservedPath(src);
|
|
|
byte[][] dstComponents = FSDirectory.getPathComponentsForReservedPath(dst);
|
|
|
boolean status = false;
|
|
@@ -3879,7 +3875,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
}
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
|
|
|
if (cacheEntry != null && cacheEntry.isSuccess()) {
|
|
|
return; // Return previous response
|
|
@@ -4003,7 +3998,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
BlocksMapUpdateInfo collectedBlocks = new BlocksMapUpdateInfo();
|
|
|
List<INode> removedINodes = new ChunkedArrayList<INode>();
|
|
|
FSPermissionChecker pc = getPermissionChecker();
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
byte[][] pathComponents = FSDirectory.getPathComponentsForReservedPath(src);
|
|
|
boolean ret = false;
|
|
|
|
|
@@ -7048,7 +7042,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
void updatePipeline(String clientName, ExtendedBlock oldBlock,
|
|
|
ExtendedBlock newBlock, DatanodeID[] newNodes, String[] newStorageIDs)
|
|
|
throws IOException {
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
|
|
|
if (cacheEntry != null && cacheEntry.isSuccess()) {
|
|
|
return; // Return previous response
|
|
@@ -8141,7 +8134,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
*/
|
|
|
void renameSnapshot(String path, String snapshotOldName,
|
|
|
String snapshotNewName) throws SafeModeException, IOException {
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
|
|
|
if (cacheEntry != null && cacheEntry.isSuccess()) {
|
|
@@ -8255,7 +8247,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
*/
|
|
|
void deleteSnapshot(String snapshotRoot, String snapshotName)
|
|
|
throws SafeModeException, IOException {
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = getPermissionChecker();
|
|
|
|
|
|
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
|
|
@@ -8501,7 +8492,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
|
|
|
long addCacheDirective(CacheDirectiveInfo directive, EnumSet<CacheFlag> flags)
|
|
|
throws IOException {
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = isPermissionEnabled ?
|
|
|
getPermissionChecker() : null;
|
|
|
CacheEntryWithPayload cacheEntry =
|
|
@@ -8548,7 +8538,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
|
|
|
void modifyCacheDirective(CacheDirectiveInfo directive,
|
|
|
EnumSet<CacheFlag> flags) throws IOException {
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = isPermissionEnabled ?
|
|
|
getPermissionChecker() : null;
|
|
|
boolean success = false;
|
|
@@ -8584,7 +8573,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
}
|
|
|
|
|
|
void removeCacheDirective(Long id) throws IOException {
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = isPermissionEnabled ?
|
|
|
getPermissionChecker() : null;
|
|
|
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
|
|
@@ -8639,7 +8627,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
}
|
|
|
|
|
|
public void addCachePool(CachePoolInfo req) throws IOException {
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc = isPermissionEnabled ?
|
|
|
getPermissionChecker() : null;
|
|
|
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
|
|
@@ -8674,7 +8661,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
}
|
|
|
|
|
|
public void modifyCachePool(CachePoolInfo req) throws IOException {
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc =
|
|
|
isPermissionEnabled ? getPermissionChecker() : null;
|
|
|
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
|
|
@@ -8708,7 +8694,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
}
|
|
|
|
|
|
public void removeCachePool(String cachePoolName) throws IOException {
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
final FSPermissionChecker pc =
|
|
|
isPermissionEnabled ? getPermissionChecker() : null;
|
|
|
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
|
|
@@ -8975,7 +8960,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
String src = srcArg;
|
|
|
HdfsFileStatus resultingStat = null;
|
|
|
checkSuperuserPrivilege();
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
final byte[][] pathComponents =
|
|
|
FSDirectory.getPathComponentsForReservedPath(src);
|
|
|
writeLock();
|
|
@@ -9098,7 +9082,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
FSPermissionChecker pc = getPermissionChecker();
|
|
|
XAttrPermissionFilter.checkPermissionForApi(pc, xAttr,
|
|
|
FSDirectory.isReservedRawName(src));
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
byte[][] pathComponents = FSDirectory.getPathComponentsForReservedPath(src);
|
|
|
writeLock();
|
|
|
try {
|
|
@@ -9260,7 +9243,6 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
FSPermissionChecker pc = getPermissionChecker();
|
|
|
XAttrPermissionFilter.checkPermissionForApi(pc, xAttr,
|
|
|
FSDirectory.isReservedRawName(src));
|
|
|
- checkOperation(OperationCategory.WRITE);
|
|
|
byte[][] pathComponents = FSDirectory.getPathComponentsForReservedPath(src);
|
|
|
writeLock();
|
|
|
try {
|