gravitino.filesystem.gvfs_base_operations.FileSystemCacheKey

class gravitino.filesystem.gvfs_base_operations.FileSystemCacheKey(scheme: str, authority: str | None, credentials, catalog_props: Dict[str, str], options: Dict[str, str], extra_kwargs: Dict)

Bases: object

A cache key for filesystem instances following fsspec’s native caching behavior.

This key is based on: - Process ID (ensures cache is process-specific, like fsspec) - Thread ID (ensures thread-specific caching, like fsspec) - Filesystem scheme (e.g., ‘s3’, ‘gs’, ‘hdfs’, ‘file’) - Authority (e.g., bucket name, host:port) - Configuration token (hashable representation of credentials and config)

This matches fsspec’s _Cached metaclass caching strategy which includes both process ID and thread ID in the cache key. While this differs from Java GVFS (which shares filesystems across threads), it provides better thread isolation and matches Python’s ecosystem conventions.

__init__(scheme: str, authority: str | None, credentials, catalog_props: Dict[str, str], options: Dict[str, str], extra_kwargs: Dict)

Initialize a FileSystemCacheKey.

Args:

scheme: The filesystem scheme (e.g., ‘s3’, ‘gs’, ‘hdfs’, ‘file’) authority: The authority part of the URI (e.g., bucket name, host:port) credentials: The credentials for the filesystem catalog_props: The catalog properties options: The GVFS options extra_kwargs: Extra keyword arguments

Methods

__init__(scheme, authority, credentials, ...)

Initialize a FileSystemCacheKey.