public boolean enableKerberos(ReadonlyConfig config) {
        boolean kerberosPrincipalEmpty =
                config.getOptional(BaseSourceConfigOptions.KERBEROS_PRINCIPAL).isPresent();
        boolean kerberosKeytabPathEmpty =
                config.getOptional(BaseSourceConfigOptions.KERBEROS_KEYTAB_PATH).isPresent();
        if (kerberosKeytabPathEmpty && kerberosPrincipalEmpty) {
            return true;
        }
        if (!kerberosPrincipalEmpty && !kerberosKeytabPathEmpty) {
            return false;
        }
        if (kerberosPrincipalEmpty) {
            throw new IllegalArgumentException("Please set kerberosPrincipal");
        }
        throw new IllegalArgumentException("Please set kerberosKeytabPath");
    }
@Test
    void enableKerberos() {
        ReadonlyConfig config = parseConfig("/hive_without_kerberos.conf");
        assertFalse(HiveMetaStoreProxyUtils.enableKerberos(config));
        assertFalse(HiveMetaStoreProxyUtils.enableRemoteUser(config));

        config = parseConfig("/hive_with_kerberos.conf");
        assertTrue(HiveMetaStoreProxyUtils.enableKerberos(config));
        assertFalse(HiveMetaStoreProxyUtils.enableRemoteUser(config));

        config = parseConfig("/hive_with_remoteuser.conf");
        assertTrue(HiveMetaStoreProxyUtils.enableRemoteUser(config));
    }