Router extends CompositeService implements
    TokenVerifier<DelegationTokenIdentifier> { public InetSocketAddress getRpcServerAddress() { return this.rpcAddress; } Router(); void shutDown(); RouterRpcServer getRpcServer(); InetSocketAddress getRpcServerAddress(); InetSocketAddress getAdminServerAddress(); InetSocketAddress getHttpServerAddress(); @Override void verifyToken(DelegationTokenIdentifier tokenId, byte[] password); void updateRouterState(RouterServiceState newState); RouterServiceState getRouterState(); boolean isRouterState(RouterServiceState routerState); StateStoreService getStateStore(); RouterMetrics getRouterMetrics(); RBFMetrics getMetrics(); NamenodeBeanMetrics getNamenodeMetrics(); FileSubclusterResolver getSubclusterResolver(); ActiveNamenodeResolver getNamenodeResolver(); RouterStore getRouterStateManager(); long getStartTime(); String getRouterId(); void setRouterId(String id); boolean isQuotaEnabled(); RouterQuotaManager getQuotaManager(); RouterAdminServer getAdminServer();  }
@Test public void testRouterRpcWithNoSubclusters() throws IOException { Router router = new Router(); router.init(new RouterConfigBuilder(conf).rpc().build()); router.start(); InetSocketAddress serverAddress = router.getRpcServerAddress(); DFSClient dfsClient = new DFSClient(serverAddress, conf); try { dfsClient.create("/test.txt", false); fail("Create with no subclusters should fail"); } catch (RemoteException e) { assertExceptionContains("Cannot find locations for /test.txt", e); } try { dfsClient.datanodeReport(DatanodeReportType.LIVE); fail("Get datanode reports with no subclusters should fail"); } catch (IOException e) { assertExceptionContains("No remote locations available", e); } dfsClient.close(); router.stop(); router.close(); }