@Override
  protected void login(UserProvider user, String host) throws IOException {
    try {
      user.login(SecurityConstants.REGIONSERVER_KRB_KEYTAB_FILE,
        SecurityConstants.REGIONSERVER_KRB_PRINCIPAL, host);
    } catch (IOException ie) {
      user.login(SecurityConstants.MASTER_KRB_KEYTAB_FILE, SecurityConstants.MASTER_KRB_PRINCIPAL,
        host);
    }
  }
For compatibility, if failed with regionserver credentials, try the master one
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java