navinko commented on code in PR #10211:
URL: https://github.com/apache/ozone/pull/10211#discussion_r3219308288
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SequenceIdGenerator.java:
##########
@@ -64,19 +64,19 @@ public class SequenceIdGenerator {
/**
* Ids supported.
*/
- public static final String LOCAL_ID = "localId";
- public static final String DEL_TXN_ID = "delTxnId";
- public static final String CONTAINER_ID = "containerId";
+ public static final String LOCAL_ID = SequenceIdType.LOCAL_ID.getDbKey();
+ public static final String DEL_TXN_ID = SequenceIdType.DEL_TXN_ID.getDbKey();
+ public static final String CONTAINER_ID =
SequenceIdType.CONTAINER_ID.getDbKey();
// Certificate ID for all services, including root certificates, whose ID
// were using "rootCertificateId" before.
- public static final String CERTIFICATE_ID = "CertificateId";
+ public static final String CERTIFICATE_ID =
SequenceIdType.CERTIFICATE_ID.getDbKey();
@Deprecated
- public static final String ROOT_CERTIFICATE_ID = "rootCertificateId";
+ public static final String ROOT_CERTIFICATE_ID =
SequenceIdType.ROOT_CERTIFICATE_ID.getDbKey();
Review Comment:
Done
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SequenceIdGenerator.java:
##########
@@ -89,7 +89,7 @@ public class SequenceIdGenerator {
*/
public SequenceIdGenerator(ConfigurationSource conf,
SCMHAManager scmhaManager, Table<String, Long> sequenceIdTable) {
- this.sequenceIdToBatchMap = new HashMap<>();
+ this.sequenceIdToBatchMap = new EnumMap<>(SequenceIdType.class);
Review Comment:
Done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]