This commit is contained in:
Yatsishin Ilya 2021-02-19 18:08:38 +03:00
parent d45cab4228
commit ecf928737b
2 changed files with 6 additions and 3 deletions

View File

@ -867,7 +867,7 @@ class ClickHouseCluster:
os.makedirs(self.hdfs_kerberized_logs_dir)
run_and_check(self.base_kerberized_hdfs_cmd + common_opts)
hdfs_api = self.make_hdfs_api(kerberized=True)
self.wait_hdfs_to_start(hdfs_api, timeout=30)
self.wait_hdfs_to_start(hdfs_api, timeout=300)
if self.with_mongo and self.base_mongo_cmd:
logging.debug('Setup Mongo')

View File

@ -116,7 +116,8 @@ class HDFSApi(object):
return response_data.content
def write_data(self, path, content):
logging.debug("write_data protocol:{} host:{} port:{} path: {} user:{}".format(self.protocol, self.host, self.proxy_port, path, self.user))
logging.debug("write_data protocol:{} host:{} port:{} path: {} user:{}, principal:{}".format(
self.protocol, self.host, self.proxy_port, path, self.user, self.principal))
named_file = NamedTemporaryFile(mode='wb+')
fpath = named_file.name
if isinstance(content, str):
@ -126,7 +127,9 @@ class HDFSApi(object):
if self.kerberized:
self._run_kinit()
self.kerberos_auth = reqkerb.HTTPKerberosAuth(mutual_authentication=reqkerb.DISABLED, hostname_override=self.host, principal=self.principal)
self.kerberos_auth = reqkerb.HTTPKerberosAuth(mutual_authentication=reqkerb.DISABLED,
hostname_override="kerberizedhdfs1",
principal=self.principal)
response = requests.put(
"{protocol}://{host}:{port}/webhdfs/v1{path}?op=CREATE".format(protocol=self.protocol, host='localhost',