Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-2369

Cannot multi-thread process hive grant sql when installed ranger-hive-plugin

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Do
    • 0.5.3, 1.1.0
    • 1.2.1
    • admin, Ranger
    • None

    Description

      1、enable ranger-hive-plugin successfully;

      2、Multi-thread process “ grant select on table  tableName to user userName“;

      3、the rangeradmin (0.5.3)log errors are:

      2019-03-12 16:20:28,157 [http-bio-6080-exec-3] ERROR org.apache.ranger.rest.ServiceREST (ServiceREST.java:951) - grantAccess(NMG1_hive, GrantRevokeRequest={grantor=

      {hive}

      resource={column=*; table=bbzhenhao1; database=default; } users={hxatest } groups={} accessTypes={select } delegateAdmin={false} enableAudit={true} replaceExistingPermissions={false} isRecursive={false} clientIPAddress={10.129.3.1} clientType={HIVESERVER2} requestData={} sessionId={59259b8c-223c-45f5-95cd-a30671de4d79} }) failed
      javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
      Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
      Error Code: 1213
      Call: UPDATE x_service SET policy_update_time = ?, policy_version = ?, UPDATE_TIME = ?, version = ? WHERE ((id = ?) AND (version = ?))
      bind => [6 parameters bound]
      Query: UpdateObjectQuery(XXService [id=2])
      at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)
      at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240)
      at com.sun.proxy.$Proxy20.flush(Unknown Source)
      at org.apache.ranger.common.db.BaseDao.update(BaseDao.java:99)
      at org.apache.ranger.biz.ServiceDBStore.updatePolicyVersion(ServiceDBStore.java:1896)
      at org.apache.ranger.biz.ServiceDBStore.handlePolicyUpdate(ServiceDBStore.java:1864)
      at org.apache.ranger.biz.ServiceDBStore.createPolicy(ServiceDBStore.java:1384)
      at org.apache.ranger.rest.ServiceREST.grantAccess(ServiceREST.java:946)
      at org.apache.ranger.rest.ServiceREST$$FastClassByCGLIB$$92dab672.invoke(<generated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
      at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
      at org.apache.ranger.rest.ServiceREST$$EnhancerByCGLIB$$d842e7d5.grantAccess(<generated>)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            gautamborad Gautam Borad
            Seymour Xu Haihui Xu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment