Class TarFileSystem

java.lang.Object
java.nio.file.FileSystem
org.epics.archiverappliance.utils.nio.tar.TarFileSystem
All Implemented Interfaces:
Closeable, AutoCloseable, ETLOptimizable

public class TarFileSystem extends FileSystem implements ETLOptimizable
An NIO2 file system that encapsulates a tar file containing gzipped pb files. This is intended to be used as a extra-long-term-store where performance of retrieval is not necessarily a requirement. There is limited support for updating a file; updating an existing entry relies on logical deletes and is inefficient. There is support for optimizing a tar file by copying into a new file and discarding all the logically deleted blocks ( similar to MySQL's optimize ) Only the final component of the path is used to identify the tar entry. Given a path of the form tar:///arch/XLTS/epics/arch/tartest:2016.pb, we map it to the tar file /arch/XLTS/epics/arch/tartest.tar and the entry tartest:2016.pb or tartest:2016.parquet within the tar file. We do not maintain nested paths inside a tar file system; the tar catalog is treated as a single directory containing all the entries in the tar file. Also, for now, we do not support links, devices and other tar features. Because updates and deletes are inefficient logical operations, a tar data store is expected to be the very last data store in a PVTypeInfo. ETL into and out of an tar data store is expected to be infrequent ( maybe once a year ).