bereng commented on code in PR #1891:
URL: https://github.com/apache/cassandra/pull/1891#discussion_r1184537595


##########
src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java:
##########
@@ -69,11 +73,19 @@ public class BigFormat extends 
AbstractSSTableFormat<BigTableReader, BigTableWri
 {
     private final static Logger logger = 
LoggerFactory.getLogger(BigFormat.class);
 
+    // Feature flag env variable to use extended TTL up to 2106 with the new 
oa sstable format. See c14227
+    public static enum TTL_MODE {LEGACY_TTL_2038, COMPATIBILITY, 
EXTENDED_TTL_2106};
+    @VisibleForTesting
+    public static final String USE_OA_SSTABLE_FORMAT = 
"cassandra.use_oa_sstable_format";
+    private static final String ttlFeatureFlagValue = 
System.getProperty(USE_OA_SSTABLE_FORMAT, "").toUpperCase();
+    public final static TTL_MODE ttlMode = 
EnumUtils.getEnumMap(TTL_MODE.class).keySet().contains(ttlFeatureFlagValue) ? 
TTL_MODE.valueOf(ttlFeatureFlagValue)
+                                                                               
                                        : TTL_MODE.LEGACY_TTL_2038;
+
     public static final BigFormat instance = new BigFormat();
 
     private final Version latestVersion = new BigVersion(this, 
BigVersion.current_version);
     private final BigTableReaderFactory readerFactory = new 
BigTableReaderFactory();
-    private final BigTableWriterFactory writerFactory = new 
BigTableWriterFactory();
+    private final BigTableWriterFactory writerFactory = new 
BigTableWriterFactory(); 

Review Comment:
   Will do



-- 
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]

Reply via email to