use of alluxio.exception.status.UnauthenticatedException in project alluxio by Alluxio.
the class AuthenticatedChannelClientDriver method waitUntilChannelAuthenticated.
private void waitUntilChannelAuthenticated(long timeoutMs) throws AlluxioStatusException {
try {
// Wait until authentication status changes.
mChannelAuthenticatedFuture.get(timeoutMs, TimeUnit.MILLISECONDS);
mChannelAuthenticated = true;
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
throw AlluxioStatusException.fromThrowable(ie);
} catch (ExecutionException e) {
AlluxioStatusException statExc = AlluxioStatusException.fromThrowable(e.getCause());
// Unimplemented is returned if server doesn't provide authentication service.
if (statExc.getStatusCode() == Status.Code.UNIMPLEMENTED) {
throw new UnauthenticatedException("Authentication is disabled on target server.");
}
throw statExc;
} catch (TimeoutException e) {
throw new UnavailableException(e);
}
}
Aggregations