tdcmeehan commented on code in PR #10118: URL: https://github.com/apache/iceberg/pull/10118#discussion_r1566401938
########## core/src/main/java/org/apache/iceberg/io/ContentCache.java: ########## @@ -18,274 +18,35 @@ */ package org.apache.iceberg.io; -import com.github.benmanes.caffeine.cache.Cache; -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.Weigher; -import com.github.benmanes.caffeine.cache.stats.CacheStats; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.UncheckedIOException; -import java.nio.ByteBuffer; -import java.time.Duration; -import java.util.List; -import java.util.function.Function; -import org.apache.iceberg.exceptions.NotFoundException; -import org.apache.iceberg.exceptions.ValidationException; -import org.apache.iceberg.relocated.com.google.common.base.MoreObjects; -import org.apache.iceberg.relocated.com.google.common.collect.Lists; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** * Class that provides file-content caching during reading. * * <p>The file-content caching is initiated by calling {@link ContentCache#tryCache(InputFile)}. * Given a FileIO, a file location string, and file length that is within allowed limit, - * ContentCache will return a {@link CachingInputFile} that is backed by the cache. Calling {@link - * CachingInputFile#newStream()} will return a {@link ByteBufferInputStream} backed by list of - * {@link ByteBuffer} from the cache if such file-content exist in the cache. If the file-content - * does not exist in the cache yet, a regular InputFile will be instantiated, read-ahead, and loaded - * into the cache before returning ByteBufferInputStream. The regular InputFile is also used as a - * fallback if cache loading fail. + * ContentCache will return an implementation of a {@link InputFile} that may be cached. */ -public class ContentCache { Review Comment: I have marked the class as deprecated according to the deprecation notice: https://iceberg.apache.org/contribute/#deprecation-notices I have left this class just about unchanged, and copied a class `InMemoryContentCache`. This class is marked as deprecated and the documentation points to the in memory cache. The interface name is changed to `FileIOContentCache`. PTAL and let me know what you think of this revision. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org