geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-3788) alter async event queue attributes
Date Tue, 28 Nov 2017 16:09:00 GMT

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

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

pdxrunner commented on a change in pull request #1084: GEODE-3788: add alter async-event-queue
command and tests
URL: https://github.com/apache/geode/pull/1084#discussion_r153537686
 
 

 ##########
 File path: geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterAsyncEventQueueCommand.java
 ##########
 @@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+
+package org.apache.geode.management.internal.cli.commands;
+
+import static org.apache.geode.management.internal.cli.i18n.CliStrings.CREATE_ASYNC_EVENT_QUEUE__BATCHTIMEINTERVAL__HELP;
+import static org.apache.geode.management.internal.cli.i18n.CliStrings.CREATE_ASYNC_EVENT_QUEUE__MAXIMUM_QUEUE_MEMORY__HELP;
+import static org.apache.geode.management.internal.cli.i18n.CliStrings.IFEXISTS;
+import static org.apache.geode.management.internal.cli.i18n.CliStrings.IFEXISTS_HELP;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+
+import org.springframework.shell.core.annotation.CliCommand;
+import org.springframework.shell.core.annotation.CliOption;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+import org.apache.geode.distributed.internal.ClusterConfigurationService;
+import org.apache.geode.management.cli.CliMetaData;
+import org.apache.geode.management.cli.Result;
+import org.apache.geode.management.internal.cli.AbstractCliAroundInterceptor;
+import org.apache.geode.management.internal.cli.GfshParseResult;
+import org.apache.geode.management.internal.cli.exceptions.EntityNotFoundException;
+import org.apache.geode.management.internal.cli.i18n.CliStrings;
+import org.apache.geode.management.internal.cli.result.ResultBuilder;
+import org.apache.geode.management.internal.cli.result.TabularResultData;
+import org.apache.geode.management.internal.configuration.domain.Configuration;
+import org.apache.geode.management.internal.configuration.utils.XmlUtils;
+import org.apache.geode.management.internal.security.ResourceOperation;
+import org.apache.geode.security.ResourcePermission;
+
+/**
+ * this command currently only updates the cluster configuration. Requires server restart
to pick up
+ * the changes.
+ */
+public class AlterAsyncEventQueueCommand implements GfshCommand {
+
+  static final String COMMAND_NAME = "alter async-event-queue";
+  static final String ID = "id";
+  static final String BATCH_SIZE = "batch-size";
+  static final String BATCH_TIME_INTERVAL = "batch-time-interval";
+  static final String MAX_QUEUE_MEMORY = "max-queue-memory";
+  static final String MAXIMUM_QUEUE_MEMORY = "maximum-queue-memory";
+
+  static final String COMMAND_HELP =
+      "alter attributes of async-event-queue, needs rolling restart for new attributes to
take effect. ";
+  static final String ID_HELP = "Id of the async event queue to be changed.";
+  static final String BATCH_SIZE_HELP = CliStrings.CREATE_ASYNC_EVENT_QUEUE__BATCH_SIZE__HELP;
 
 Review comment:
   For consistency, import this string from CliStrings as you did for the following help strings.

----------------------------------------------------------------
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:
users@infra.apache.org


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

Mime
View raw message