brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [2/6] incubator-brooklyn git commit: install java: use async-ssh-exec
Date Tue, 23 Dec 2014 15:13:08 GMT
install java: use async-ssh-exec


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

Branch: refs/heads/master
Commit: ee8d521c17aae93c5865752ed16664b67e6da14f
Parents: 5c0cc78
Author: Aled Sage <aled.sage@gmail.com>
Authored: Thu Dec 18 22:35:30 2014 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Fri Dec 19 00:18:47 2014 +0000

----------------------------------------------------------------------
 .../brooklyn/entity/java/JavaSoftwareProcessSshDriver.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ee8d521c/software/base/src/main/java/brooklyn/entity/java/JavaSoftwareProcessSshDriver.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/java/JavaSoftwareProcessSshDriver.java
b/software/base/src/main/java/brooklyn/entity/java/JavaSoftwareProcessSshDriver.java
index 88dd631..3847261 100644
--- a/software/base/src/main/java/brooklyn/entity/java/JavaSoftwareProcessSshDriver.java
+++ b/software/base/src/main/java/brooklyn/entity/java/JavaSoftwareProcessSshDriver.java
@@ -42,10 +42,12 @@ import brooklyn.util.collections.MutableMap;
 import brooklyn.util.collections.MutableSet;
 import brooklyn.util.exceptions.Exceptions;
 import brooklyn.util.flags.TypeCoercions;
+import brooklyn.util.internal.ssh.ShellTool;
 import brooklyn.util.ssh.BashCommands;
 import brooklyn.util.task.DynamicTasks;
 import brooklyn.util.task.Tasks;
 import brooklyn.util.task.ssh.SshTasks;
+import brooklyn.util.task.system.ProcessTaskFactory;
 import brooklyn.util.task.system.ProcessTaskWrapper;
 import brooklyn.util.text.StringEscapes.BashStringEscapes;
 import brooklyn.util.text.Strings;
@@ -339,8 +341,9 @@ public abstract class JavaSoftwareProcessSshDriver extends AbstractSoftwareProce
         getLocation().acquireMutex("installing", "installing Java at " + getLocation());
         try {
             log.debug("Installing Java {} at {}@{}", new Object[]{version, getEntity(), getLocation()});
-            ProcessTaskWrapper<Integer> installCommand = Entities.submit(getEntity(),
-                    SshTasks.newSshExecTaskFactory(getLocation(), command));
+            ProcessTaskFactory<Integer> taskFactory = SshTasks.newSshExecTaskFactory(getLocation(),
command)
+                    .configure(ShellTool.PROP_EXEC_ASYNC, true);
+            ProcessTaskWrapper<Integer> installCommand = Entities.submit(getEntity(),
taskFactory);
             int result = installCommand.get();
             if (result != 0) {
                 log.warn("Installation of Java {} failed at {}@{}: {}",


Mime
View raw message