Skip to content

Commit 3da3cce

Browse files
Yuri Nikonchukclaude
authored andcommitted
Use single constructor path for HadoopFileSystem
Remove from_uri early return and route netloc through the same kwargs constructor as all other HDFS properties. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ff4d98e commit 3da3cce

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pyiceberg/io/pyarrow.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,8 @@ def _initialize_hdfs_fs(self, scheme: str, netloc: Optional[str]) -> FileSystem:
582582
if replication := self.properties.get(HDFS_REPLICATION):
583583
hdfs_kwargs["replication"] = int(replication)
584584
if netloc:
585-
query = f"?replication={replication}" if replication else ""
586-
return HadoopFileSystem.from_uri(f"{scheme}://{netloc}{query}")
587-
if host := self.properties.get(HDFS_HOST):
585+
hdfs_kwargs["host"] = netloc
586+
elif host := self.properties.get(HDFS_HOST):
588587
hdfs_kwargs["host"] = host
589588
if port := self.properties.get(HDFS_PORT):
590589
# port should be an integer type

0 commit comments

Comments
 (0)