jkosh44 commented on a change in pull request #1083: [WIP] POC for Command
module with centralized Command Pattern logic
URL: https://github.com/apache/fluo/pull/1083#discussion_r358026663
##########
File path: modules/command/src/main/java/org/apache/fluo/command/FluoList.java
##########
@@ -54,17 +54,37 @@ public static void main(String[] args) throws Exception {
System.out.println("----------- ------ ---------");
for (String path : children) {
- FluoConfiguration appConfig = new FluoConfiguration(config);
- appConfig.setApplicationName(path);
- try (FluoAdminImpl admin = new FluoAdminImpl(appConfig)) {
- String state = "STOPPED";
- if (admin.applicationRunning()) {
- state = "RUNNING";
- }
- int numWorkers = admin.numWorkers();
- System.out.format("%-15s %-11s %4d\n", path, state, numWorkers);
- }
+ listApp(config, path);
+ }
+ }
+ }
+
+ private boolean checkCuratorExists(CuratorFramework curator) {
+ try {
+ return curator.checkExists().forPath("/") != null;
+ } catch (Exception e) {
+ throw new RuntimeException("Error checking if curator exists", e);
Review comment:
`.forPath` throws Exception and I thought that it was a case were we'd want
to show the whole stack trace. I don't think this isn't the cleanest way, so
I'm open to suggestions.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services