You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by co...@apache.org on 2016/06/16 03:12:43 UTC

[49/49] sentry git commit: SENTRY-1286: Create sentry-service-common module(Colin Ma, reviewed by Dapeng Sun)

SENTRY-1286: Create sentry-service-common module(Colin Ma, reviewed by Dapeng Sun)


Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/f5368df5
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/f5368df5
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/f5368df5

Branch: refs/heads/SENTRY-1205
Commit: f5368df5e83ebbccd21fbe2d519eae559e99aa15
Parents: 38098b4
Author: Colin Ma <co...@apache.org>
Authored: Thu Jun 16 11:54:07 2016 +0800
Committer: Colin Ma <co...@apache.org>
Committed: Thu Jun 16 11:54:07 2016 +0800

----------------------------------------------------------------------
 pom.xml                                         |     6 +
 sentry-dist/pom.xml                             |     4 +
 sentry-provider/sentry-provider-db/pom.xml      |    83 +-
 .../thrift/SentryGenericPolicyService.java      | 10416 -----------
 .../TAlterSentryRoleAddGroupsRequest.java       |   842 -
 .../TAlterSentryRoleAddGroupsResponse.java      |   391 -
 .../TAlterSentryRoleDeleteGroupsRequest.java    |   842 -
 .../TAlterSentryRoleDeleteGroupsResponse.java   |   391 -
 .../TAlterSentryRoleGrantPrivilegeRequest.java  |   798 -
 .../TAlterSentryRoleGrantPrivilegeResponse.java |   391 -
 .../TAlterSentryRoleRevokePrivilegeRequest.java |   798 -
 ...TAlterSentryRoleRevokePrivilegeResponse.java |   391 -
 .../generic/service/thrift/TAuthorizable.java   |   490 -
 .../thrift/TCreateSentryRoleRequest.java        |   692 -
 .../thrift/TCreateSentryRoleResponse.java       |   391 -
 .../service/thrift/TDropPrivilegesRequest.java  |   697 -
 .../service/thrift/TDropPrivilegesResponse.java |   391 -
 .../service/thrift/TDropSentryRoleRequest.java  |   692 -
 .../service/thrift/TDropSentryRoleResponse.java |   391 -
 .../TListSentryPrivilegesByAuthRequest.java     |  1112 --
 .../TListSentryPrivilegesByAuthResponse.java    |   569 -
 ...TListSentryPrivilegesForProviderRequest.java |  1011 --
 ...ListSentryPrivilegesForProviderResponse.java |   541 -
 .../thrift/TListSentryPrivilegesRequest.java    |   957 -
 .../thrift/TListSentryPrivilegesResponse.java   |   555 -
 .../service/thrift/TListSentryRolesRequest.java |   701 -
 .../thrift/TListSentryRolesResponse.java        |   555 -
 .../thrift/TRenamePrivilegesRequest.java        |  1002 --
 .../thrift/TRenamePrivilegesResponse.java       |   391 -
 .../service/thrift/TSentryActiveRoleSet.java    |   537 -
 .../service/thrift/TSentryGrantOption.java      |    48 -
 .../service/thrift/TSentryPrivilege.java        |  1080 --
 .../service/thrift/TSentryPrivilegeMap.java     |   490 -
 .../db/generic/service/thrift/TSentryRole.java  |   539 -
 .../db/service/thrift/SentryPolicyService.java  | 15564 -----------------
 .../TAlterSentryRoleAddGroupsRequest.java       |   746 -
 .../TAlterSentryRoleAddGroupsResponse.java      |   394 -
 .../thrift/TAlterSentryRoleAddUsersRequest.java |   741 -
 .../TAlterSentryRoleAddUsersResponse.java       |   394 -
 .../TAlterSentryRoleDeleteGroupsRequest.java    |   746 -
 .../TAlterSentryRoleDeleteGroupsResponse.java   |   394 -
 .../TAlterSentryRoleDeleteUsersRequest.java     |   741 -
 .../TAlterSentryRoleDeleteUsersResponse.java    |   394 -
 .../TAlterSentryRoleGrantPrivilegeRequest.java  |   866 -
 .../TAlterSentryRoleGrantPrivilegeResponse.java |   669 -
 .../TAlterSentryRoleRevokePrivilegeRequest.java |   866 -
 ...TAlterSentryRoleRevokePrivilegeResponse.java |   394 -
 .../thrift/TCreateSentryRoleRequest.java        |   591 -
 .../thrift/TCreateSentryRoleResponse.java       |   394 -
 .../service/thrift/TDropPrivilegesRequest.java  |   596 -
 .../service/thrift/TDropPrivilegesResponse.java |   394 -
 .../service/thrift/TDropSentryRoleRequest.java  |   591 -
 .../service/thrift/TDropSentryRoleResponse.java |   394 -
 .../TListSentryPrivilegesByAuthRequest.java     |   915 -
 .../TListSentryPrivilegesByAuthResponse.java    |   571 -
 ...TListSentryPrivilegesForProviderRequest.java |   915 -
 ...ListSentryPrivilegesForProviderResponse.java |   544 -
 .../thrift/TListSentryPrivilegesRequest.java    |   706 -
 .../thrift/TListSentryPrivilegesResponse.java   |   558 -
 .../thrift/TListSentryRolesForUserRequest.java  |   591 -
 .../service/thrift/TListSentryRolesRequest.java |   600 -
 .../thrift/TListSentryRolesResponse.java        |   558 -
 .../thrift/TRenamePrivilegesRequest.java        |   702 -
 .../thrift/TRenamePrivilegesResponse.java       |   394 -
 .../db/service/thrift/TSentryActiveRoleSet.java |   537 -
 .../db/service/thrift/TSentryAuthorizable.java  |   817 -
 .../thrift/TSentryConfigValueRequest.java       |   600 -
 .../thrift/TSentryConfigValueResponse.java      |   504 -
 .../thrift/TSentryExportMappingDataRequest.java |   600 -
 .../TSentryExportMappingDataResponse.java       |   500 -
 .../db/service/thrift/TSentryGrantOption.java   |    48 -
 .../db/service/thrift/TSentryGroup.java         |   389 -
 .../thrift/TSentryImportMappingDataRequest.java |   693 -
 .../TSentryImportMappingDataResponse.java       |   394 -
 .../db/service/thrift/TSentryMappingData.java   |   898 -
 .../db/service/thrift/TSentryPrivilege.java     |  1258 --
 .../db/service/thrift/TSentryPrivilegeMap.java  |   490 -
 .../provider/db/service/thrift/TSentryRole.java |   645 -
 .../service/thrift/TSentryResponseStatus.java   |   598 -
 .../thrift/sentry_common_serviceConstants.java  |    57 -
 .../thrift/SentryPolicyStoreProcessor.java      |     2 +-
 .../sentry/service/thrift/ServiceConstants.java |   261 -
 .../apache/sentry/service/thrift/Status.java    |   132 -
 .../main/resources/sentry_common_service.thrift |    46 -
 .../sentry_generic_policy_service.thrift        |   279 -
 .../main/resources/sentry_policy_service.thrift |   330 -
 sentry-service/pom.xml                          |    36 +
 sentry-service/sentry-service-common/pom.xml    |   143 +
 .../thrift/SentryGenericPolicyService.java      | 10416 +++++++++++
 .../TAlterSentryRoleAddGroupsRequest.java       |   842 +
 .../TAlterSentryRoleAddGroupsResponse.java      |   391 +
 .../TAlterSentryRoleDeleteGroupsRequest.java    |   842 +
 .../TAlterSentryRoleDeleteGroupsResponse.java   |   391 +
 .../TAlterSentryRoleGrantPrivilegeRequest.java  |   798 +
 .../TAlterSentryRoleGrantPrivilegeResponse.java |   391 +
 .../TAlterSentryRoleRevokePrivilegeRequest.java |   798 +
 ...TAlterSentryRoleRevokePrivilegeResponse.java |   391 +
 .../generic/service/thrift/TAuthorizable.java   |   490 +
 .../thrift/TCreateSentryRoleRequest.java        |   692 +
 .../thrift/TCreateSentryRoleResponse.java       |   391 +
 .../service/thrift/TDropPrivilegesRequest.java  |   697 +
 .../service/thrift/TDropPrivilegesResponse.java |   391 +
 .../service/thrift/TDropSentryRoleRequest.java  |   692 +
 .../service/thrift/TDropSentryRoleResponse.java |   391 +
 .../TListSentryPrivilegesByAuthRequest.java     |  1112 ++
 .../TListSentryPrivilegesByAuthResponse.java    |   569 +
 ...TListSentryPrivilegesForProviderRequest.java |  1011 ++
 ...ListSentryPrivilegesForProviderResponse.java |   541 +
 .../thrift/TListSentryPrivilegesRequest.java    |   957 +
 .../thrift/TListSentryPrivilegesResponse.java   |   555 +
 .../service/thrift/TListSentryRolesRequest.java |   701 +
 .../thrift/TListSentryRolesResponse.java        |   555 +
 .../thrift/TRenamePrivilegesRequest.java        |  1002 ++
 .../thrift/TRenamePrivilegesResponse.java       |   391 +
 .../service/thrift/TSentryActiveRoleSet.java    |   537 +
 .../service/thrift/TSentryGrantOption.java      |    48 +
 .../service/thrift/TSentryPrivilege.java        |  1080 ++
 .../service/thrift/TSentryPrivilegeMap.java     |   490 +
 .../db/generic/service/thrift/TSentryRole.java  |   539 +
 .../db/service/thrift/SentryPolicyService.java  | 15564 +++++++++++++++++
 .../TAlterSentryRoleAddGroupsRequest.java       |   746 +
 .../TAlterSentryRoleAddGroupsResponse.java      |   394 +
 .../thrift/TAlterSentryRoleAddUsersRequest.java |   741 +
 .../TAlterSentryRoleAddUsersResponse.java       |   394 +
 .../TAlterSentryRoleDeleteGroupsRequest.java    |   746 +
 .../TAlterSentryRoleDeleteGroupsResponse.java   |   394 +
 .../TAlterSentryRoleDeleteUsersRequest.java     |   741 +
 .../TAlterSentryRoleDeleteUsersResponse.java    |   394 +
 .../TAlterSentryRoleGrantPrivilegeRequest.java  |   866 +
 .../TAlterSentryRoleGrantPrivilegeResponse.java |   669 +
 .../TAlterSentryRoleRevokePrivilegeRequest.java |   866 +
 ...TAlterSentryRoleRevokePrivilegeResponse.java |   394 +
 .../thrift/TCreateSentryRoleRequest.java        |   591 +
 .../thrift/TCreateSentryRoleResponse.java       |   394 +
 .../service/thrift/TDropPrivilegesRequest.java  |   596 +
 .../service/thrift/TDropPrivilegesResponse.java |   394 +
 .../service/thrift/TDropSentryRoleRequest.java  |   591 +
 .../service/thrift/TDropSentryRoleResponse.java |   394 +
 .../TListSentryPrivilegesByAuthRequest.java     |   915 +
 .../TListSentryPrivilegesByAuthResponse.java    |   571 +
 ...TListSentryPrivilegesForProviderRequest.java |   915 +
 ...ListSentryPrivilegesForProviderResponse.java |   544 +
 .../thrift/TListSentryPrivilegesRequest.java    |   706 +
 .../thrift/TListSentryPrivilegesResponse.java   |   558 +
 .../thrift/TListSentryRolesForUserRequest.java  |   591 +
 .../service/thrift/TListSentryRolesRequest.java |   600 +
 .../thrift/TListSentryRolesResponse.java        |   558 +
 .../thrift/TRenamePrivilegesRequest.java        |   702 +
 .../thrift/TRenamePrivilegesResponse.java       |   394 +
 .../db/service/thrift/TSentryActiveRoleSet.java |   537 +
 .../db/service/thrift/TSentryAuthorizable.java  |   817 +
 .../thrift/TSentryConfigValueRequest.java       |   600 +
 .../thrift/TSentryConfigValueResponse.java      |   504 +
 .../thrift/TSentryExportMappingDataRequest.java |   600 +
 .../TSentryExportMappingDataResponse.java       |   500 +
 .../db/service/thrift/TSentryGrantOption.java   |    48 +
 .../db/service/thrift/TSentryGroup.java         |   389 +
 .../thrift/TSentryImportMappingDataRequest.java |   693 +
 .../TSentryImportMappingDataResponse.java       |   394 +
 .../db/service/thrift/TSentryMappingData.java   |   898 +
 .../db/service/thrift/TSentryPrivilege.java     |  1258 ++
 .../db/service/thrift/TSentryPrivilegeMap.java  |   490 +
 .../provider/db/service/thrift/TSentryRole.java |   645 +
 .../service/thrift/TSentryResponseStatus.java   |   598 +
 .../thrift/sentry_common_serviceConstants.java  |    57 +
 .../sentry/service/thrift/ServiceConstants.java |   257 +
 .../apache/sentry/service/thrift/Status.java    |   132 +
 .../main/resources/sentry_common_service.thrift |    46 +
 .../sentry_generic_policy_service.thrift        |   279 +
 .../main/resources/sentry_policy_service.thrift |   330 +
 170 files changed, 72281 insertions(+), 72171 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/f5368df5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2ea4735..ce48f68 100644
--- a/pom.xml
+++ b/pom.xml
@@ -425,6 +425,11 @@ limitations under the License.
       </dependency>
       <dependency>
         <groupId>org.apache.sentry</groupId>
+        <artifactId>sentry-service-common</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.sentry</groupId>
         <artifactId>sentry-provider-common</artifactId>
         <version>${project.version}</version>
       </dependency>
@@ -620,6 +625,7 @@ limitations under the License.
 
   <modules>
     <module>sentry-core</module>
+    <module>sentry-service</module>
     <module>sentry-binding</module>
     <module>sentry-provider</module>
     <module>sentry-policy</module>

http://git-wip-us.apache.org/repos/asf/sentry/blob/f5368df5/sentry-dist/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-dist/pom.xml b/sentry-dist/pom.xml
index 80ec9c9..0403770 100644
--- a/sentry-dist/pom.xml
+++ b/sentry-dist/pom.xml
@@ -72,6 +72,10 @@ limitations under the License.
     </dependency>
     <dependency>
       <groupId>org.apache.sentry</groupId>
+      <artifactId>sentry-service-common</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.sentry</groupId>
       <artifactId>sentry-provider-common</artifactId>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/sentry/blob/f5368df5/sentry-provider/sentry-provider-db/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/pom.xml b/sentry-provider/sentry-provider-db/pom.xml
index b8143ff..f3029fa 100644
--- a/sentry-provider/sentry-provider-db/pom.xml
+++ b/sentry-provider/sentry-provider-db/pom.xml
@@ -107,6 +107,10 @@ limitations under the License.
       <artifactId>sentry-policy-engine</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.apache.sentry</groupId>
+      <artifactId>sentry-service-common</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.apache.hive</groupId>
       <artifactId>hive-shims</artifactId>
       <scope>provided</scope>
@@ -222,24 +226,6 @@ limitations under the License.
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>add-source</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>add-source</goal>
-            </goals>
-            <configuration>
-              <sources>
-                <source>src/gen/thrift/gen-javabean</source>
-              </sources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <groupId>org.datanucleus</groupId>
         <artifactId>datanucleus-maven-plugin</artifactId>
         <configuration>
@@ -339,66 +325,5 @@ limitations under the License.
         </dependency>
       </dependencies>
     </profile>
-    <profile>
-      <id>thriftif</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>generate-thrift-sources</id>
-                <phase>generate-sources</phase>
-                <configuration>
-                  <target>
-                    <taskdef name="for" classname="net.sf.antcontrib.logic.ForTask"
-                      classpathref="maven.plugin.classpath" />
-                    <property name="thrift.args" value="-I ${thrift.home} --gen java:beans,hashcode"/>
-                    <property name="thrift.gen.dir" value="${basedir}/src/gen/thrift"/>
-                    <delete dir="${thrift.gen.dir}"/>
-                    <mkdir dir="${thrift.gen.dir}"/>
-                    <for param="thrift.file">
-                      <path>
-                        <fileset dir="${basedir}/src/main/resources/" includes="**/*.thrift" />
-                      </path>
-                      <sequential>
-                        <echo message="Generating Thrift code for @{thrift.file}"/>
-                        <exec executable="${thrift.home}/bin/thrift"  failonerror="true" dir=".">
-                          <arg line="${thrift.args} -I ${basedir}/src/main/resources/ -o ${thrift.gen.dir} @{thrift.file} " />
-                        </exec>
-                      </sequential>
-                    </for>
-                  </target>
-                </configuration>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-              </execution>
-            </executions>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-enforcer-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>enforce-property</id>
-                <goals>
-                  <goal>enforce</goal>
-                </goals>
-                <configuration>
-                  <rules>
-                    <requireProperty>
-                      <property>thrift.home</property>
-                    </requireProperty>
-                  </rules>
-                  <fail>true</fail>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
   </profiles>
 </project>