Skip to content

Commit 6ee4d40

Browse files
authored
fix connection type webhdfs (#36145)
* Requested changes * To make the connection visible in the list * formatting
1 parent 09b6ab9 commit 6ee4d40

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

airflow/providers/apache/hdfs/hooks/webhdfs.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ class WebHDFSHook(BaseHook):
5252
:param proxy_user: The user used to authenticate.
5353
"""
5454

55-
def __init__(self, webhdfs_conn_id: str = "webhdfs_default", proxy_user: str | None = None):
55+
conn_type = "webhdfs"
56+
conn_name_attr = "webhdfs_conn_id"
57+
default_conn_name = "webhdfs_default"
58+
hook_name = "Apache WebHDFS"
59+
60+
def __init__(self, webhdfs_conn_id: str = default_conn_name, proxy_user: str | None = None):
5661
super().__init__()
5762
self.webhdfs_conn_id = webhdfs_conn_id
5863
self.proxy_user = proxy_user

airflow/providers/apache/hdfs/provider.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,7 @@ hooks:
7070
- integration-name: WebHDFS
7171
python-modules:
7272
- airflow.providers.apache.hdfs.hooks.webhdfs
73+
74+
connection-types:
75+
- hook-class-name: airflow.providers.apache.hdfs.hooks.webhdfs.WebHDFSHook
76+
connection-type: webhdfs

0 commit comments

Comments
 (0)