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

OIV WebImageViewer: NPE when param op is not specified

    XMLWordPrintableJSON

    Details

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

      Description

      Repro. Tab 1: Start WebImageViewer
      $ hdfs oiv -i fsimage_0000000000011467437
      2019-01-28 23:30:20,536 INFO offlineImageViewer.FSImageHandler: Loading 6 strings
      2019-01-28 23:30:20,545 INFO offlineImageViewer.FSImageHandler: Loading 2031774 inodes.
      2019-01-28 23:30:22,602 INFO offlineImageViewer.FSImageHandler: Loading inode references
      2019-01-28 23:30:22,610 INFO offlineImageViewer.FSImageHandler: Loaded 0 inode references
      2019-01-28 23:30:22,610 INFO offlineImageViewer.FSImageHandler: Loading inode directory section
      2019-01-28 23:30:22,739 INFO offlineImageViewer.FSImageHandler: Loaded 31758 directories
      2019-01-28 23:30:22,800 INFO offlineImageViewer.WebImageViewer: WebImageViewer started. Listening on /127.0.0.1:5978. Press Ctrl+C to stop the viewer.
      
      Repro. Tab 2: curl /webhdfs/v1 without params
      # NPE without op (null/empty op)
      $ curl http://127.0.0.1:5978/webhdfs/v1/
      {"RemoteException":{"exception":"NullPointerException","javaClassName":"java.lang.NullPointerException","message":null}}
      
      # Okay with op
      $ curl http://127.0.0.1:5978/webhdfs/v1/\?op\=LISTSTATUS
      {"FileStatuses":{"FileStatus":[
      {"owner":"hdfs","replication":0,"pathSuffix":"tmp","modificationTime":1534356863827,"childrenNum":3,"length":0,"permission":"1777","type":"DIRECTORY","blockSize":0,"accessTime":0,"group":"supergroup","fileId":16388},{"owner":"hdfs","replication":0,"pathSuffix":"user","modificationTime":1534273588466,"childrenNum":3,"length":0,"permission":"755","type":"DIRECTORY","blockSize":0,"accessTime":0,"group":"supergroup","fileId":16386}
      ]}}
      

        Attachments

        1. HDFS-14242.001.patch
          2 kB
          Siyao Meng

          Activity

            People

            • Assignee:
              smeng Siyao Meng
              Reporter:
              smeng Siyao Meng
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: