Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-5307

NPE in JsonMetaDataFormatter if Table Path is null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 0.11.0
    • None
    • HCatalog, Views
    • None

    Description

      When I try to get a table (actually a view) description from HCatalog in HUE, get a NPE thrown as:
      org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.NullPointerException
      at org.apache.hadoop.hive.ql.exec.DDLTask.showTableStatus(DDLTask.java:2758)
      at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:347)
      at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:144)
      at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
      at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1355)
      at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1139)
      at org.apache.hadoop.hive.ql.Driver.run(Driver.java:945)
      at org.apache.hcatalog.cli.HCatDriver.run(HCatDriver.java:43)
      at org.apache.hcatalog.cli.HCatCli.processCmd(HCatCli.java:251)
      at org.apache.hcatalog.cli.HCatCli.processLine(HCatCli.java:205)
      at org.apache.hcatalog.cli.HCatCli.main(HCatCli.java:164)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
      Caused by: java.lang.NullPointerException
      at org.apache.hadoop.hive.ql.metadata.formatting.JsonMetaDataFormatter.putFileSystemsStats(JsonMetaDataFormatter.java:303)
      at org.apache.hadoop.hive.ql.metadata.formatting.JsonMetaDataFormatter.makeOneTableStatus(JsonMetaDataFormatter.java:257)
      at org.apache.hadoop.hive.ql.metadata.formatting.JsonMetaDataFormatter.makeAllTableStatus(JsonMetaDataFormatter.java:209)
      at org.apache.hadoop.hive.ql.metadata.formatting.JsonMetaDataFormatter.showTableStatus(JsonMetaDataFormatter.java:192)
      at org.apache.hadoop.hive.ql.exec.DDLTask.showTableStatus(DDLTask.java:2745)
      ... 15 more

      Digg into the implementation of JsonMetaDataFormatter, I think org.apache.hadoop.hive.ql.metadata.formatting.JsonMetaDataFormatter.putFileSystemsStats should handle the case if Table Path is NULL (like a view).

      Attachments

        Activity

          People

            sircodesalot Reuben Kuhnert
            branky Branky Shao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: