Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-14245

Class cast error in GetGroups with ObserverReadProxyProvider

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: HDFS-12943
    • Fix Version/s: 2.10.0, 3.3.0, 3.1.4, 3.2.2
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Run "hdfs groups" with ObserverReadProxyProvider, Exception throws as :

      Exception in thread "main" java.io.IOException: Couldn't create proxy provider class org.apache.hadoop.hdfs.server.namenode.ha.ObserverReadProxyProvider
       at org.apache.hadoop.hdfs.NameNodeProxiesClient.createFailoverProxyProvider(NameNodeProxiesClient.java:261)
       at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:119)
       at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:95)
       at org.apache.hadoop.hdfs.tools.GetGroups.getUgmProtocol(GetGroups.java:87)
       at org.apache.hadoop.tools.GetGroupsBase.run(GetGroupsBase.java:71)
       at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
       at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
       at org.apache.hadoop.hdfs.tools.GetGroups.main(GetGroups.java:96)
      Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at org.apache.hadoop.hdfs.NameNodeProxiesClient.createFailoverProxyProvider(NameNodeProxiesClient.java:245)
       ... 7 more
      Caused by: java.lang.ClassCastException: org.apache.hadoop.hdfs.server.namenode.ha.NameNodeHAProxyFactory cannot be cast to org.apache.hadoop.hdfs.server.namenode.ha.ClientHAProxyFactory
       at org.apache.hadoop.hdfs.server.namenode.ha.ObserverReadProxyProvider.<init>(ObserverReadProxyProvider.java:123)
       at org.apache.hadoop.hdfs.server.namenode.ha.ObserverReadProxyProvider.<init>(ObserverReadProxyProvider.java:112)
       ... 12 more
      

      similar with HDFS-14116, we did a simple fix.

        Attachments

        1. HDFS-14245.007.patch
          13 kB
          Erik Krogen
        2. HDFS-14245.006.patch
          0.9 kB
          Erik Krogen
        3. HDFS-14245.005.patch
          12 kB
          Erik Krogen
        4. HDFS-14245.004.patch
          9 kB
          Erik Krogen
        5. HDFS-14245.003.patch
          10 kB
          Erik Krogen
        6. HDFS-14245.002.patch
          10 kB
          Erik Krogen
        7. HDFS-14245.001.patch
          9 kB
          Erik Krogen
        8. HDFS-14245.000.patch
          9 kB
          Erik Krogen
        9. HDFS-14245.patch
          1 kB
          Shen Yinjie

          Issue Links

            Activity

              People

              • Assignee:
                xkrogen Erik Krogen
                Reporter:
                shenyinjie Shen Yinjie
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: