bgaborg commented on a change in pull request #802: HADOOP-16279. S3Guard:
Implement time-based (TTL) expiry for entries …
URL: https://github.com/apache/hadoop/pull/802#discussion_r290200412
##########
File path:
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/MetadataStore.java
##########
@@ -212,29 +225,54 @@ void move(Collection<Path> pathsToDelete,
void destroy() throws IOException;
/**
- * Clear any metadata older than a specified time from the repository.
- * Implementations MUST clear file metadata, and MAY clear directory metadata
- * (s3a itself does not track modification time for directories).
- * Implementations may also choose to throw UnsupportedOperationException
- * istead. Note that modification times should be in UTC, as returned by
- * System.currentTimeMillis at the time of modification.
+ * Prune method with two modes of operation:
+ * <ul>
+ * <li>
+ * {@link PruneMode#ALL_BY_MODTIME}
+ * Clear any metadata older than a specified mod_time from the store.
+ * Note that this modification time is the S3 modification time from the
+ * object's metadata - from the object store.
+ * Implementations MUST clear file metadata, and MAY clear directory
+ * metadata (s3a itself does not track modification time for directories).
+ * Implementations may also choose to throw UnsupportedOperationException
+ * instead. Note that modification times should be in UTC, as returned by
+ * System.currentTimeMillis at the time of modification.
+ * </li>
+ * </ul>
*
- * @param modTime Oldest modification time to allow
+ * <ul>
+ * <li>
+ * {@link PruneMode#TOMBSTONES_BY_LASTUPDATED}
+ * Clear any tombstone updated earlier than a specified time from the
+ * store. Note that this last_updated is the time when the metadata
+ * entry was last updated and maintained by the metadata store.
+ * Implementations MUST clear file metadata, and MAY clear directory
+ * metadata (s3a itself does not track modification time for directories).
+ * Implementations may also choose to throw UnsupportedOperationException
+ * instead. Note that last_updated times should be in UTC, as returned by
+ * System.currentTimeMillis at the time of modification.
+ * </li>
+ * </ul>
+ *
+ * @param pruneMode
+ * @param cutoff Oldest time to allow
Review comment:
But I'll add ZodenDateTime with my next commit, so let's see.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]