diff --git a/dvc/config_schema.py b/dvc/config_schema.py index 41e9d4efb..eea026448 100644 --- a/dvc/config_schema.py +++ b/dvc/config_schema.py @@ -172,7 +172,7 @@ SCHEMA = { "allow_agent": Bool, **REMOTE_COMMON, }, - "hdfs": {"user": str, **REMOTE_COMMON}, + "hdfs": {"user": str, "kerb_ticket": str, **REMOTE_COMMON}, "webhdfs": { "hdfscli_config": str, "webhdfs_token": str, diff --git a/dvc/fs/hdfs.py b/dvc/fs/hdfs.py index 1693697a0..28fec1509 100644 --- a/dvc/fs/hdfs.py +++ b/dvc/fs/hdfs.py @@ -84,8 +84,9 @@ class HDFSFileSystem(BaseFileSystem): path=parsed.path, ) - @staticmethod - def hdfs(path_info): + self.kerb_ticket = config.get("kerb_ticket") + + def hdfs(self, path_info): import pyarrow.fs # NOTE: HadoopFileSystem is not meant to be closed by us and doesn't @@ -100,6 +101,7 @@ class HDFSFileSystem(BaseFileSystem): path_info.host, path_info.port, user=path_info.user, + kerb_ticket=self.kerb_ticket, ) @contextmanager