ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject [4/4] incubator-ranger git commit: RANGER-246 Enable Kafka service by default
Date Wed, 27 May 2015 19:56:09 GMT
RANGER-246 Enable Kafka service by default

Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/80c46f22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/80c46f22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/80c46f22

Branch: refs/heads/ranger-0.5
Commit: 80c46f22f2790f8dfe5eea66d4fd433c469c2a0d
Parents: 5596d2e
Author: Don Bosco Durai <bosco@apache.org>
Authored: Tue May 26 16:51:09 2015 -0700
Committer: Don Bosco Durai <bosco@apache.org>
Committed: Tue May 26 16:51:09 2015 -0700

----------------------------------------------------------------------
 .../plugin/store/EmbeddedServiceDefsUtil.java   | 14 +++++
 src/main/assembly/admin-web.xml                 | 65 ++++++++++++++++++++
 2 files changed, 79 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/80c46f22/agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
----------------------------------------------------------------------
diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
b/agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
index 2930606..2115256 100755
--- a/agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
+++ b/agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
@@ -50,6 +50,8 @@ public class EmbeddedServiceDefsUtil {
 	public static final String EMBEDDED_SERVICEDEF_STORM_NAME = "storm";
 	public static final String EMBEDDED_SERVICEDEF_YARN_NAME  = "yarn";
 	public static final String EMBEDDED_SERVICEDEF_KMS_NAME  = "kms";
+	public static final String EMBEDDED_SERVICEDEF_KAFKA_NAME  = "kafka";
+	public static final String EMBEDDED_SERVICEDEF_SOLR_NAME  = "solr";
 	public static final String PROPERTY_CREATE_EMBEDDED_SERVICE_DEFS = "ranger.service.store.create.embedded.service-defs";
 
 	private static EmbeddedServiceDefsUtil instance = new EmbeddedServiceDefsUtil();
@@ -62,6 +64,8 @@ public class EmbeddedServiceDefsUtil {
 	private RangerServiceDef stormServiceDef = null;
 	private RangerServiceDef yarnServiceDef  = null;
 	private RangerServiceDef kmsServiceDef  = null;
+	private RangerServiceDef kafkaServiceDef  = null;
+	private RangerServiceDef solrServiceDef  = null;
 
 	private Gson gsonBuilder = null;
 
@@ -89,6 +93,8 @@ public class EmbeddedServiceDefsUtil {
 			stormServiceDef = getOrCreateServiceDef(store, EMBEDDED_SERVICEDEF_STORM_NAME);
 			yarnServiceDef  = getOrCreateServiceDef(store, EMBEDDED_SERVICEDEF_YARN_NAME);
 			kmsServiceDef  = getOrCreateServiceDef(store, EMBEDDED_SERVICEDEF_KMS_NAME);
+			kafkaServiceDef  = getOrCreateServiceDef(store, EMBEDDED_SERVICEDEF_KAFKA_NAME);
+			solrServiceDef  = getOrCreateServiceDef(store, EMBEDDED_SERVICEDEF_SOLR_NAME);
 		} catch(Throwable excp) {
 			LOG.fatal("EmbeddedServiceDefsUtil.init(): failed", excp);
 		}
@@ -124,6 +130,14 @@ public class EmbeddedServiceDefsUtil {
 		return getId(kmsServiceDef);
 	}
 	
+	public long getKafkaServiceDefId() {
+		return getId(kafkaServiceDef);
+	}
+
+	public long getSolrServiceDefId() {
+		return getId(solrServiceDef);
+	}
+
 	private long getId(RangerServiceDef serviceDef) {
 		return serviceDef == null || serviceDef.getId() == null ? -1 : serviceDef.getId().longValue();
 	}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/80c46f22/src/main/assembly/admin-web.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/admin-web.xml b/src/main/assembly/admin-web.xml
index 9136418..4f34ef6 100644
--- a/src/main/assembly/admin-web.xml
+++ b/src/main/assembly/admin-web.xml
@@ -266,8 +266,73 @@
 	    <include>org.apache.ranger:jisql</include>
      </includes>
     </moduleSet>
+    
+    	     <moduleSet>
+     			<binaries>
+        			<includeDependencies>true</includeDependencies>
+        			<outputDirectory>/ews/webapp/WEB-INF/classes/ranger-plugins/kafka</outputDirectory>
+        			<unpack>false</unpack>
+        			<directoryMode>755</directoryMode>
+        			<fileMode>644</fileMode>
+     			</binaries>
+     			<includes>
+       				<include>security_plugins.ranger-kafka-plugin:ranger-kafka-plugin</include>
+     			</includes>
+    		</moduleSet>
+    		
+    		<moduleSet>
+     			<binaries>
+        			<includeDependencies>true</includeDependencies>
+        			<outputDirectory>/ews/webapp/WEB-INF/classes/ranger-plugins/solr</outputDirectory>
+        			<unpack>false</unpack>
+        			<directoryMode>755</directoryMode>
+        			<fileMode>644</fileMode>
+     			</binaries>
+     			<includes>
+       				<include>security_plugins.ranger-solr-plugin:ranger-solr-plugin</include>
+     			</includes>
+    		</moduleSet>
   </moduleSets> 	
 
+<!-- 
+  <profiles>
+      <profile>
+          <id>kafka-security</id>
+          <moduleSets>
+     		<moduleSet>
+     			<binaries>
+        			<includeDependencies>true</includeDependencies>
+        			<outputDirectory>/ews/webapp/WEB-INF/classes/ranger-plugins/kafka</outputDirectory>
+        			<unpack>false</unpack>
+        			<directoryMode>755</directoryMode>
+        			<fileMode>644</fileMode>
+     			</binaries>
+     			<includes>
+       				<include>security_plugins.ranger-kafka-plugin:ranger-kafka-plugin</include>
+     			</includes>
+    		</moduleSet>
+    	</moduleSets>
+      </profile>
+      <profile>
+          <id>solr-security</id>
+          <moduleSets>
+     		<moduleSet>
+     			<binaries>
+        			<includeDependencies>true</includeDependencies>
+        			<outputDirectory>/ews/webapp/WEB-INF/classes/ranger-plugins/solr</outputDirectory>
+        			<unpack>false</unpack>
+        			<directoryMode>755</directoryMode>
+        			<fileMode>644</fileMode>
+     			</binaries>
+     			<includes>
+       				<include>security_plugins.ranger-solr-plugin:ranger-solr-plugin</include>
+     			</includes>
+    		</moduleSet>
+    	</moduleSets>
+      </profile>
+      
+  </profiles>
+   -->
   <fileSets>
 	<fileSet>
 		<outputDirectory>/ews</outputDirectory>


Mime
View raw message