apex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pra...@apache.org
Subject apex-core git commit: APEXCORE-711 create a new attribute CUSTOM_SSL_SERVER_CONFIG and use its value to set custom ssl server config
Date Thu, 11 May 2017 01:25:09 GMT
Repository: apex-core
Updated Branches:
  refs/heads/master 0824a4baf -> 1c2d66adc


APEXCORE-711 create a new attribute CUSTOM_SSL_SERVER_CONFIG and use its value to set custom
ssl server config


Project: http://git-wip-us.apache.org/repos/asf/apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/apex-core/commit/1c2d66ad
Tree: http://git-wip-us.apache.org/repos/asf/apex-core/tree/1c2d66ad
Diff: http://git-wip-us.apache.org/repos/asf/apex-core/diff/1c2d66ad

Branch: refs/heads/master
Commit: 1c2d66adc3724ab5c7fd33ecfe95203c68c81578
Parents: 0824a4b
Author: Sanjay Pujare <sanjaypujare@Sanjay-DT-Mac2.local>
Authored: Thu Apr 27 14:56:17 2017 -0700
Committer: Sanjay Pujare <sanjaypujare@Sanjay-DT-Mac2.local>
Committed: Wed May 10 17:44:44 2017 -0700

----------------------------------------------------------------------
 api/src/main/java/com/datatorrent/api/Context.java            | 7 +++++++
 .../java/com/datatorrent/stram/StreamingAppMasterService.java | 5 +++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/apex-core/blob/1c2d66ad/api/src/main/java/com/datatorrent/api/Context.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/Context.java b/api/src/main/java/com/datatorrent/api/Context.java
index eb241d6..743f0f1 100644
--- a/api/src/main/java/com/datatorrent/api/Context.java
+++ b/api/src/main/java/com/datatorrent/api/Context.java
@@ -531,6 +531,13 @@ public interface Context
      */
     Attribute<String> LIBRARY_JARS = new Attribute<>(String2String.getInstance());
 
+    /**
+     * This configuration file can be used to over-ride the default Yarn configuration.
+     * For example, this can be used to provide custom SSL parameters in the configuration.
+     * Note that this file needs to be present on the node.
+     */
+    Attribute<String> STRAM_HTTP_CUSTOM_CONFIG = new Attribute<>(String2String.getInstance());
+
     @SuppressWarnings(value = "FieldNameHidesFieldInSuperclass")
     long serialVersionUID = AttributeMap.AttributeInitializer.initialize(DAGContext.class);
   }

http://git-wip-us.apache.org/repos/asf/apex-core/blob/1c2d66ad/engine/src/main/java/com/datatorrent/stram/StreamingAppMasterService.java
----------------------------------------------------------------------
diff --git a/engine/src/main/java/com/datatorrent/stram/StreamingAppMasterService.java b/engine/src/main/java/com/datatorrent/stram/StreamingAppMasterService.java
index 0ca8cd1..b7cbc29 100644
--- a/engine/src/main/java/com/datatorrent/stram/StreamingAppMasterService.java
+++ b/engine/src/main/java/com/datatorrent/stram/StreamingAppMasterService.java
@@ -53,6 +53,7 @@ import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang3.tuple.MutablePair;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.net.NetUtils;
 import org.apache.hadoop.security.Credentials;
@@ -631,6 +632,10 @@ public class StreamingAppMasterService extends CompositeService
         config = new Configuration(config);
         config.set("hadoop.http.filter.initializers", StramWSFilterInitializer.class.getCanonicalName());
       }
+      String customSSLConfig = dag.getValue(LogicalPlan.STRAM_HTTP_CUSTOM_CONFIG);
+      if (StringUtils.isNotEmpty(customSSLConfig)) {
+        config.addResource(new Path(customSSLConfig));
+      }
       WebApp webApp = WebApps.$for("stram", StramAppContext.class, appContext, "ws").with(config).start(new
StramWebApp(this.dnmgr));
       LOG.info("Started web service at port: " + webApp.port());
       appMasterTrackingUrl = NetUtils.getConnectAddress(webApp.getListenerAddress()).getHostName()
+ ":" + webApp.port();


Mime
View raw message