[GitHub] twill pull request #7: TWILL-185 Allow user to avoid scheduling the Location...

2016-08-29 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 #7: TWILL-185 Allow user to avoid scheduling the Location...

2016-08-27 Thread chtyim
Github user chtyim commented on a diff in the pull request:

https://github.com/apache/twill/pull/7#discussion_r76519593
  
--- Diff: twill-core/src/main/java/org/apache/twill/internal/Configs.java 
---
@@ -31,6 +31,11 @@
  */
 public static final String JAVA_RESERVED_MEMORY_MB = 
"twill.java.reserved.memory.mb";
 
+/**
+ * Set this to false to disable the secure store updates done by 
default.
+ */
+public static final String ENABLE_DEFAULT_SECURE_STORE_UPDATE = 
"twill.enable.default.secure.store.update";
--- End diff --

I think the common convention is to call it like 
`twill.secure.store.update.location.enabled` (from widest to narrowest scope, 
see hadoop-default.xml). Explicitly calling out `location` because that is what 
get updated by default right now and potentially there can be other secure 
store gets updated by 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.
---


[GitHub] twill pull request #7: TWILL-185 Allow user to avoid scheduling the Location...

2016-08-26 Thread chtyim
Github user chtyim commented on a diff in the pull request:

https://github.com/apache/twill/pull/7#discussion_r76454915
  
--- Diff: 
twill-yarn/src/main/java/org/apache/twill/yarn/YarnTwillRunnerService.java ---
@@ -157,11 +158,25 @@ public YarnTwillRunnerService(YarnConfiguration 
config, String zkConnect) {
* @param locationFactory Factory to create {@link Location} instances 
that are readable and writable by this service
*/
   public YarnTwillRunnerService(YarnConfiguration config, String 
zkConnect, LocationFactory locationFactory) {
+this(config, zkConnect, locationFactory, true);
+  }
+
+  /**
+   * Creates an instance.
+   *
+   * @param config Configuration of the yarn cluster
+   * @param zkConnect ZooKeeper connection string
+   * @param locationFactory Factory to create {@link Location} instances 
that are readable and writable by this service
+   * @param enableSecureStoreUpdate Whether to update SecureStore 
periodically
+   */
+  public YarnTwillRunnerService(YarnConfiguration config, String 
zkConnect, LocationFactory locationFactory,
+boolean enableSecureStoreUpdate) {
 this.yarnConfig = config;
 this.yarnAppClient = new 
VersionDetectYarnAppClientFactory().create(config);
 this.locationFactory = locationFactory;
 this.zkClientService = getZKClientService(zkConnect);
 this.controllers = HashBasedTable.create();
+this.enableSecureStoreUpdate = enableSecureStoreUpdate;
--- End diff --

Better use a configuration passed in from the `YarnConfiguration`. The keys 
should be defined in `Configs.Keys` class.


---
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.
---