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:
Sean Busbey 2017-04-28 08:21:00 -05:00
parent 73d80bb416
commit ba12cdf138
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}