Fixed notes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8c668794 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8c668794 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8c668794 Branch: refs/heads/ignite-gg-9615 Commit: 8c6687944643853a85fc56246e42a811d249f497 Parents: 7e0aef7 Author: nikolay_tikhonov <ntikho...@gridgain.com> Authored: Thu Jul 9 18:20:42 2015 +0300 Committer: nikolay_tikhonov <ntikho...@gridgain.com> Committed: Thu Jul 9 18:24:55 2015 +0300 ---------------------------------------------------------------------- DEVNOTES.txt | 8 ++++++ .../apache/ignite/mesos/ClusterProperties.java | 14 +++++++++++ .../apache/ignite/mesos/IgniteScheduler.java | 26 +++++++++++++++----- parent/pom.xml | 4 +++ 4 files changed, 46 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/DEVNOTES.txt ---------------------------------------------------------------------- diff --git a/DEVNOTES.txt b/DEVNOTES.txt index d7cffa7..b5e556a 100644 --- a/DEVNOTES.txt +++ b/DEVNOTES.txt @@ -99,6 +99,14 @@ mvn clean package Look for ignite-mesos-<version>-jar-with-dependencies.jar in ./target directory. +Ignite Yarn Maven Build Instructions +============================================ +cd to ./modules/yarn + +mvn clean package + +Look for ignite-yarn-<version>-jar-with-dependencies.jar in ./target directory. + Run tests ========== To run tests locally use: http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java ---------------------------------------------------------------------- diff --git a/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java b/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java index a97a97f..548b4bb 100644 --- a/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java +++ b/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java @@ -169,6 +169,12 @@ public class ClusterProperties { private String userLibsUrl = null; /** */ + public static final String LICENCE_URL = "LICENCE_URL"; + + /** Licence url. */ + private String licenceUrl = null; + + /** */ public static final String IGNITE_CONFIG_XML = "IGNITE_XML_CONFIG"; /** Ignite config. */ @@ -398,6 +404,13 @@ public class ClusterProperties { } /** + * @return Url to licence. + */ + public String licenceUrl() { + return licenceUrl; + } + + /** * @return Host name constraint. */ public Pattern hostnameConstraint() { @@ -436,6 +449,7 @@ public class ClusterProperties { prop.userLibsUrl = getStringProperty(IGNITE_USERS_LIBS_URL, props, null); prop.ignitePackageUrl = getStringProperty(IGNITE_PACKAGE_URL, props, null); + prop.licenceUrl = getStringProperty(LICENCE_URL, props, null); prop.igniteCfgUrl = getStringProperty(IGNITE_CONFIG_XML_URL, props, null); prop.cpu = getDoubleProperty(IGNITE_TOTAL_CPU, props, UNLIMITED); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java ---------------------------------------------------------------------- diff --git a/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java b/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java index 7795a31..9097d64 100644 --- a/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java +++ b/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java @@ -147,14 +147,18 @@ public class IgniteScheduler implements Scheduler { String cfgName = resourceProvider.configName(); - if (clusterProps.igniteConfigUrl() != null) { - String[] split = clusterProps.igniteConfigUrl().split("/"); + if (clusterProps.igniteConfigUrl() != null) + cfgName = fileName(clusterProps.igniteConfigUrl()); - cfgName = split[split.length - 1]; - } + String licenceFile = null; + + if (clusterProps.licenceUrl() != null) + licenceFile = fileName(clusterProps.licenceUrl()); - builder.setValue("find . -maxdepth 1 -name \"*.jar\" -exec cp {} ./gridgain-community-*/libs/ \\; && " - + "./gridgain-community-*/bin/ignite.sh " + builder.setValue( + (licenceFile != null ? "find . -maxdepth 1 -name \"" + licenceFile + "\" -exec cp {} ./*/ \\; && " : "") + + "find . -maxdepth 1 -name \"*.jar\" -exec cp {} ./*/libs/ \\; && " + + "./*/bin/ignite.sh " + cfgName + " -J-Xmx" + String.valueOf((int)igniteTask.mem() + "m") + " -J-Xms" + String.valueOf((int)igniteTask.mem()) + "m"); @@ -180,6 +184,16 @@ public class IgniteScheduler implements Scheduler { } /** + * @param path Path. + * @return File name. + */ + private String fileName(String path) { + String[] split = path.split("/"); + + return split[split.length - 1]; + } + + /** * @return Address running nodes. */ private String getAddress(String address) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/parent/pom.xml ---------------------------------------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index bfa9f62..5eecff7 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -323,6 +323,10 @@ <packages>org.apache.ignite.mesos*</packages> </group> <group> + <title>Yarn Integration</title> + <packages>org.apache.ignite.yarn*</packages> + </group> + <group> <title>Spark Integration</title> <packages>org.apache.ignite.spark.examples.java</packages> </group>