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

ASF GitHub Bot commented on GEODE-2668:
---------------------------------------

pdxrunner commented on a change in pull request #1127:  GEODE-2668: build 
tabular command result from a list of function results 
URL: https://github.com/apache/geode/pull/1127#discussion_r155337849
 
 

 ##########
 File path: 
geode-core/src/main/java/org/apache/geode/management/internal/cli/result/ResultBuilder.java
 ##########
 @@ -188,6 +189,22 @@ public static CommandResult buildResult(ResultData 
resultData) {
     return new CommandResult(resultData);
   }
 
+  public static CommandResult buildResult(List<CliFunctionResult> 
functionResults) {
+    TabularResultData tabularData = ResultBuilder.createTabularResultData();
+    boolean success = false;
+    for (CliFunctionResult result : functionResults) {
+      tabularData.accumulate("Member", result.getMemberIdOrName());
+      tabularData.accumulate("Status", result.getStatus());
+      // if one member returns back successful results, the command results in 
success
+      if (result.isSuccessful()) {
+        success = true;
+      }
+    }
+
+    tabularData.setStatus(success ? Result.Status.OK : Result.Status.ERROR);
+    return ResultBuilder.buildResult(tabularData);
+  }
 
 Review comment:
   Yes ..., maybe ...? for instance if a replicated region is being created on 
a server group, but failed on one member in the group, then UNTIL a new server 
comes up the replicated copies may not exist. Should/does a user get warned 
about this condition? The result of the command isn't what the user expected.
   
   However if we take the fact of the updated cluster config as the "truth", 
then your reasoning makes sense.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add gfsh command to destroy gateway receiver
> --------------------------------------------
>
>                 Key: GEODE-2668
>                 URL: https://issues.apache.org/jira/browse/GEODE-2668
>             Project: Geode
>          Issue Type: Sub-task
>          Components: docs, gfsh
>            Reporter: Swapnil Bawaskar
>
> Currently, there is a {{create gateway-receiver}} command, but no 
> corresponding destroy command.



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

Reply via email to