[ 
https://issues.apache.org/jira/browse/HDFS-14284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16888071#comment-16888071
 ] 

Ayush Saxena commented on HDFS-14284:
-------------------------------------

I guess we are processing all exception using {{processException()}} in 
RouterRpcClient. There we can append the RouterId. There are couple of other 
exceptions which do append the router id like here :
{code:java}
    if (namenodes == null || namenodes.isEmpty()) {
      throw new IOException("No namenodes to invoke " + method.getName() +
          " with params " + Arrays.deepToString(params) + " from "
          + router.getRouterId());
{code}
{code:java}
 // All namenodes were unavailable or in standby
    String msg = "No namenode available to invoke " + method.getName() + " " +
        Arrays.deepToString(params) + " in " + namenodes + " from " +
        router.getRouterId();
{code}
{code:java}
   throw new StandbyException(
          "Router " + router.getRouterId() + " is overloaded: " + msg);
{code}
{code:java}
    if (namenodes == null || namenodes.isEmpty()) {
      throw new IOException("Cannot locate a registered namenode for " + nsId +
          " from " + router.getRouterId());
    }
{code}
Almost all places where exception is at fault from Router, Barring the One from 
where you got.

Maybe we can add it there too, and that may solve your problem?

Moreover if the exception is from namenode I don't think so you need the 
routerId because that would be independent of the router. but still that also I 
feel to do so also should be easy, that can be handled in {{processException}}

And as you have 16 Routers giving back the routerId should be far more easier 
than having audit logs, lesser overhead too.

> 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
>
> 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
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to