HBASE-17975 TokenUtil should throw remote exception rather than squash it.
Signed-off-by: Josh Elser <elserj@apache.org> Signed-off-by: Ted Yu <tedyu@apache.org> Signed-off-by: Umesh Agashe <uagashe@cloudera.com>
This commit is contained in:
parent
73d80bb416
commit
ba12cdf138
|
@ -56,6 +56,7 @@ public class TokenUtil {
|
|||
/**
|
||||
* Obtain and return an authentication token for the current user.
|
||||
* @param conn The HBase cluster connection
|
||||
* @throws IOException if a remote error or serialization problem occurs.
|
||||
* @return the authentication token instance
|
||||
*/
|
||||
public static Token<AuthenticationTokenIdentifier> obtainToken(
|
||||
|
@ -71,14 +72,12 @@ public class TokenUtil {
|
|||
|
||||
return toToken(response.getToken());
|
||||
} catch (ServiceException se) {
|
||||
ProtobufUtil.handleRemoteException(se);
|
||||
throw ProtobufUtil.handleRemoteException(se);
|
||||
} finally {
|
||||
if (meta != null) {
|
||||
meta.close();
|
||||
}
|
||||
}
|
||||
// dummy return for ServiceException block
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue