Browse Source

HDFS-13076: [SPS]: Resolve conflicts after rebasing HDFS-10285 branch to trunk. Contributed by Rakesh R.

Rakesh Radhakrishnan 7 năm trước cách đây
mục cha
commit
db3f227d8a

+ 6 - 0
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterNamenodeProtocol.java

@@ -184,4 +184,10 @@ public class RouterNamenodeProtocol implements NamenodeProtocol {
     rpcServer.checkOperation(OperationCategory.READ, false);
     return false;
   }
+
+  @Override
+  public Long getNextSPSPath() throws IOException {
+    // not supported
+    return null;
+  }
 }

+ 7 - 0
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java

@@ -2509,4 +2509,11 @@ public class RouterRpcServer extends AbstractService
     checkOperation(OperationCategory.READ, false);
     return StoragePolicySatisfyPathStatus.NOT_AVAILABLE;
   }
+
+  @Override
+  public Long getNextSPSPath() throws IOException {
+    checkOperation(OperationCategory.READ, false);
+    // not supported
+    return null;
+  }
 }

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java

@@ -5078,7 +5078,7 @@ public class BlockManager implements BlockStatsMXBean {
         DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY,
         DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_DEFAULT);
     String modeVal = spsMode;
-    if (org.apache.commons.lang.StringUtils.isBlank(modeVal)) {
+    if (org.apache.commons.lang3.StringUtils.isBlank(modeVal)) {
       modeVal = conf.get(DFSConfigKeys.DFS_STORAGE_POLICY_SATISFIER_MODE_KEY,
           DFSConfigKeys.DFS_STORAGE_POLICY_SATISFIER_MODE_DEFAULT);
     }

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/sps/IntraSPSNameNodeFileIdCollector.java

@@ -45,7 +45,7 @@ public class IntraSPSNameNodeFileIdCollector extends FSTreeTraverser
 
   public IntraSPSNameNodeFileIdCollector(FSDirectory dir,
       SPSService service) {
-    super(dir);
+    super(dir, service.getConf());
     this.service = service;
     this.maxQueueLimitToScan = service.getConf().getInt(
         DFSConfigKeys.DFS_STORAGE_POLICY_SATISFIER_QUEUE_LIMIT_KEY,
@@ -72,7 +72,7 @@ public class IntraSPSNameNodeFileIdCollector extends FSTreeTraverser
   }
 
   @Override
-  protected boolean canSubmitCurrentBatch() {
+  protected boolean shouldSubmitCurrentBatch() {
     return remainingCapacity <= 0;
   }