Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-16171

deploy hadoop3.1.2 and runtime raise a Error, i dont know why

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 3.1.2
    • Fix Version/s: None
    • Component/s: fs
    • Labels:
      None
    • Target Version/s:

      Description

      public static void main(String[] args) throws IOException

      {        FileSystem fileSystem = FileSystem.get(new Configuration());         fileSystem.copyToLocalFile(new Path("hdfs://centos:9000/hadoop3.1.2"), new Path("jarsss")); }

      This is very simple demo. but tell me a ClassCastException

       

      Exception in thread "main" java.lang.ClassCastException: org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$GetFileInfoRequestProto cannot be cast to com.google.protobuf.Message
      at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:225)
      at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:116)
      at com.sun.proxy.$Proxy9.getFileInfo(Unknown Source)
      at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:903)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:422)
      at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeMethod(RetryInvocationHandler.java:165)
      at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invoke(RetryInvocationHandler.java:157)
      at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeOnce(RetryInvocationHandler.java:95)
      at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:359)
      at com.sun.proxy.$Proxy10.getFileInfo(Unknown Source)
      at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1665)
      at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1582)
      at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1579)
      at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
      at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1594)
      at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:386)
      at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:337)
      at org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:2434)
      at org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:2403)
      at org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:2379)
      at zhcn.mzh.hadoop.Main.main(Main.java:14)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Mr_mzh mzh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: