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

Incorrect message when block is not found

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0, 3.1.1, 3.0.4
    • Component/s: datanode
    • Labels:
      None

      Description

      When client opens a file, it asks DataNode to check the blocks' visible length. If somehow the block is not on the DN, it throws "Cannot append to a non-existent replica" message, which is incorrect, because getReplicaVisibleLength() is called for different use, just not for appending to a block. It should just state "block is not found"

      The following stacktrace comes from a CDH5.13, but it looks like the same warning exists in Apache Hadoop trunk.

      2018-05-29 09:23:41,966 INFO org.apache.hadoop.ipc.Server: IPC Server handler 2 on 50020, call org.apache.hadoop.hdfs.protocol.ClientDatanodeProtocol.getReplicaVisibleLength from 10.0.0.14:53217 Call#38334117 Retry#0
      org.apache.hadoop.hdfs.server.datanode.ReplicaNotFoundException: Cannot append to a non-existent replica BP-725378529-10.236.236.8-1410027444173:13276792346
       at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.getReplicaInfo(FsDatasetImpl.java:792)
       at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.getReplicaVisibleLength(FsDatasetImpl.java:2588)
       at org.apache.hadoop.hdfs.server.datanode.DataNode.getReplicaVisibleLength(DataNode.java:2756)
       at org.apache.hadoop.hdfs.protocolPB.ClientDatanodeProtocolServerSideTranslatorPB.getReplicaVisibleLength(ClientDatanodeProtocolServerSideTranslatorPB.java:107)
       at org.apache.hadoop.hdfs.protocol.proto.ClientDatanodeProtocolProtos$ClientDatanodeProtocolService$2.callBlockingMethod(ClientDatanodeProtocolProtos.java:17873)
       at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:617)
       at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1073)
       at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2217)
       at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2213)
       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.Subject.doAs(Subject.java:422)
       at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1917)
       at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2211)

        Attachments

        1. HDFS-13635.003.patch
          1 kB
          Gabor Bota
        2. HDFS-13635.002.patch
          2 kB
          Gabor Bota
        3. HDFS-13635.001.patch
          5 kB
          Gabor Bota

          Activity

            People

            • Assignee:
              gabor.bota Gabor Bota
              Reporter:
              jojochuang Wei-Chiu Chuang
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: