[ https://issues.apache.org/jira/browse/HDFS-9836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15158436#comment-15158436 ]
Inigo Goiri commented on HDFS-9836: ----------------------------------- We cannot return null in {{getConnectionId()}} as {{Client}} does: {code} Preconditions.checkState(callId.get() == null); {code} We need to return a fake {{ConnectionId}} or something like that. > RequestHedgingInvocationHandler can't be cast to > org.apache.hadoop.ipc.RpcInvocationHandler > ------------------------------------------------------------------------------------------- > > Key: HDFS-9836 > URL: https://issues.apache.org/jira/browse/HDFS-9836 > Project: Hadoop HDFS > Issue Type: Bug > Components: ha > Affects Versions: 2.8.0 > Reporter: Guocui Mi > Assignee: Guocui Mi > Attachments: HDFS-9836-000.patch, HDFS-9836-001.patch > > > RequestHedgingInvocationHandler cannot be cast to > org.apache.hadoop.ipc.RpcInvocationHandler > Reproduce steps: > 1: Set client failover provider as RequestHedgingProxyProvider. > <property> > <name>dfs.client.failover.proxy.provider.[nameservice]</name> > > <value>org.apache.hadoop.hdfs.server.namenode.ha.RequestHedgingProxyProvider</value> > </property> > 2: run hdfs fsck / will get following exceptions. > Exception in thread "main" java.lang.ClassCastException: > org.apache.hadoop.hdfs.server.namenode.ha.RequestHedgingProxyProvider$RequestHedgingInvocationHandler > cannot be cast to org.apache.hadoop.ipc.RpcInvocationHandler > at org.apache.hadoop.ipc.RPC.getConnectionIdForProxy(RPC.java:613) > at > org.apache.hadoop.io.retry.RetryInvocationHandler.getConnectionId(RetryInvocationHandler.java:281) > at org.apache.hadoop.ipc.RPC.getConnectionIdForProxy(RPC.java:615) > at org.apache.hadoop.ipc.RPC.getServerAddress(RPC.java:598) > at org.apache.hadoop.hdfs.HAUtil.getAddressOfActive(HAUtil.java:380) > at > org.apache.hadoop.hdfs.tools.DFSck.getCurrentNamenodeAddress(DFSck.java:248) > at org.apache.hadoop.hdfs.tools.DFSck.doWork(DFSck.java:255) > at org.apache.hadoop.hdfs.tools.DFSck.access$000(DFSck.java:72) > at org.apache.hadoop.hdfs.tools.DFSck$1.run(DFSck.java:148) > at org.apache.hadoop.hdfs.tools.DFSck$1.run(DFSck.java:145) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:415) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671) > at org.apache.hadoop.hdfs.tools.DFSck.run(DFSck.java:144) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) > at org.apache.hadoop.hdfs.tools.DFSck.main(DFSck.java:360) -- This message was sent by Atlassian JIRA (v6.3.4#6332)