private UserGroupInformation loginKerberosUser() throws SummaryInitializationException {
    // Use the principal from metastore
    String principal = MetastoreConf.getAsString(configuration, MetastoreConf.ConfVars.KERBEROS_PRINCIPAL);
    String keytabFile = MetastoreConf.getAsString(configuration, MetastoreConf.ConfVars.KERBEROS_KEYTAB_FILE);
    if (StringUtils.isEmpty(principal)) {
      throw new SummaryInitializationException("No principal specified from property: " +
          MetastoreConf.ConfVars.KERBEROS_PRINCIPAL.getHiveName());
    }
    if (StringUtils.isEmpty(keytabFile)) {
      throw new SummaryInitializationException("No keytab specified from property: " +
          MetastoreConf.ConfVars.KERBEROS_KEYTAB_FILE.getHiveName());
    }
    try {
      UserGroupInformation.setConfiguration(configuration);
      String kerberosName = SecurityUtil.getServerPrincipal(principal, "0.0.0.0");
      UserGroupInformation.loginUserFromKeytab(kerberosName, keytabFile);
      return UserGroupInformation.getLoginUser();
    } catch (Exception e) {
      LOG.error("Failed to log the user: {} with keytab: {}", principal, keytabFile);
      throw new SummaryInitializationException("Error while logging the user: " + principal, e);
    }
  }
Iceberg specific implementation of summary collector
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/metasummary/IcebergSummaryHandler.java