[jira] [Resolved] (RANGER-211) Documentation: Need documentation for public REST APIs
[ https://issues.apache.org/jira/browse/RANGER-211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pradeep Agrawal resolved RANGER-211. Resolution: Fixed > Documentation: Need documentation for public REST APIs > -- > > Key: RANGER-211 > URL: https://issues.apache.org/jira/browse/RANGER-211 > Project: Ranger > Issue Type: Task >Reporter: Don Bosco Durai >Assignee: Gautam Borad >Priority: Major > > We need to document the public REST APIs for managing policies. I have > created place holder wiki page for it: > https://cwiki.apache.org/confluence/display/RANGER/REST+APIs+for+Policy+Management -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RANGER-211) Documentation: Need documentation for public REST APIs
[ https://issues.apache.org/jira/browse/RANGER-211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16793602#comment-16793602 ] Pradeep Agrawal commented on RANGER-211: https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+0.6+-+REST+APIs+for+Service+Definition%2C+Service+and+Policy+Management > Documentation: Need documentation for public REST APIs > -- > > Key: RANGER-211 > URL: https://issues.apache.org/jira/browse/RANGER-211 > Project: Ranger > Issue Type: Task >Reporter: Don Bosco Durai >Assignee: Gautam Borad >Priority: Major > > We need to document the public REST APIs for managing policies. I have > created place holder wiki page for it: > https://cwiki.apache.org/confluence/display/RANGER/REST+APIs+for+Policy+Management -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (RANGER-2369) Cannot multi-thread process hive grant sql when installed ranger-hive-plugin
[ https://issues.apache.org/jira/browse/RANGER-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Haihui Xu reassigned RANGER-2369: - Assignee: Haihui Xu > Cannot multi-thread process hive grant sql when installed ranger-hive-plugin > > > Key: RANGER-2369 > URL: https://issues.apache.org/jira/browse/RANGER-2369 > Project: Ranger > Issue Type: Bug > Components: admin, Ranger >Affects Versions: 0.5.3, 1.1.0 >Reporter: Haihui Xu >Assignee: Haihui Xu >Priority: Major > > 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() > 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() > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RANGER-2369) Cannot multi-thread process hive grant sql when installed ranger-hive-plugin
[ https://issues.apache.org/jira/browse/RANGER-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16793471#comment-16793471 ] Haihui Xu commented on RANGER-2369: --- the same as in range 1.1 version,errors are: 2019-03-15 08:45:59,228 [http-bio-6080-exec-58] INFO org.apache.ranger.common.RESTErrorUtil (RESTErrorUtil.java:63) - Request failed. loginId=hive, logMessage=Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction Error Code: 1205 Call: UPDATE x_service_version_info SET policy_update_time = ?, policy_version = ? WHERE (id = ?) bind => [3 parameters bound] Query: UpdateObjectQuery(XXServiceVersionInfo=\{id={13} serviceId=\{13} policyVersion=\{11} policyUpdateTime=\{Fri Mar 15 08:45:08 UTC 2019} tagVersion=\{1} tagUpdateTime=\{Mon Mar 11 08:54:44 UTC 2019} }) javax.ws.rs.WebApplicationException at org.apache.ranger.common.RESTErrorUtil.createRESTException(RESTErrorUtil.java:56) at org.apache.ranger.common.RESTErrorUtil.createRESTException(RESTErrorUtil.java:311) at org.apache.ranger.rest.ServiceREST.secureGrantAccess(ServiceREST.java:1260) at org.apache.ranger.rest.ServiceREST$$FastClassBySpringCGLIB$$92dab672.invoke() at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) at org.apache.ranger.rest.ServiceREST$$EnhancerBySpringCGLIB$$54793299.secureGrantAccess() at sun.reflect.GeneratedMethodAccessor411.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) at
[jira] [Updated] (RANGER-2369) Cannot multi-thread process hive grant sql when installed ranger-hive-plugin
[ https://issues.apache.org/jira/browse/RANGER-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Haihui Xu updated RANGER-2369: -- 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() 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() at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) was: 1、enable ranger-hive-plugin successfully; 2、Multi-thread process “ grant select on table tableName to user userName“; 3、the rangeradmin 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
[jira] [Created] (RANGER-2369) Cannot multi-thread process hive grant sql when installed ranger-hive-plugin
Haihui Xu created RANGER-2369: - Summary: Cannot multi-thread process hive grant sql when installed ranger-hive-plugin Key: RANGER-2369 URL: https://issues.apache.org/jira/browse/RANGER-2369 Project: Ranger Issue Type: Bug Components: admin, Ranger Affects Versions: 1.1.0, 0.5.3 Reporter: Haihui Xu 1、enable ranger-hive-plugin successfully; 2、Multi-thread process “ grant select on table tableName to user userName“; 3、the rangeradmin 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() 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() at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) -- This message was sent by Atlassian JIRA (v7.6.3#76005)