pauloricardomg commented on a change in pull request #1046:
URL: https://github.com/apache/cassandra/pull/1046#discussion_r650059408



##########
File path: src/java/org/apache/cassandra/tools/nodetool/Snapshot.java
##########
@@ -63,6 +67,13 @@ public void execute(NodeProbe probe)
 
             Map<String, String> options = new HashMap<String,String>();
             options.put("skipFlush", Boolean.toString(skipFlush));
+            if (null != ttl) {
+                Duration d = new Duration(ttl);

Review comment:
       test nodetool snapshot with crazy ttl will fail and another test that 
ttl < 1 minute fails

##########
File path: src/java/org/apache/cassandra/db/ColumnFamilyStore.java
##########
@@ -1879,6 +1882,15 @@ private void writeSnapshotManifest(final JSONArray 
filesJSONArr, final String sn
             {
                 final JSONObject manifestJSON = new JSONObject();
                 manifestJSON.put("files", filesJSONArr);
+                if (ttl != null) {
+                    DateFormat df = new 
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.S'Z'");

Review comment:
       +1 to using Instant.

##########
File path: src/java/org/apache/cassandra/service/StorageService.java
##########
@@ -3672,14 +3673,18 @@ public int garbageCollect(String tombstoneOptionString, 
int jobs, String keyspac
     public void takeSnapshot(String tag, Map<String, String> options, 
String... entities) throws IOException
     {
         boolean skipFlush = 
Boolean.parseBoolean(options.getOrDefault("skipFlush", "false"));
+        Duration ttl = null;

Review comment:
       double check again if it's bigger than 1 minute




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

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