From commits-return-6873-apmail-sentry-commits-archive=sentry.apache.org@sentry.incubator.apache.org Mon Jun 22 21:47:26 2015 Return-Path: X-Original-To: apmail-sentry-commits-archive@minotaur.apache.org Delivered-To: apmail-sentry-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 88635187AB for ; Mon, 22 Jun 2015 21:47:26 +0000 (UTC) Received: (qmail 43351 invoked by uid 500); 22 Jun 2015 21:47:26 -0000 Delivered-To: apmail-sentry-commits-archive@sentry.apache.org Received: (qmail 43299 invoked by uid 500); 22 Jun 2015 21:47:26 -0000 Mailing-List: contact commits-help@sentry.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sentry.incubator.apache.org Delivered-To: mailing list commits@sentry.incubator.apache.org Received: (qmail 43290 invoked by uid 99); 22 Jun 2015 21:47:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2015 21:47:26 +0000 X-ASF-Spam-Status: No, hits=-2001.4 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 22 Jun 2015 21:45:14 +0000 Received: (qmail 41521 invoked by uid 99); 22 Jun 2015 21:47:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2015 21:47:01 +0000 Date: Mon, 22 Jun 2015 21:47:01 +0000 (UTC) From: =?utf-8?Q?Andr=C3=A9s_Cordero_=28JIRA=29?= To: commits@sentry.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SENTRY-700) Alter view broken with Sentry Sync MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SENTRY-700?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1459= 6705#comment-14596705 ]=20 Andr=C3=A9s Cordero commented on SENTRY-700: --------------------------------------- [~prasadm], I'm still seeing an error with this action on CDH5.4.2, albeit = slightly different message/stack: Beeline: {noformat} 0: jdbc:hive2://localhost:10000/default> CREATE OR REPLACE VIEW jview AS SE= LECT * FROM j1; Error: Error while processing statement: FAILED: Execution Error, return co= de 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Unable to alter table. ja= va.lang.IllegalArgumentException: data may not be null (state=3D08S01,code= =3D1) {noformat} HS2 Log: {noformat} 2015-06-22 20:58:51,540 ERROR org.apache.hive.service.cli.operation.Operati= on: Error running hive query:=20 org.apache.hive.service.cli.HiveSQLException: Error while processing statem= ent: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.= exec.DDLTask. Unable to alter table. java.lang.IllegalArgumentException: da= ta may not be null =09at org.apache.hive.service.cli.operation.Operation.toSQLException(Operat= ion.java:315) =09at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperat= ion.java:147) =09at org.apache.hive.service.cli.operation.SQLOperation.access$100(SQLOper= ation.java:70) =09at org.apache.hive.service.cli.operation.SQLOperation$1$1.run(SQLOperati= on.java:197) =09at java.security.AccessController.doPrivileged(Native Method) =09at javax.security.auth.Subject.doAs(Subject.java:415) =09at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInforma= tion.java:1671) =09at org.apache.hive.service.cli.operation.SQLOperation$1.run(SQLOperation= .java:209) =09at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47= 1) =09at java.util.concurrent.FutureTask.run(FutureTask.java:262) =09at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.= java:1145) =09at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor= .java:615) =09at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to alte= r table. java.lang.IllegalArgumentException: data may not be null =09at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:465) =09at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:451) =09at org.apache.hadoop.hive.ql.exec.DDLTask.createView(DDLTask.java:4188) =09at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:337) =09at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:160) =09at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.ja= va:88) =09at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1638) =09at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1397) =09at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1181) =09at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1047) =09at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1042) =09at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperat= ion.java:145) =09... 11 more Caused by: MetaException(message:java.lang.IllegalArgumentException: data m= ay not be null) =09at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_= with_cascade_result$alter_table_with_cascade_resultStandardScheme.read(Thri= ftHiveMetastore.java:37961) =09at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_= with_cascade_result$alter_table_with_cascade_resultStandardScheme.read(Thri= ftHiveMetastore.java:37938) =09at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_= with_cascade_result.read(ThriftHiveMetastore.java:37880) =09at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) =09at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_= alter_table_with_cascade(ThriftHiveMetastore.java:1290) =09at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.alter= _table_with_cascade(ThriftHiveMetastore.java:1274) =09at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_table(Hive= MetaStoreClient.java:329) =09at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.alter_t= able(SessionHiveMetaStoreClient.java:251) =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) =09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.= java:57) =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces= sorImpl.java:43) =09at java.lang.reflect.Method.invoke(Method.java:606) =09at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(Retry= ingMetaStoreClient.java:91) =09at com.sun.proxy.$Proxy10.alter_table(Unknown Source) =09at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:463) =09... 22 more {noformat} > Alter view broken with Sentry Sync > ---------------------------------- > > Key: SENTRY-700 > URL: https://issues.apache.org/jira/browse/SENTRY-700 > Project: Sentry > Issue Type: Bug > Environment: CDH5.3.2 > Reporter: Johndee Burks > > If HDFS Sentry Sync is being used you cannot alter a view without failure= .=20 > Example:=20 > {code} > 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=3D08S01,code=3D1) > {code} > HS2 Log:=20 > {code} > 2015-04-17 22:22:42,987 ERROR hive.ql.exec.DDLTask: org.apache.hadoop.hiv= e.ql.metadata.HiveException: Unable to alter table. > at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:4= 28) > at org.apache.hadoop.hive.ql.exec.DDLTask.createView(DDLTask.java= :4382) > at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:32= 1) > at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:153) > at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRu= nner.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(SQL= Operation.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(UserGroup= Information.java:1642) > at org.apache.hadoop.hive.shims.HadoopShimsSecure.doAs(HadoopShim= sSecure.java:502) > at org.apache.hive.service.cli.operation.SQLOperation$1.run(SQLOp= eration.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(ThreadPoolEx= ecutor.java:1145) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolE= xecutor.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.ja= va:78) > at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Clien= t.recv_alter_table_with_environment_context(ThriftHiveMetastore.java:1163) > at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Clien= t.alter_table_with_environment_context(ThriftHiveMetastore.java:1147) > at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_tab= le(HiveMetaStoreClient.java:277) > at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_tab= le(HiveMetaStoreClient.java:272) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess= orImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth= odAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invok= e(RetryingMetaStoreClient.java:90) > at com.sun.proxy.$Proxy10.alter_table(Unknown Source) > at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:4= 26) > ... 22 more > {code} > HMS Log:=20 > {code} > 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] > {code} > The cause appears to be the fact that a null is being passed as part of p= aths update which will result in the NPE on the Thrift layer seen on HS2.= =20 -- This message was sent by Atlassian JIRA (v6.3.4#6332)