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

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

jinmeiliao closed pull request #1101: GEODE-3788: alter async event queue on a 
locator with no cluster conf…
URL: https://github.com/apache/geode/pull/1101
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommand.java
index 42f0079b9f..ae818ab7fc 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommand.java
@@ -87,6 +87,11 @@ public Result execute(@CliOption(key = ID, mandatory = true, 
help = ID_HELP) Str
     // may be shutdown, but we still need to update Cluster Configuration.
     ClusterConfigurationService service = getSharedConfiguration();
 
+    if (service == null) {
+      return ResultBuilder.createUserErrorResult("Cluster Configuration 
Service is not available. "
+          + "Please connect to a locator with running Cluster Configuration 
Service.");
+    }
+
     boolean locked = service.lockSharedConfiguration();
     if (!locked) {
       return ResultBuilder.createGemFireErrorResult("Unable to lock the 
cluster configuration.");
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommandTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommandTest.java
index 38dc072cff..c9d51041d5 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommandTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommandTest.java
@@ -109,6 +109,13 @@ public void emptyConfiguration_ifExists() throws Exception 
{
     verify(service).unlockSharedConfiguration();
   }
 
+  @Test
+  public void cluster_config_service_not_available() throws Exception {
+    doReturn(null).when(command).getSharedConfiguration();
+    gfsh.executeAndAssertThat(command, "alter async-event-queue --id=test 
--batch-size=100")
+        .statusIsError().containsOutput("Cluster Configuration Service is not 
available");
+  }
+
   @Test
   public void queueIdNotFoundInTheMap() throws Exception {
     Configuration configuration = new Configuration("group");


 

----------------------------------------------------------------
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:
[email protected]


> alter async event queue attributes
> ----------------------------------
>
>                 Key: GEODE-3788
>                 URL: https://issues.apache.org/jira/browse/GEODE-3788
>             Project: Geode
>          Issue Type: Sub-task
>          Components: docs, gfsh
>            Reporter: Swapnil Bawaskar
>             Fix For: 1.4.0
>
>
> We should add a new {{alter async-event-queue}} gfsh command that will allow 
> users to change the following attributes on the AsyncEventQueue:
> - batch size
> - batch time interval
> - maximum queue memory
> Attributes changed with this command should only be reflected in cluster 
> configuration. We will require users to do a rolling re-start of the servers 
> for the new settings to take effect.



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

Reply via email to