Package io.trino.plugin.hive.fs
Class TransactionScopeCachingDirectoryLister
- java.lang.Object
-
- io.trino.plugin.hive.fs.TransactionScopeCachingDirectoryLister
-
- All Implemented Interfaces:
DirectoryLister,TableInvalidationCallback
public class TransactionScopeCachingDirectoryLister extends Object implements DirectoryLister
Caches directory content (including listings that were started concurrently).TransactionScopeCachingDirectoryListerassumes that all listings are performed by same user within single transaction, therefore any failure can be shared between concurrent listings.
-
-
Constructor Summary
Constructors Constructor Description TransactionScopeCachingDirectoryLister(DirectoryLister delegate, long maxFileStatuses)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinvalidate(Partition partition)voidinvalidate(Table table)org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus>list(org.apache.hadoop.fs.FileSystem fs, Table table, org.apache.hadoop.fs.Path path)org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus>listFilesRecursively(org.apache.hadoop.fs.FileSystem fs, Table table, org.apache.hadoop.fs.Path path)
-
-
-
Constructor Detail
-
TransactionScopeCachingDirectoryLister
public TransactionScopeCachingDirectoryLister(DirectoryLister delegate, long maxFileStatuses)
-
-
Method Detail
-
list
public org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> list(org.apache.hadoop.fs.FileSystem fs, Table table, org.apache.hadoop.fs.Path path) throws IOException- Specified by:
listin interfaceDirectoryLister- Throws:
IOException
-
listFilesRecursively
public org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> listFilesRecursively(org.apache.hadoop.fs.FileSystem fs, Table table, org.apache.hadoop.fs.Path path) throws IOException- Specified by:
listFilesRecursivelyin interfaceDirectoryLister- Throws:
IOException
-
invalidate
public void invalidate(Table table)
- Specified by:
invalidatein interfaceTableInvalidationCallback
-
invalidate
public void invalidate(Partition partition)
- Specified by:
invalidatein interfaceTableInvalidationCallback
-
-