bharatviswa504 commented on a change in pull request #1100: HDDS-1802. Add
Eviction policy for table cache.
URL: https://github.com/apache/hadoop/pull/1100#discussion_r304680430
##########
File path:
hadoop-hdds/common/src/main/java/org/apache/hadoop/utils/db/cache/TableCache.java
##########
@@ -69,4 +73,25 @@
* @return iterator of the underlying cache for the table.
*/
Iterator<Map.Entry<CACHEKEY, CACHEVALUE>> iterator();
+
+ /**
+ * Check key exist in cache or not.
+ *
+ * If it exists return CacheResult with value and status as
+ * {@link CacheStatus#EXISTS}
+ *
+ * If it does not exist:
+ * If cache clean up policy is
+ * {@link TableCacheImpl.CacheCleanupPolicy#NEVER} it means table cache is
+ * full cache. It return's {@link CacheResult} with null
+ * and status as {@link CacheStatus#NOT_EXIST}.
+ *
+ * If cache clean up policy is {@link CacheCleanupPolicy#MANUAL} it means
+ * table cache is partial cache. It return's {@link CacheResult} with
+ * null and status as CHECK_IN_TABLE.
+ *
+ * @param cachekey
+ */
+ CacheResult<CACHEVALUE> isExist(CACHEKEY cachekey);
Review comment:
Done.
----------------------------------------------------------------
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]