[
https://issues.apache.org/jira/browse/HDFS-14284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16964271#comment-16964271
]
Ayush Saxena commented on HDFS-14284:
-------------------------------------
Thanx [~hemanthboyina] for the patch.
As I said before, please give a check to the RouterIOException by extracting
from the RemoteException. You can get the RemoteException as :
{code:java}
RemoteException re = LambdaTestUtils.intercept(RemoteException.class,
"Cannot locate a registered namenode for ns0 from "
+ routerContext.getRouter().getRouterId(),
() -> routerProtocol.addBlock(testPath, clientName, newBlock, null, 1,
null, null));
RouterIOException rioe = (RouterIOException)
re.unwrapRemoteException(RouterIOException.class);
rioe.getMessage(); // Have assertion checks for this and similarly for routerID
{code}
You can do something like this, To manually unwrap, you need to have a
constructor with just {{String}} as param.Else it shall throw
{{NoMethodException}}. You can create one and set the message and RouterID into
it and then try.
I had a quick rough try it worked. Give a try, if you face issues, Let me know.
I will try help write.
> RBF: Log Router identifier when reporting exceptions
> ----------------------------------------------------
>
> Key: HDFS-14284
> URL: https://issues.apache.org/jira/browse/HDFS-14284
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Íñigo Goiri
> Assignee: hemanthboyina
> Priority: Major
> Attachments: HDFS-14284.001.patch, HDFS-14284.002.patch,
> HDFS-14284.003.patch, HDFS-14284.004.patch, HDFS-14284.005.patch,
> HDFS-14284.006.patch, HDFS-14284.007.patch, HDFS-14284.008.patch
>
>
> The typical setup is to use multiple Routers through
> ConfiguredFailoverProxyProvider.
> In a regular HA Namenode setup, it is easy to know which NN was used.
> However, in RBF, any Router can be the one reporting the exception and it is
> hard to know which was the one.
> We should have a way to identify which Router/Namenode was the one triggering
> the exception.
> This would also apply with Observer Namenodes.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]