[
https://issues.apache.org/jira/browse/HDFS-13208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16381431#comment-16381431
]
Yiqun Lin commented on HDFS-13208:
----------------------------------
[~ywskycn], I tried to reproduce this issue, and did the test in UT
{{TestRouterAdminCLI}}. The result looked fine. My test code:
{code:java}
@Test
public void testRemoveMountTable() throws Exception {
String nsId = "ns0";
String src = "/test-rmmounttable";
String dest = "/rmmounttable";
String[] argv = new String[] {"-add", src, nsId, dest};
assertEquals(0, ToolRunner.run(admin, argv));
stateStore.loadCache(MountTableStoreImpl.class, true);
GetMountTableEntriesRequest getRequest = GetMountTableEntriesRequest
.newInstance(src);
GetMountTableEntriesResponse getResponse = client.getMountTableManager()
.getMountTableEntries(getRequest);
// ensure mount table added successfully
MountTable mountTable = getResponse.getEntries().get(0);
assertEquals(src, mountTable.getSourcePath());
argv = new String[] {"-rm", src};
assertEquals(0, ToolRunner.run(admin, argv));
stateStore.loadCache(MountTableStoreImpl.class, true);
getResponse = client.getMountTableManager()
.getMountTableEntries(getRequest);
assertEquals(0, getResponse.getEntries().size());
argv = new String[] {"-add", src, nsId, dest};
assertEquals(0, ToolRunner.run(admin, argv));
stateStore.loadCache(MountTableStoreImpl.class, true);
getResponse = client.getMountTableManager()
.getMountTableEntries(getRequest);
assertEquals(1, getResponse.getEntries().size());
}
{code}
> RBF: Mount path not available after ADD-REMOVE-ADD
> --------------------------------------------------
>
> Key: HDFS-13208
> URL: https://issues.apache.org/jira/browse/HDFS-13208
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Wei Yan
> Assignee: Wei Yan
> Priority: Critical
>
> To reproduce this issue, run the following commands at Router 1:
> {code:java}
> $ hdfs dfsrouteradmin -add /test1 ns1 /ns1/test1
> $ hdfs dfsrouteradmin -rm /test1
> $ hdfs dfsrouteradmin -add /test1 ns1 /ns1/test1{code}
> "hdfs dfs -ls hdfs://Router1:8020/test1" works well after step 1. After step
> 3 when we add /test1 back, Router 1 still returns "No such file or
> directory".
> But after step 3, when we run cmd "hdfs dfs -ls hdfs://Router2:8020/test1"
> talking to another Router, it works well.
> From Router logs, I can see StateStoreZookeeperImpl and MountTableResolver
> are updated correctly and in time. Not find the root case yet, still looking
> into it.
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]