You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@amaterasu.apache.org by ya...@apache.org on 2019/05/06 02:40:34 UTC
[incubator-amaterasu] 18/36: fixed memory issues in AM
This is an automated email from the ASF dual-hosted git repository.
yaniv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-amaterasu.git
commit d7ad6424977263f1fcaebd3efc0693cf0b79ba35
Author: Yaniv Rodenski <ya...@shinto.io>
AuthorDate: Fri Apr 26 13:19:28 2019 +1000
fixed memory issues in AM
---
.../src/main/kotlin/org/apache/amaterasu/leader/yarn/Client.kt | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/leader-yarn/src/main/kotlin/org/apache/amaterasu/leader/yarn/Client.kt b/leader-yarn/src/main/kotlin/org/apache/amaterasu/leader/yarn/Client.kt
index 49cf2be..0a0e8d7 100644
--- a/leader-yarn/src/main/kotlin/org/apache/amaterasu/leader/yarn/Client.kt
+++ b/leader-yarn/src/main/kotlin/org/apache/amaterasu/leader/yarn/Client.kt
@@ -16,11 +16,10 @@
*/
package org.apache.amaterasu.leader.yarn
-import org.apache.activemq.ActiveMQConnectionFactory
+import com.importre.crayon.bold
import org.apache.amaterasu.common.configuration.ClusterConfig
import org.apache.amaterasu.leader.common.launcher.AmaOpts
import org.apache.amaterasu.leader.common.execution.frameworks.FrameworkProvidersFactory
-import org.apache.amaterasu.leader.common.utilities.ActiveReportListener
import org.apache.amaterasu.leader.common.utilities.MessagingClientUtil
import org.apache.curator.framework.CuratorFrameworkFactory
import org.apache.curator.framework.recipes.barriers.DistributedBarrier
@@ -107,7 +106,7 @@ class Client {
val newIdVal = appContext.applicationId.toString() + "-" + UUID.randomUUID().toString()
if (opts.jobId.isEmpty()) {
- newId = "--new-job-id=" + newIdVal
+ newId = "--new-job-id=$newIdVal"
}
@@ -115,12 +114,14 @@ class Client {
" env HADOOP_USER_NAME=" + UserGroupInformation.getCurrentUser().userName +
" \$JAVA_HOME/bin/java" +
" -Dscala.usejavacp=false" +
+ " -Xmx1G" +
" org.apache.amaterasu.leader.yarn.ApplicationMaster " +
joinStrings(args) +
newId +
" 1>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout" +
" 2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stderr")
+ println("===> AM command ${commands[0]}".bold())
// Set up the container launch context for the application master
val amContainer = Records.newRecord(ContainerLaunchContext::class.java)
amContainer.commands = commands
@@ -133,7 +134,7 @@ class Client {
fs!!.mkdirs(jarPathQualified)
for (f in home.listFiles()) {
- fs!!.copyFromLocalFile(false, true, Path(f.getAbsolutePath()), jarPathQualified)
+ fs!!.copyFromLocalFile(false, true, Path(f.absolutePath), jarPathQualified)
}
// setup frameworks