Neilxzn commented on PR #5483:
URL: https://github.com/apache/hadoop/pull/5483#issuecomment-1477887166
> The test class `TestRouterAllResolver.java` doesn't look like the correct
place for this scenario to me The Javadoc for the class says
>
> ```
> /**
> * Tests the use of the resolvers that write in all subclusters from the
> * Router. It supports:
> * <li>HashResolver
> * <li>RandomResolver.
> */
> ```
>
> And this is testing rename RPC, Can we explore adding a test in
`TestRouterRpcMultiDestination` or in
`TestRouterRPCMultipleDestinationMountTableResolver`
@ayushtkn I try to add this test in `TestRouterRpcMultiDestination` . But in
`TestRouterRpcMultiDestination`, we can't run tests of router with multi
destination because of `TestRouterRpcMultiDestination` use `MockResolver` .
RouterRpcServer#isPathAll always return false.
```
# RouterRpcServer#isPathAll
boolean isPathAll(final String path) {
if (subclusterResolver instanceof MountTableResolver) {
try {
MountTableResolver mountTable = (MountTableResolver)
subclusterResolver;
MountTable entry = mountTable.getMountPoint(path);
if (entry != null) {
return entry.isAll();
}
} catch (IOException e) {
LOG.error("Cannot get mount point", e);
}
}
return false;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]