@@ -121,7 +121,7 @@ private static class RevisionsOptions extends Utils.NodeStoreOptions {
121121 final OptionSpec <Long > olderThan ;
122122 final OptionSpec <Double > delay ;
123123 final OptionSpec <Double > fullGcDelayFactor ;
124- final OptionSpec <Long > fullGcMaxAgeInSecs ;
124+ final OptionSpec <Long > fullGcMaxAge ;
125125 final OptionSpec <?> continuous ;
126126 final OptionSpec <?> fullGCOnly ;
127127 final OptionSpec <Boolean > resetFullGC ;
@@ -191,10 +191,10 @@ private static class RevisionsOptions extends Utils.NodeStoreOptions {
191191 fullGcProgressSize = parser .accepts ("fullGcProgressSize" , "The number of documents to check for " +
192192 "garbage in each Full GC cycle" )
193193 .withRequiredArg ().ofType (Integer .class ).defaultsTo (10000 );
194- fullGcMaxAgeInSecs = parser .accepts ("fullGcMaxAgeInSecs " , "The maximum age of the document in seconds " +
194+ fullGcMaxAge = parser .accepts ("fullGcMaxAge " , "The maximum age of the document in seconds " +
195195 "to be considered for Full GC i.e. Version Garbage Collector (Full GC) logic will only consider those " +
196- "nodes for Full GC which are not accessed recently (currentTime - lastModifiedTime > fullGcMaxAgeInSecs )" )
197- .withOptionalArg ().ofType (Long .class ).defaultsTo (86400L );
196+ "nodes for Full GC which are not accessed recently (currentTime - lastModifiedTime > fullGcMaxAge )" )
197+ .withOptionalArg ().ofType (Long .class ).defaultsTo (TimeUnit . DAYS . toMillis ( 1 ) );
198198 }
199199
200200 public RevisionsOptions parse (String [] args ) {
@@ -238,8 +238,8 @@ int getFullGcProgressSize() {
238238 return fullGcProgressSize .value (options );
239239 }
240240
241- long getFullGcMaxAgeInSecs () {
242- return fullGcMaxAgeInSecs .value (options );
241+ long getFullGcMaxAge () {
242+ return fullGcMaxAge .value (options );
243243 }
244244
245245 double getFullGcDelayFactor () {
@@ -357,7 +357,7 @@ private VersionGarbageCollector bootstrapVGC(RevisionsOptions options, Closer cl
357357 builder .setFullGCDelayFactor (options .getFullGcDelayFactor ());
358358 builder .setFullGCBatchSize (options .getFullGcBatchSize ());
359359 builder .setFullGCProgressSize (options .getFullGcProgressSize ());
360- builder .setFullGcMaxAgeMillis (SECONDS .toMillis (options .getFullGcMaxAgeInSecs ()));
360+ builder .setFullGcMaxAgeMillis (SECONDS .toMillis (options .getFullGcMaxAge ()));
361361
362362 // create a VersionGCSupport while builder is read-write
363363 VersionGCSupport gcSupport = builder .createVersionGCSupport ();
@@ -389,7 +389,7 @@ private VersionGarbageCollector bootstrapVGC(RevisionsOptions options, Closer cl
389389 System .out .println ("FullGcDelayFactory is : " + options .getFullGcDelayFactor ());
390390 System .out .println ("FullGcBatchSize is : " + options .getFullGcBatchSize ());
391391 System .out .println ("FullGcProgressSize is : " + options .getFullGcProgressSize ());
392- System .out .println ("FullGcMaxAgeInSecs is : " + options .getFullGcMaxAgeInSecs ());
392+ System .out .println ("FullGcMaxAgeInSecs is : " + options .getFullGcMaxAge ());
393393 System .out .println ("FullGcMaxAgeMillis is : " + builder .getFullGcMaxAgeMillis ());
394394 VersionGarbageCollector gc = createVersionGC (builder .build (), gcSupport , options .isDryRun (), builder );
395395
0 commit comments