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

NameNode should validate all coming file path

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.20.205.0
    • Fix Version/s: None
    • Component/s: namenode
    • Labels:

      Description

      NameNode provides RPC service for not only DFS client but also user defined program. A common case we always met is that user transfers file path prefixed with HDFS protocol("hdfs://{namenode:{port}}/

      {folder}

      /

      {file}

      "). NameNode cannot map node meta-data with this path and always throw NPE. In user client, we only see the NullPointerException, no other tips for which step it occurs.
      Also, NameNode should validate all coming file path with regular format.

      One exception I met:
      Exception in thread "main" org.apache.hadoop.ipc.RemoteException: java.io.IOException: java.lang.NullPointerException
      at org.apache.hadoop.hdfs.server.namenode.INode.getPathComponents(INode.java:334)
      at org.apache.hadoop.hdfs.server.namenode.INode.getPathComponents(INode.java:329)

        Attachments

        1. HDFS-3063.patch
          6 kB
          Denny Ye

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dennyy Denny Ye
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: