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

Fetching primaryKey through beeline fails with NPE

    XMLWordPrintableJSON

Details

    Description

      Fetching PrimaryKey of a table through Beeline !primarykey fails with NPE

      0: jdbc:hive2://localhost:10000> !primarykeys Persons
      Error: MetaException(message:java.lang.NullPointerException) (state=,code=0)
      org.apache.hive.service.cli.HiveSQLException: MetaException(message:java.lang.NullPointerException)
      	at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:360)
      	at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:351)
      	at org.apache.hive.jdbc.HiveDatabaseMetaData.getPrimaryKeys(HiveDatabaseMetaData.java:573)
      	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.hive.beeline.Reflector.invoke(Reflector.java:89)
      	at org.apache.hive.beeline.Commands.metadata(Commands.java:125)
      	at org.apache.hive.beeline.Commands.primarykeys(Commands.java:231)
      	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.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:57)
      	at org.apache.hive.beeline.BeeLine.execCommandWithPrefix(BeeLine.java:1465)
      	at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1504)
      	at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:1364)
      	at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1134)
      	at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1082)
      	at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:546)
      	at org.apache.hive.beeline.BeeLine.main(BeeLine.java:528)
      	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.util.RunJar.run(RunJar.java:323)
      	at org.apache.hadoop.util.RunJar.main(RunJar.java:236)

      Attachments

        Issue Links

          Activity

            People

              ayushtkn Ayush Saxena
              ayushtkn Ayush Saxena
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 50m
                  3h 50m