Skip to content

Commit

Permalink
fix check & javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
KeeProMise committed Jan 4, 2025
1 parent 3553ea1 commit 8195f2d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,6 @@ protected void setRouter(RouterContext r)
router.getFileSystem().getUri(), NamenodeProtocol.class).getProxy();
}

protected static void setCluster(MiniRouterDFSCluster cluster) {
TestRouterRpc.cluster = cluster;
}

protected FileSystem getRouterFileSystem() {
return this.routerFS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,15 @@ public static void globalSetUp() throws Exception {
// We decrease the DN cache times to make the test faster
routerConf.setTimeDuration(
RBFConfigKeys.DN_REPORT_CACHE_EXPIRE, 1, TimeUnit.SECONDS);
// use async router.
routerConf.setBoolean(DFS_ROUTER_RPC_ENABLE_ASYNC, true);
setUp(routerConf);
setCluster(cluster);
}

public static void tearDown() {
cluster.shutdown();
}

@Before
public void testSetup() throws Exception {
super.testSetup();
cluster = super.getCluster();
// Random router for this test
rndRouter = cluster.getRandomRouter();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.apache.hadoop.hdfs.server.federation.router.RBFConfigKeys;
import org.apache.hadoop.hdfs.server.federation.router.TestRouterRpcMultiDestination;
import org.apache.hadoop.security.UserGroupInformation;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

Expand All @@ -37,8 +36,6 @@
* Testing the asynchronous RPC functionality of the router with multiple mounts.
*/
public class TestRouterAsyncRpcMultiDestination extends TestRouterRpcMultiDestination {
private static MiniRouterDFSCluster cluster;
private MiniRouterDFSCluster.RouterContext rndRouter;

@BeforeClass
public static void globalSetUp() throws Exception {
Expand All @@ -50,25 +47,15 @@ public static void globalSetUp() throws Exception {
// We decrease the DN cache times to make the test faster
routerConf.setTimeDuration(
RBFConfigKeys.DN_REPORT_CACHE_EXPIRE, 1, TimeUnit.SECONDS);
// use async router.
routerConf.setBoolean(DFS_ROUTER_RPC_ENABLE_ASYNC, true);
setUp(routerConf);
setCluster(cluster);
}

public static void tearDown() {
cluster.shutdown();
}

@Before
public void testSetup() throws Exception {
super.testSetup();
// Random router for this test
rndRouter = cluster.getRandomRouter();
}

@Test
@Override
public void testgetGroupsForUser() throws Exception {
MiniRouterDFSCluster.RouterContext rndRouter = super.getRouterContext();
String[] group = new String[] {"bar", "group2"};
UserGroupInformation.createUserForTesting("user",
new String[] {"bar", "group2"});
Expand Down

0 comments on commit 8195f2d

Please sign in to comment.