|
@@ -29,16 +29,16 @@ import java.util.Set;
|
|
|
import com.google.common.base.Preconditions;
|
|
|
import org.apache.hadoop.conf.Configuration;
|
|
|
import org.apache.hadoop.hdfs.DFSConfigKeys;
|
|
|
-import org.apache.hadoop.hdfs.HDFSPolicyProvider;
|
|
|
import org.apache.hadoop.hdfs.DFSUtil;
|
|
|
import org.apache.hadoop.hdfs.protocol.HdfsConstants;
|
|
|
import org.apache.hadoop.hdfs.protocol.HdfsFileStatus;
|
|
|
import org.apache.hadoop.hdfs.protocol.proto.RouterProtocolProtos.RouterAdminProtocolService;
|
|
|
+import org.apache.hadoop.hdfs.protocolPB.RouterAdminProtocol;
|
|
|
import org.apache.hadoop.hdfs.protocolPB.RouterAdminProtocolPB;
|
|
|
import org.apache.hadoop.hdfs.protocolPB.RouterAdminProtocolServerSideTranslatorPB;
|
|
|
+import org.apache.hadoop.hdfs.protocolPB.RouterPolicyProvider;
|
|
|
import org.apache.hadoop.hdfs.server.federation.resolver.ActiveNamenodeResolver;
|
|
|
import org.apache.hadoop.hdfs.server.federation.resolver.FederationNamespaceInfo;
|
|
|
-import org.apache.hadoop.hdfs.server.federation.resolver.MountTableManager;
|
|
|
import org.apache.hadoop.hdfs.server.federation.store.DisabledNameserviceStore;
|
|
|
import org.apache.hadoop.hdfs.server.federation.store.MountTableStore;
|
|
|
import org.apache.hadoop.hdfs.server.federation.store.StateStoreCache;
|
|
@@ -66,7 +66,6 @@ import org.apache.hadoop.hdfs.server.federation.store.protocol.UpdateMountTableE
|
|
|
import org.apache.hadoop.hdfs.server.federation.store.protocol.UpdateMountTableEntryResponse;
|
|
|
import org.apache.hadoop.hdfs.server.federation.store.records.MountTable;
|
|
|
import org.apache.hadoop.hdfs.server.namenode.NameNode;
|
|
|
-import org.apache.hadoop.ipc.GenericRefreshProtocol;
|
|
|
import org.apache.hadoop.ipc.ProtobufRpcEngine;
|
|
|
import org.apache.hadoop.ipc.RPC;
|
|
|
import org.apache.hadoop.ipc.RPC.Server;
|
|
@@ -89,8 +88,7 @@ import com.google.protobuf.BlockingService;
|
|
|
* router. It is created, started, and stopped by {@link Router}.
|
|
|
*/
|
|
|
public class RouterAdminServer extends AbstractService
|
|
|
- implements MountTableManager, RouterStateManager, NameserviceManager,
|
|
|
- GenericRefreshProtocol {
|
|
|
+ implements RouterAdminProtocol {
|
|
|
|
|
|
private static final Logger LOG =
|
|
|
LoggerFactory.getLogger(RouterAdminServer.class);
|
|
@@ -159,7 +157,7 @@ public class RouterAdminServer extends AbstractService
|
|
|
|
|
|
// Set service-level authorization security policy
|
|
|
if (conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false)) {
|
|
|
- this.adminServer.refreshServiceAcl(conf, new HDFSPolicyProvider());
|
|
|
+ this.adminServer.refreshServiceAcl(conf, new RouterPolicyProvider());
|
|
|
}
|
|
|
|
|
|
// The RPC-server port can be ephemeral... ensure we have the correct info
|