Description
FileSystem accept config and as a singleton created at first call of FileHandleGenerator, FileHandleGenerator was hold by HiveConnector and initialize it in ctor.
HiveConnector accept static configs in its ctor, and also accept dynamic(session) configs at runtime after PR #7659. So the issue is what kind of configs should we pass to FileSystem? If FileSystem keep singleton, it need accept HiveConnector's static config for necessary initialization. If FileSystem be per-session instance, we may need move FileHandleGenerator into QueryCtx and use session config to initialize it.
I prefer make FileSystem be per-session instance, it helps to change derived class's behavior at runtime, e.g. accessing S3 with another IAM or apply optimized config without restart.
cc @mbasmanova @majetideepak @zhli1142015
Description
FileSystem accept config and as a singleton created at first call of FileHandleGenerator, FileHandleGenerator was hold by HiveConnector and initialize it in ctor.
HiveConnector accept static configs in its ctor, and also accept dynamic(session) configs at runtime after PR #7659. So the issue is what kind of configs should we pass to FileSystem? If FileSystem keep singleton, it need accept HiveConnector's static config for necessary initialization. If FileSystem be per-session instance, we may need move FileHandleGenerator into QueryCtx and use session config to initialize it.
I prefer make FileSystem be per-session instance, it helps to change derived class's behavior at runtime, e.g. accessing S3 with another IAM or apply optimized config without restart.
cc @mbasmanova @majetideepak @zhli1142015