walterddr commented on code in PR #8894:
URL: https://github.com/apache/pinot/pull/8894#discussion_r899633954
##########
pinot-core/src/main/java/org/apache/pinot/core/common/datatable/DataTableFactory.java:
##########
@@ -20,22 +20,58 @@
import java.io.IOException;
import java.nio.ByteBuffer;
+import org.apache.pinot.common.utils.DataSchema;
import org.apache.pinot.common.utils.DataTable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class DataTableFactory {
+ private static final Logger LOGGER =
LoggerFactory.getLogger(DataTableFactory.class);
+ public static final int VERSION_2 = 2;
+ public static final int VERSION_3 = 3;
+ public static final int VERSION_4 = 4;
+ public static final int DEFAULT_VERSION = VERSION_3;
+
+ private static int _version = DataTableFactory.DEFAULT_VERSION;
+
private DataTableFactory() {
}
+ public static int getCurrentDataTableVersion() {
+ return _version;
+ }
+
+ public static void setCurrentDataTableVersion(int version) {
+ LOGGER.warn("Setting current DataTable version to: " + version);
Review Comment:
this field cannot be dynamically set. (e.g. can only be set once). I am not
sure whether there's anyway to enforce this field to only be set during server
startup time.
--
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]