palashc commented on code in PR #2033:
URL: https://github.com/apache/phoenix/pull/2033#discussion_r1879791747
##########
phoenix-core-client/src/main/java/org/apache/phoenix/util/CDCUtil.java:
##########
@@ -150,4 +154,30 @@ public static boolean isBinaryType(PDataType dataType) {
|| sqlType == Types.LONGVARBINARY
|| dataType.getSqlType() == PDataType.VARBINARY_ENCODED_TYPE);
}
+
+ public enum CdcStreamStatus {
+ ENABLED("ENABLED"),
+ ENABLING("ENABLING"),
+ DISABLED("DISABLED"),
+ DISABLING("DISABLING");
+
+ private final String serializedValue;
+
+ private CdcStreamStatus(String value) {
+ this.serializedValue = value;
+ }
+
+ public String getSerializedValue() {
+ return serializedValue;
+ }
+ }
+
+ public static long getCDCCreationTimestamp(PTable table) {
+ for (PTable index : table.getIndexes()) {
+ if (CDCUtil.isCDCIndex(index)) {
+ return index.getTimeStamp();
+ }
+ }
Review Comment:
@haridsv As we discussed I added the check to only allow a single
(enable/enabling) stream in createCDC. This also has the effect of only
allowing a single CDC index since I throw a SQLException.
--
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]