File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1948,14 +1948,13 @@ public boolean isInStandbyState() {
19481948 */
19491949 public BlocksWithLocations getBlocks (DatanodeID datanode , long size , long
19501950 minimumBlockSize , long timeInterval ) throws IOException {
1951- if (isGetBlocksCheckOperationEnabled ) {
1952- checkOperation (OperationCategory .READ );
1953- }
1951+ OperationCategory checkOp =
1952+ isGetBlocksCheckOperationEnabled ? OperationCategory .READ :
1953+ OperationCategory .UNCHECKED ;
1954+ checkOperation (checkOp );
19541955 readLock ();
19551956 try {
1956- if (isGetBlocksCheckOperationEnabled ) {
1957- checkOperation (OperationCategory .READ );
1958- }
1957+ checkOperation (checkOp );
19591958 return getBlockManager ().getBlocksWithLocations (datanode , size ,
19601959 minimumBlockSize , timeInterval );
19611960 } finally {
You can’t perform that action at this time.
0 commit comments