kadirozde commented on code in PR #2244: URL: https://github.com/apache/phoenix/pull/2244#discussion_r2265485775
########## phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/HAGroupStoreRecord.java: ########## @@ -0,0 +1,265 @@ +/* + * 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.phoenix.jdbc; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.phoenix.thirdparty.com.google.common.base.Preconditions; +import org.apache.phoenix.thirdparty.com.google.common.collect.ImmutableSet; +import org.apache.phoenix.util.JacksonUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; + +/** + * Immutable class representing an HA group store record with simplified fields. + * This is a simplified version of ClusterRoleRecord that contains essential + * information about an HA group only for a single cluster. + */ +public class HAGroupStoreRecord { + + private static final Logger LOG = LoggerFactory.getLogger(HAGroupStoreRecord.class); + public static final String DEFAULT_PROTOCOL_VERSION = "1.0"; + + /** + * Enum representing the HA group state with each state having a corresponding ClusterRole. + */ + public enum HAGroupState { + ABORT_TO_ACTIVE, + ABORT_TO_STANDBY, + ACTIVE_IN_SYNC, + ACTIVE_NOT_IN_SYNC, + ACTIVE_NOT_IN_SYNC_TO_STANDBY, + ACTIVE_NOT_IN_SYNC_WITH_OFFLINE_PEER, + ACTIVE_TO_STANDBY, Review Comment: I think ACTIVE_TO_STANDBY should be renamed to ACTIVE_IN_SYNC_TO_STANDBY -- 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. To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org