Description
Sometimes, some non-IOException prevents User.getCurrent() to get a username. It makes it impossible to create a HConnection. We should catch all exception here:
try { User currentUser = User.getCurrent(); if (currentUser != null) { username = currentUser.getName(); } } catch (IOException ioe) { LOG.warn("Error obtaining current user, skipping username in HConnectionKey", ioe); }
Not just IOException, so that client can move forward.