Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-700

Alter view broken with Sentry Sync

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      CDH5.3.2

      Description

      If HDFS Sentry Sync is being used you cannot alter a view without failure.

      Example:

      0: jdbc:hive2://localhost:10000/default> create or replace view jview as select * from j1;
      Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Unable to alter table. (state=08S01,code=1)
      

      HS2 Log:

      2015-04-17 22:22:42,987 ERROR hive.ql.exec.DDLTask: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to alter table.
              at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:428)
              at org.apache.hadoop.hive.ql.exec.DDLTask.createView(DDLTask.java:4382)
              at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:321)
              at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:153)
              at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:85)
              at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1554)
              at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1321)
              at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1139)
              at org.apache.hadoop.hive.ql.Driver.run(Driver.java:962)
              at org.apache.hadoop.hive.ql.Driver.run(Driver.java:957)
              at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:145)
              at org.apache.hive.service.cli.operation.SQLOperation.access$000(SQLOperation.java:69)
              at org.apache.hive.service.cli.operation.SQLOperation$1$1.run(SQLOperation.java:200)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAs(Subject.java:415)
              at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1642)
              at org.apache.hadoop.hive.shims.HadoopShimsSecure.doAs(HadoopShimsSecure.java:502)
              at org.apache.hive.service.cli.operation.SQLOperation$1.run(SQLOperation.java:213)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: MetaException(message:java.lang.NullPointerException)
              at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_with_environment_context_result$alter_table_with_environment_context_resultStandardScheme.read(ThriftHiveMetastore.java:34075)
              at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_with_environment_context_result$alter_table_with_environment_context_resultStandardScheme.read(ThriftHiveMetastore.java:34052)
              at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_with_environment_context_result.read(ThriftHiveMetastore.java:33994)
              at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
              at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_alter_table_with_environment_context(ThriftHiveMetastore.java:1163)
              at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.alter_table_with_environment_context(ThriftHiveMetastore.java:1147)
              at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_table(HiveMetaStoreClient.java:277)
              at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_table(HiveMetaStoreClient.java:272)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:90)
              at com.sun.proxy.$Proxy10.alter_table(Unknown Source)
              at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:426)
              ... 22 more
      

      HMS Log:

      2015-04-17 22:22:42,942 DEBUG org.apache.sentry.hdfs.MetastorePlugin: #### Creating HMS Path Update SeqNum : [36]
      2015-04-17 22:22:42,942 DEBUG org.apache.sentry.hdfs.MetastorePlugin: #### HMS Path Update [OP : renameAuthzObject, oldName : default.jview,newPath : null,newName : default.jview,newPat
      h : null]
      

      The cause appears to be the fact that a null is being passed as part of paths update which will result in the NPE on the Thrift layer seen on HS2.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Ryan P Ryan P
                Reporter:
                johndee Johndee Burks
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: