From issues-return-99112-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Wed Sep 25 15:13:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 08E4F180663 for ; Wed, 25 Sep 2019 17:13:02 +0200 (CEST) Received: (qmail 51114 invoked by uid 500); 25 Sep 2019 15:13:02 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 51105 invoked by uid 99); 25 Sep 2019 15:13:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Sep 2019 15:13:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 2CADFE3131 for ; Wed, 25 Sep 2019 15:13:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 1AD78780820 for ; Wed, 25 Sep 2019 15:13:00 +0000 (UTC) Date: Wed, 25 Sep 2019 15:13:00 +0000 (UTC) From: "Sergey Antonov (Jira)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IGNITE-12225) Add enum for cluster state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IGNITE-12225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Antonov updated IGNITE-12225: ------------------------------------ Description: We have 3 cluster states at the moment: inactive, active, read-only. For getting current cluster state and changing them {{IgniteCluster}} has methods: * {{boolean active()}}, {{void active(boolean active)}} - for cluster activation/deactivation * {{boolean readOnly()}}, {{void readOnly(boolean readOnly)}} - for enabling/disabling read-only mode. Also we have control.sh commans for changing cluster state: * {{--activate}} * {{--deactivate}} * {{--read-only-on}} * {{--read-only-off}} For me current API looks unuseful. My proposal: # Create enum {{ClusterState}} with values {{ACTIVE}}, {{INACTIVE}}, {{READ-ONLY}}. # Add methods to {{IgniteCluster}}: #* {{ClusterState state()}} returns current cluster state #* {{void state(ClusterState newState)}} changes cluster state to {{newState}} state # Mark as deprecated the following methods in {{IgniteCluster}}: {{boolean active()}}, {{void active(boolean active)}}, # Add new command to control.sh: {{control.sh --set-state (ACTIVE|INACTIVE|READ-ONLY)}} [--yes] # Add warn message that command is depricated in control.sh. Commands: --activate, --deactivate, # Remove commands from control.sh: --read-only-on, --read-only-off (no one release wasn't published with this functional) was: We have 3 cluster states at the moment: inactive, active, read-only. For getting current cluster state and changing them {{IgniteCluster}} has methods: * {{boolean active()}}, {{void active(boolean active)}} - for cluster activation/deactivation * {{boolean readOnly()}}, {{void readOnly(boolean readOnly)}} - for enabling/disabling read-only mode. Also we have control.sh commans for changing cluster state: * {{--activate}} * {{--deactivate}} * {{--read-only-on}} * {{--read-only-off}} For me current API looks unuseful. My proposal: # Create enum {{ClusterState}} with values {{ACTIVE}}, {{INACTIVE}}, {{READ-ONLY}}. # Add methods to {{IgniteCluster}}: #* {{ClusterState state()}} returns current cluster state #* {{void state(ClusterState newState)}} changes cluster state to {{newState}} state # Mark as deprecated the following methods in {{IgniteCluster}}: {{boolean active()}}, {{void active(boolean active)}}, # Add new command to control.sh: {{control.sh --set-state (ACTIVE|INACTIVE|READ-ONLY)}} [--yes] # Add warn message that command is depricated in control.sh. Commands: --activate, --deactivate, --read-only-on, --read-only-off > Add enum for cluster state > -------------------------- > > Key: IGNITE-12225 > URL: https://issues.apache.org/jira/browse/IGNITE-12225 > Project: Ignite > Issue Type: Improvement > Reporter: Sergey Antonov > Assignee: Sergey Antonov > Priority: Major > Fix For: 2.8 > > > We have 3 cluster states at the moment: inactive, active, read-only. > For getting current cluster state and changing them {{IgniteCluster}} has methods: > * {{boolean active()}}, {{void active(boolean active)}} - for cluster activation/deactivation > * {{boolean readOnly()}}, {{void readOnly(boolean readOnly)}} - for enabling/disabling read-only mode. > Also we have control.sh commans for changing cluster state: > * {{--activate}} > * {{--deactivate}} > * {{--read-only-on}} > * {{--read-only-off}} > For me current API looks unuseful. My proposal: > # Create enum {{ClusterState}} with values {{ACTIVE}}, {{INACTIVE}}, {{READ-ONLY}}. > # Add methods to {{IgniteCluster}}: > #* {{ClusterState state()}} returns current cluster state > #* {{void state(ClusterState newState)}} changes cluster state to {{newState}} state > # Mark as deprecated the following methods in {{IgniteCluster}}: {{boolean active()}}, {{void active(boolean active)}}, > # Add new command to control.sh: {{control.sh --set-state (ACTIVE|INACTIVE|READ-ONLY)}} [--yes] > # Add warn message that command is depricated in control.sh. Commands: --activate, --deactivate, > # Remove commands from control.sh: --read-only-on, --read-only-off (no one release wasn't published with this functional) -- This message was sent by Atlassian Jira (v8.3.4#803005)