Github user chtyim commented on a diff in the pull request:
https://github.com/apache/incubator-twill/pull/52#discussion_r34397326
--- Diff: twill-api/src/main/java/org/apache/twill/api/TwillController.java
---
@@ -61,4 +63,31 @@
*/
@Nullable
ResourceReport getResourceReport();
+
+ /**
+ * Restart all instances of a particular {@link TwillRunnable}.
+ *
+ * @param runnable The name of the runnable to restart.
+ * @return A {@link Future} that will be completed when the restart
operation has been done.
+ */
+ Future<String> restartAllInstances(String runnable);
+
+ /**
+ * Restart instances of some {@link TwillRunnable}.
+ *
+ * @param runnableToInstanceIds A map of runnable ID to list of instance
IDs to be restarted.
+ * @return A {@link Future} that will be completed when the restart
operation has been done.
+ */
+ Future<Map<String, Set<Integer>>> restartInstances(Map<String,
Set<Integer>> runnableToInstanceIds);
--- End diff --
It is better because with the current signature, this will result in error:
```java
restartInstances(ImmutableMap.of("Test", ImmutableSet.of(1)));
```
With the one I proposed, it will not, hence easier to use.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---