We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a47ee21 + f4a4fcc commit b1b4fe8Copy full SHA for b1b4fe8
dvc_webhdfs/__init__.py
@@ -42,6 +42,17 @@ def _prepare_credentials(self, **config):
42
principal = config.pop("kerberos_principal", None)
43
if principal:
44
config["kerb_kwargs"] = {"principal": principal}
45
+
46
+ # If target data_proxy provided construct the source from host/port
47
+ data_proxy_target = config.pop("data_proxy_target", None)
48
+ if data_proxy_target:
49
+ host = config["host"]
50
+ port = config["port"]
51
52
+ protocol = "https" if config.get("use_https") else "http"
53
54
+ source_url = f"{protocol}://{host}:{port}/webhdfs/v1"
55
+ config["data_proxy"] = {source_url: data_proxy_target}
56
return config
57
58
@wrap_prop(threading.Lock())
0 commit comments