Class NativeFiles
Session; its runtime handle is forwarded to the underlying object store.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidDelete files at the given URIs.List all Vortex files reachable underuri.readMetadata(Session session, NativeReadable readable) Read the user-defined metadata segments of a Vortex file through a caller-providedNativeReadable, instead of a native storage client.Read the user-defined metadata segments written into the Vortex file aturi, as opaque bytes keyed by the names theVortexWriterbuilder was given.static List<VortexColumnStatistics>readStatistics(Session session, NativeReadable readable) Read the per-column statistics of a Vortex file through a caller-providedNativeReadable, instead of a native storage client.static List<VortexColumnStatistics>Read the per-column statistics stored in the footer of the Vortex file aturi, in Arrow schema order.static long[]splits(Session session, NativeReadable readable) The natural row splits of the Vortex file behindreadable, as their boundaries: splitiholds rows[boundaries[i], boundaries[i + 1]).static long[]splits(Session session, NativeReadable readable, List<String> columns) splits(Session, NativeReadable)for a scan of the top-levelcolumns: the splits follow the chunks of those columns only.
-
Method Details
-
listFiles
List all Vortex files reachable underuri. -
delete
Delete files at the given URIs. Silently tolerates an empty list. -
readMetadata
public static Map<String,byte[]> readMetadata(Session session, String uri, Map<String, String> options) Read the user-defined metadata segments written into the Vortex file aturi, as opaque bytes keyed by the names theVortexWriterbuilder was given. Returns an empty map for a file that carries no metadata.This opens the file on its own. Metadata lives in dedicated segments that opening a file does not read by default, so a segment that falls outside the file-tail read costs an extra round trip.
-
readMetadata
Read the user-defined metadata segments of a Vortex file through a caller-providedNativeReadable, instead of a native storage client. SeereadMetadata(Session, String, Map).The readable must stay open for the duration of the call; native code never closes it.
NativeReadable.name()keys the file in the session's footer cache, exactly as it does when the readable is scanned, so reading metadata and then scanning the same file share one footer read. -
readStatistics
public static List<VortexColumnStatistics> readStatistics(Session session, String uri, Map<String, String> options) Read the per-column statistics stored in the footer of the Vortex file aturi, in Arrow schema order. Statistics the file does not store are empty in the returned values.This opens the file on its own, but reads only the footer and no column data.
-
readStatistics
Read the per-column statistics of a Vortex file through a caller-providedNativeReadable, instead of a native storage client. SeereadStatistics(Session, String, Map).The readable must stay open for the duration of the call; native code never closes it.
NativeReadable.name()keys the file in the session's footer cache, exactly as it does when the readable is scanned, so reading statistics and then scanning the same file share one footer read. -
splits
The natural row splits of the Vortex file behindreadable, as their boundaries: splitiholds rows[boundaries[i], boundaries[i + 1]). The splits use the default split policy, following the file's chunk boundaries and subdividing large chunks.The readable must stay open for the duration of the call; native code never closes it.
NativeReadable.name()keys the file in the session's footer cache, exactly as it does when the readable is scanned. -
splits
splits(Session, NativeReadable)for a scan of the top-levelcolumns: the splits follow the chunks of those columns only. This is much cheaper than the splits of every column for a scan of a few columns of a wide file. Columns that the file does not hold are ignored, and when it holds none of them, the splits follow every column.
-