[GitHub] twill pull request #55: (TWILL-237) Twill is using hdfs HAUtil api that is n...

2017-08-04 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/twill/pull/55


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (TWILL-237) Twill is using hdfs HAUtil api that is nont-compatible with hadoop 2.8

2017-08-04 Thread Terence Yim (JIRA)

 [ 
https://issues.apache.org/jira/browse/TWILL-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Terence Yim updated TWILL-237:
--
Fix Version/s: 0.12.0

> Twill is using hdfs HAUtil api that is nont-compatible with hadoop 2.8
> --
>
> Key: TWILL-237
> URL: https://issues.apache.org/jira/browse/TWILL-237
> Project: Apache Twill
>  Issue Type: Bug
>  Components: yarn
>Reporter: Yuliya Feldman
>Assignee: Yuliya Feldman
> Fix For: 0.12.0
>
>
> Twill is using hdfs.HAUtil apis that are suppose to be hdfs private and 
> subsequently signature of isLogicalURI was changed (actually name was 
> changed) in hadoop version 2.8
> Will post a patch for now to support both old and new names, but I think 
> eventually references to private hdfs interfaces/classes should be removed 
> from twill



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TWILL-237) Twill is using hdfs HAUtil api that is nont-compatible with hadoop 2.8

2017-08-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TWILL-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16114666#comment-16114666
 ] 

ASF GitHub Bot commented on TWILL-237:
--

Github user asfgit closed the pull request at:

https://github.com/apache/twill/pull/55


> Twill is using hdfs HAUtil api that is nont-compatible with hadoop 2.8
> --
>
> Key: TWILL-237
> URL: https://issues.apache.org/jira/browse/TWILL-237
> Project: Apache Twill
>  Issue Type: Bug
>  Components: yarn
>Reporter: Yuliya Feldman
>Assignee: Yuliya Feldman
> Fix For: 0.12.0
>
>
> Twill is using hdfs.HAUtil apis that are suppose to be hdfs private and 
> subsequently signature of isLogicalURI was changed (actually name was 
> changed) in hadoop version 2.8
> Will post a patch for now to support both old and new names, but I think 
> eventually references to private hdfs interfaces/classes should be removed 
> from twill



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (TWILL-237) Twill is using hdfs HAUtil api that is nont-compatible with hadoop 2.8

2017-08-04 Thread Terence Yim (JIRA)

 [ 
https://issues.apache.org/jira/browse/TWILL-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Terence Yim resolved TWILL-237.
---
Resolution: Fixed

> Twill is using hdfs HAUtil api that is nont-compatible with hadoop 2.8
> --
>
> Key: TWILL-237
> URL: https://issues.apache.org/jira/browse/TWILL-237
> Project: Apache Twill
>  Issue Type: Bug
>  Components: yarn
>Reporter: Yuliya Feldman
>Assignee: Yuliya Feldman
> Fix For: 0.12.0
>
>
> Twill is using hdfs.HAUtil apis that are suppose to be hdfs private and 
> subsequently signature of isLogicalURI was changed (actually name was 
> changed) in hadoop version 2.8
> Will post a patch for now to support both old and new names, but I think 
> eventually references to private hdfs interfaces/classes should be removed 
> from twill



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TWILL-237) Twill is using hdfs HAUtil api that is nont-compatible with hadoop 2.8

2017-08-04 Thread Terence Yim (JIRA)

[ 
https://issues.apache.org/jira/browse/TWILL-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16114679#comment-16114679
 ] 

Terence Yim commented on TWILL-237:
---

Thanks [~yufeldman] for your contribution.

> Twill is using hdfs HAUtil api that is nont-compatible with hadoop 2.8
> --
>
> Key: TWILL-237
> URL: https://issues.apache.org/jira/browse/TWILL-237
> Project: Apache Twill
>  Issue Type: Bug
>  Components: yarn
>Reporter: Yuliya Feldman
>Assignee: Yuliya Feldman
> Fix For: 0.12.0
>
>
> Twill is using hdfs.HAUtil apis that are suppose to be hdfs private and 
> subsequently signature of isLogicalURI was changed (actually name was 
> changed) in hadoop version 2.8
> Will post a patch for now to support both old and new names, but I think 
> eventually references to private hdfs interfaces/classes should be removed 
> from twill



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (TWILL-134) Abilities to specify JVM opts on a twill runnable

2017-08-04 Thread Terence Yim (JIRA)

 [ 
https://issues.apache.org/jira/browse/TWILL-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Terence Yim resolved TWILL-134.
---
Resolution: Duplicate

The TWILL-241 is of bigger scope that covers this one as well.

> Abilities to specify JVM opts on a twill runnable
> -
>
> Key: TWILL-134
> URL: https://issues.apache.org/jira/browse/TWILL-134
> Project: Apache Twill
>  Issue Type: Improvement
>  Components: api
>Affects Versions: 0.2.0-incubating, 0.1.0-incubating, 0.3.0-incubating, 
> 0.5.0-incubating, 0.4.1-incubating
>Reporter: Sreevatsan Raman
>Assignee: Alvin Wang
> Fix For: 0.12.0
>
>
> Current capabilities in Twill allows users to set JVM opts on a Runnerservice 
> level, it would be useful to have a per-application and per runnable level 
> setting of JVM opts to allow more flexibility. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (TWILL-240) Improve EventHandler to handle more application lifecycle events

2017-08-04 Thread Terence Yim (JIRA)

 [ 
https://issues.apache.org/jira/browse/TWILL-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Terence Yim updated TWILL-240:
--
Fix Version/s: 0.12.0

> Improve EventHandler to handle more application lifecycle events
> 
>
> Key: TWILL-240
> URL: https://issues.apache.org/jira/browse/TWILL-240
> Project: Apache Twill
>  Issue Type: New Feature
>Reporter: Chengfeng Mao
>Assignee: Chengfeng Mao
> Fix For: 0.12.0
>
>
> Application Master should be able to run application specific code when 
> certain lifecycle events happen by calling methods from EventHandler. For 
> instance, when the app first starts, completes, aborts and etc.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] twill pull request #59: (TWILL-241) Added per runnable configuration and jvm...

2017-08-04 Thread chtyim
GitHub user chtyim opened a pull request:

https://github.com/apache/twill/pull/59

(TWILL-241) Added per runnable configuration and jvm options support

This PR has two commits, one for adding per runnable configuration, the 
other for adding per runnable jvm options.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/chtyim/twill 
feature/TWILL-241-per-runnable-opts

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/twill/pull/59.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #59


commit f1931deb128dda8b3c4da76486ab1b443318496e
Author: Terence Yim 
Date:   2017-08-04T22:29:05Z

(TWILL-241) Added support for per Runnable configuration

commit 29a7999f45859996595287fb1c28b225a2564ed9
Author: Terence Yim 
Date:   2017-08-04T23:19:32Z

(TWILL-241) Added support for per runnable JVM options
- Also removed JvmOptionsCodec since JvmOptions only uses simple types




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TWILL-241) Allow specifying reserved off-heap memory and extra JVM options per runnable

2017-08-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TWILL-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115179#comment-16115179
 ] 

ASF GitHub Bot commented on TWILL-241:
--

GitHub user chtyim opened a pull request:

https://github.com/apache/twill/pull/59

(TWILL-241) Added per runnable configuration and jvm options support

This PR has two commits, one for adding per runnable configuration, the 
other for adding per runnable jvm options.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/chtyim/twill 
feature/TWILL-241-per-runnable-opts

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/twill/pull/59.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #59


commit f1931deb128dda8b3c4da76486ab1b443318496e
Author: Terence Yim 
Date:   2017-08-04T22:29:05Z

(TWILL-241) Added support for per Runnable configuration

commit 29a7999f45859996595287fb1c28b225a2564ed9
Author: Terence Yim 
Date:   2017-08-04T23:19:32Z

(TWILL-241) Added support for per runnable JVM options
- Also removed JvmOptionsCodec since JvmOptions only uses simple types




> Allow specifying reserved off-heap memory and extra JVM options per runnable
> 
>
> Key: TWILL-241
> URL: https://issues.apache.org/jira/browse/TWILL-241
> Project: Apache Twill
>  Issue Type: Improvement
>  Components: api, yarn
>Affects Versions: 0.11.0
>Reporter: Andreas Neumann
>Assignee: Terence Yim
> Fix For: 0.12.0
>
>
> Sometimes, a particular runnable needs a lot more off-heap memory than 
> others. It would therefore be useful to specify the amount of reserved 
> non-heap memory per runnable. 
> Similarly, for example, for debugging purposes, it may be necessary to add a 
> JVM option for one of the runnables without affecting the other runnables of 
> the same application.   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] twill pull request #59: (TWILL-241) Added per runnable configuration and jvm...

2017-08-04 Thread anew
Github user anew commented on a diff in the pull request:

https://github.com/apache/twill/pull/59#discussion_r131510954
  
--- Diff: 
twill-yarn/src/main/java/org/apache/twill/yarn/YarnTwillPreparer.java ---
@@ -183,6 +184,13 @@ public TwillPreparer withConfiguration(Map config) {
   }
 
   @Override
+  public TwillPreparer withConfiguration(String runnableName, Map config) {
--- End diff --

If the config contains only one key, say reserved memory, will the 
remaining keys default to the values configured for the entire app? Or will 
they default to the system default?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TWILL-241) Allow specifying reserved off-heap memory and extra JVM options per runnable

2017-08-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TWILL-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115180#comment-16115180
 ] 

ASF GitHub Bot commented on TWILL-241:
--

Github user anew commented on a diff in the pull request:

https://github.com/apache/twill/pull/59#discussion_r131510954
  
--- Diff: 
twill-yarn/src/main/java/org/apache/twill/yarn/YarnTwillPreparer.java ---
@@ -183,6 +184,13 @@ public TwillPreparer withConfiguration(Map config) {
   }
 
   @Override
+  public TwillPreparer withConfiguration(String runnableName, Map config) {
--- End diff --

If the config contains only one key, say reserved memory, will the 
remaining keys default to the values configured for the entire app? Or will 
they default to the system default?


> Allow specifying reserved off-heap memory and extra JVM options per runnable
> 
>
> Key: TWILL-241
> URL: https://issues.apache.org/jira/browse/TWILL-241
> Project: Apache Twill
>  Issue Type: Improvement
>  Components: api, yarn
>Affects Versions: 0.11.0
>Reporter: Andreas Neumann
>Assignee: Terence Yim
> Fix For: 0.12.0
>
>
> Sometimes, a particular runnable needs a lot more off-heap memory than 
> others. It would therefore be useful to specify the amount of reserved 
> non-heap memory per runnable. 
> Similarly, for example, for debugging purposes, it may be necessary to add a 
> JVM option for one of the runnables without affecting the other runnables of 
> the same application.   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] twill pull request #59: (TWILL-241) Added per runnable configuration and jvm...

2017-08-04 Thread anew
Github user anew commented on a diff in the pull request:

https://github.com/apache/twill/pull/59#discussion_r131511023
  
--- Diff: 
twill-core/src/main/java/org/apache/twill/internal/TwillRuntimeSpecification.java
 ---
@@ -87,19 +86,46 @@ public String getTwillAppName() {
 return twillAppName;
   }
 
-  public int getReservedMemory() {
-return reservedMemory;
+  /**
+   * Returns the minimum heap ratio for the application master.
+   */
+  public double getAMMinHeapRatio() {
+return getMinHeapRatio(config);
+  }
+
+  /**
+   * Returns the minimum heap ratio for the given runnable.
+   */
+  public double getMinHeapRatio(String runnableName) {
+return getMinHeapRatio(runnableConfigs.containsKey(runnableName) ? 
runnableConfigs.get(runnableName) : config);
--- End diff --

I think this logic is incorrect. It might be that the runnable has its own 
config but does specify a min heap ratio. In that case the min heap ratio 
should come from the (appllication) config, and only if that does not specify a 
min heap ratio, use the default. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TWILL-241) Allow specifying reserved off-heap memory and extra JVM options per runnable

2017-08-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TWILL-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115182#comment-16115182
 ] 

ASF GitHub Bot commented on TWILL-241:
--

Github user anew commented on a diff in the pull request:

https://github.com/apache/twill/pull/59#discussion_r131511023
  
--- Diff: 
twill-core/src/main/java/org/apache/twill/internal/TwillRuntimeSpecification.java
 ---
@@ -87,19 +86,46 @@ public String getTwillAppName() {
 return twillAppName;
   }
 
-  public int getReservedMemory() {
-return reservedMemory;
+  /**
+   * Returns the minimum heap ratio for the application master.
+   */
+  public double getAMMinHeapRatio() {
+return getMinHeapRatio(config);
+  }
+
+  /**
+   * Returns the minimum heap ratio for the given runnable.
+   */
+  public double getMinHeapRatio(String runnableName) {
+return getMinHeapRatio(runnableConfigs.containsKey(runnableName) ? 
runnableConfigs.get(runnableName) : config);
--- End diff --

I think this logic is incorrect. It might be that the runnable has its own 
config but does specify a min heap ratio. In that case the min heap ratio 
should come from the (appllication) config, and only if that does not specify a 
min heap ratio, use the default. 


> Allow specifying reserved off-heap memory and extra JVM options per runnable
> 
>
> Key: TWILL-241
> URL: https://issues.apache.org/jira/browse/TWILL-241
> Project: Apache Twill
>  Issue Type: Improvement
>  Components: api, yarn
>Affects Versions: 0.11.0
>Reporter: Andreas Neumann
>Assignee: Terence Yim
> Fix For: 0.12.0
>
>
> Sometimes, a particular runnable needs a lot more off-heap memory than 
> others. It would therefore be useful to specify the amount of reserved 
> non-heap memory per runnable. 
> Similarly, for example, for debugging purposes, it may be necessary to add a 
> JVM option for one of the runnables without affecting the other runnables of 
> the same application.   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] twill pull request #59: (TWILL-241) Added per runnable configuration and jvm...

2017-08-04 Thread anew
Github user anew commented on a diff in the pull request:

https://github.com/apache/twill/pull/59#discussion_r131511104
  
--- Diff: 
twill-yarn/src/test/java/org/apache/twill/yarn/ContainerSizeTestRun.java ---
@@ -67,20 +69,37 @@ public void testContainerSize() throws 
InterruptedException, TimeoutException, E
   @Test
   public void testMaxHeapSize() throws InterruptedException, 
TimeoutException, ExecutionException {
 TwillRunner runner = getTwillRunner();
+String runnableName = "sleep";
+
 TwillController controller = runner.prepare(new MaxHeapApp())
-  // Alter the AM container size
-  
.withConfiguration(Collections.singletonMap(Configs.Keys.YARN_AM_MEMORY_MB, 
"256"))
+  // Alter the AM container size and heap ratio
+  .withConfiguration(ImmutableMap.of(Configs.Keys.YARN_AM_MEMORY_MB, 
"256",
+ 
Configs.Keys.HEAP_RESERVED_MIN_RATIO, "0.65"))
+  // Use a different heap ratio and reserved memory size for the 
runnable
+  .withConfiguration(runnableName,
+ 
ImmutableMap.of(Configs.Keys.HEAP_RESERVED_MIN_RATIO, "0.8",
--- End diff --

can you add a test that, if this config for the runnable does not have 
HEAP_RESERVED_MIN_RATIO, it defaults to the one above (0.65) and not the system 
default.  



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TWILL-241) Allow specifying reserved off-heap memory and extra JVM options per runnable

2017-08-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TWILL-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115184#comment-16115184
 ] 

ASF GitHub Bot commented on TWILL-241:
--

Github user anew commented on a diff in the pull request:

https://github.com/apache/twill/pull/59#discussion_r131511104
  
--- Diff: 
twill-yarn/src/test/java/org/apache/twill/yarn/ContainerSizeTestRun.java ---
@@ -67,20 +69,37 @@ public void testContainerSize() throws 
InterruptedException, TimeoutException, E
   @Test
   public void testMaxHeapSize() throws InterruptedException, 
TimeoutException, ExecutionException {
 TwillRunner runner = getTwillRunner();
+String runnableName = "sleep";
+
 TwillController controller = runner.prepare(new MaxHeapApp())
-  // Alter the AM container size
-  
.withConfiguration(Collections.singletonMap(Configs.Keys.YARN_AM_MEMORY_MB, 
"256"))
+  // Alter the AM container size and heap ratio
+  .withConfiguration(ImmutableMap.of(Configs.Keys.YARN_AM_MEMORY_MB, 
"256",
+ 
Configs.Keys.HEAP_RESERVED_MIN_RATIO, "0.65"))
+  // Use a different heap ratio and reserved memory size for the 
runnable
+  .withConfiguration(runnableName,
+ 
ImmutableMap.of(Configs.Keys.HEAP_RESERVED_MIN_RATIO, "0.8",
--- End diff --

can you add a test that, if this config for the runnable does not have 
HEAP_RESERVED_MIN_RATIO, it defaults to the one above (0.65) and not the system 
default.  



> Allow specifying reserved off-heap memory and extra JVM options per runnable
> 
>
> Key: TWILL-241
> URL: https://issues.apache.org/jira/browse/TWILL-241
> Project: Apache Twill
>  Issue Type: Improvement
>  Components: api, yarn
>Affects Versions: 0.11.0
>Reporter: Andreas Neumann
>Assignee: Terence Yim
> Fix For: 0.12.0
>
>
> Sometimes, a particular runnable needs a lot more off-heap memory than 
> others. It would therefore be useful to specify the amount of reserved 
> non-heap memory per runnable. 
> Similarly, for example, for debugging purposes, it may be necessary to add a 
> JVM option for one of the runnables without affecting the other runnables of 
> the same application.   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] twill pull request #59: (TWILL-241) Added per runnable configuration and jvm...

2017-08-04 Thread chtyim
Github user chtyim commented on a diff in the pull request:

https://github.com/apache/twill/pull/59#discussion_r131511349
  
--- Diff: 
twill-core/src/main/java/org/apache/twill/internal/TwillRuntimeSpecification.java
 ---
@@ -87,19 +86,46 @@ public String getTwillAppName() {
 return twillAppName;
   }
 
-  public int getReservedMemory() {
-return reservedMemory;
+  /**
+   * Returns the minimum heap ratio for the application master.
+   */
+  public double getAMMinHeapRatio() {
+return getMinHeapRatio(config);
+  }
+
+  /**
+   * Returns the minimum heap ratio for the given runnable.
+   */
+  public double getMinHeapRatio(String runnableName) {
+return getMinHeapRatio(runnableConfigs.containsKey(runnableName) ? 
runnableConfigs.get(runnableName) : config);
--- End diff --

Agree. Get it wrong after some refactoring


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] twill pull request #59: (TWILL-241) Added per runnable configuration and jvm...

2017-08-04 Thread chtyim
Github user chtyim commented on a diff in the pull request:

https://github.com/apache/twill/pull/59#discussion_r131511384
  
--- Diff: 
twill-yarn/src/main/java/org/apache/twill/yarn/YarnTwillPreparer.java ---
@@ -183,6 +184,13 @@ public TwillPreparer withConfiguration(Map config) {
   }
 
   @Override
+  public TwillPreparer withConfiguration(String runnableName, Map config) {
--- End diff --

Should default to the app setting first, then to the constants default


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (TWILL-241) Allow specifying reserved off-heap memory and extra JVM options per runnable

2017-08-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TWILL-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115190#comment-16115190
 ] 

ASF GitHub Bot commented on TWILL-241:
--

Github user chtyim commented on a diff in the pull request:

https://github.com/apache/twill/pull/59#discussion_r131511349
  
--- Diff: 
twill-core/src/main/java/org/apache/twill/internal/TwillRuntimeSpecification.java
 ---
@@ -87,19 +86,46 @@ public String getTwillAppName() {
 return twillAppName;
   }
 
-  public int getReservedMemory() {
-return reservedMemory;
+  /**
+   * Returns the minimum heap ratio for the application master.
+   */
+  public double getAMMinHeapRatio() {
+return getMinHeapRatio(config);
+  }
+
+  /**
+   * Returns the minimum heap ratio for the given runnable.
+   */
+  public double getMinHeapRatio(String runnableName) {
+return getMinHeapRatio(runnableConfigs.containsKey(runnableName) ? 
runnableConfigs.get(runnableName) : config);
--- End diff --

Agree. Get it wrong after some refactoring


> Allow specifying reserved off-heap memory and extra JVM options per runnable
> 
>
> Key: TWILL-241
> URL: https://issues.apache.org/jira/browse/TWILL-241
> Project: Apache Twill
>  Issue Type: Improvement
>  Components: api, yarn
>Affects Versions: 0.11.0
>Reporter: Andreas Neumann
>Assignee: Terence Yim
> Fix For: 0.12.0
>
>
> Sometimes, a particular runnable needs a lot more off-heap memory than 
> others. It would therefore be useful to specify the amount of reserved 
> non-heap memory per runnable. 
> Similarly, for example, for debugging purposes, it may be necessary to add a 
> JVM option for one of the runnables without affecting the other runnables of 
> the same application.   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TWILL-241) Allow specifying reserved off-heap memory and extra JVM options per runnable

2017-08-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TWILL-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115192#comment-16115192
 ] 

ASF GitHub Bot commented on TWILL-241:
--

Github user chtyim commented on a diff in the pull request:

https://github.com/apache/twill/pull/59#discussion_r131511384
  
--- Diff: 
twill-yarn/src/main/java/org/apache/twill/yarn/YarnTwillPreparer.java ---
@@ -183,6 +184,13 @@ public TwillPreparer withConfiguration(Map config) {
   }
 
   @Override
+  public TwillPreparer withConfiguration(String runnableName, Map config) {
--- End diff --

Should default to the app setting first, then to the constants default


> Allow specifying reserved off-heap memory and extra JVM options per runnable
> 
>
> Key: TWILL-241
> URL: https://issues.apache.org/jira/browse/TWILL-241
> Project: Apache Twill
>  Issue Type: Improvement
>  Components: api, yarn
>Affects Versions: 0.11.0
>Reporter: Andreas Neumann
>Assignee: Terence Yim
> Fix For: 0.12.0
>
>
> Sometimes, a particular runnable needs a lot more off-heap memory than 
> others. It would therefore be useful to specify the amount of reserved 
> non-heap memory per runnable. 
> Similarly, for example, for debugging purposes, it may be necessary to add a 
> JVM option for one of the runnables without affecting the other runnables of 
> the same application.   



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)