File tree 3 files changed +39
-26
lines changed
3 files changed +39
-26
lines changed Original file line number Diff line number Diff line change 35
35
)
36
36
from .logger import Logger
37
37
38
- __version__ = "0.10.5 "
38
+ __version__ = "0.10.6 "
Original file line number Diff line number Diff line change @@ -58,20 +58,19 @@ def examples(self):
58
58
def create_hdfs_with_kerberos (
59
59
self ,
60
60
name ,
61
- description ,
62
- path_from_endpoint ,
63
- kdc_data_host ,
64
- kdc_data_port ,
65
- realm ,
66
- client_principal ,
67
- browse_only ,
68
- host ,
69
- service_id ,
70
- backup_host ,
71
- endpoint_type ,
72
- endpoint_port ,
73
- read_only ,
61
+ description = "" ,
62
+ path_from_endpoint = "" ,
63
+ kdc_data_host = "" ,
64
+ kdc_data_port = "" ,
65
+ realm = "" ,
66
+ client_principal = "" ,
67
+ browse_only = True ,
68
+ host = "" ,
74
69
keytab = "" ,
70
+ backup_host = "" ,
71
+ type = "" ,
72
+ port = "" ,
73
+ read_only = False ,
75
74
):
76
75
"""TODO.
77
76
@@ -108,7 +107,7 @@ def create_hdfs_with_kerberos(
108
107
read_only : [type]
109
108
[description]
110
109
"""
111
- base .get_client ().datatap .create (
110
+ base .get_client ().datatap .create_hdfs_with_kerberos (
112
111
name ,
113
112
description ,
114
113
path_from_endpoint ,
@@ -119,9 +118,8 @@ def create_hdfs_with_kerberos(
119
118
browse_only ,
120
119
host ,
121
120
keytab ,
122
- service_id ,
123
121
backup_host ,
124
- endpoint_type ,
125
- endpoint_port ,
122
+ type ,
123
+ port ,
126
124
read_only ,
127
125
)
Original file line number Diff line number Diff line change @@ -124,10 +124,9 @@ def create_hdfs_with_kerberos(
124
124
browse_only ,
125
125
host ,
126
126
keytab ,
127
- service_id ,
128
127
backup_host ,
129
- endpoint_type ,
130
- endpoint_port ,
128
+ type ,
129
+ port ,
131
130
read_only ,
132
131
):
133
132
"""TODO.
@@ -166,22 +165,38 @@ def create_hdfs_with_kerberos(
166
165
[description]
167
166
"""
168
167
_data = {
169
- "bdfs_root" : {"path_from_endpoint" : path_from_endpoint },
168
+ "bdfs_root" : {
169
+ #"path_from_endpoint": path_from_endpoint
170
+ },
170
171
"endpoint" : {
171
- "kdc_data" : [{"host" : kdc_data_host , "port" : kdc_data_port }],
172
+ "kdc_data" : [
173
+ {
174
+ "host" : kdc_data_host ,
175
+ #"port": kdc_data_port
176
+ }
177
+ ],
172
178
"realm" : realm ,
173
179
"client_principal" : client_principal ,
174
180
"browse_only" : browse_only ,
175
181
"host" : host ,
176
182
"keytab" : keytab ,
177
- "service_id" : service_id ,
183
+ "service_id" : "hdfs" ,
178
184
"backup_host" : backup_host ,
179
- "type" : endpoint_type ,
180
- "port" : endpoint_port ,
185
+ "type" : type ,
186
+ "port" : str ( port ) ,
181
187
},
182
188
"flags" : {"read_only" : read_only },
183
189
"label" : {"name" : name , "description" : description },
184
190
}
191
+
192
+ if path_from_endpoint != "" :
193
+ _data ["bdfs_root" ]["path_from_endpoint" ] = path_from_endpoint
194
+
195
+ if kdc_data_port != "" :
196
+ _data ["endpoint" ]["kdc_data" ]["kdc_data_port" ] = kdc_data_port
197
+
198
+ #if keytab != "":
199
+ # _data["endpoint"]["keytab"] = keytab
185
200
186
201
self .client ._request (
187
202
url = DatatapController .base_resource_path ,
You can’t perform that action at this time.
0 commit comments