def __handle_socket_error(self, exception):
log.debug("Request failed with %s" % exception)
if exception.errno in (errno.ECONNREFUSED, errno.EHOSTUNREACH):
# if NN is down or machine is not available, pass it:
self.namenode.next() # Failover and retry until self.max_failovers was reached
elif isinstance(exception, socket.timeout):
self.namenode.next() # Failover and retry until self.max_failovers was reached
else:
raise
评论列表
文章目录