@Test public void testCalciteExtrasProperties() { KylinConfig conf = KylinConfig.getInstanceFromEnv(); Properties extras = conf.getCalciteExtrasProperties(); assertEquals("true", extras.getProperty("caseSensitive")); assertEquals("TO_UPPER", extras.getProperty("unquotedCasing")); assertEquals("DOUBLE_QUOTE", extras.getProperty("quoting")); assertEquals("LENIENT", extras.getProperty("conformance")); conf.setProperty("kylin.query.calcite.extras-props.caseSensitive", "false"); conf.setProperty("kylin.query.calcite.extras-props.unquotedCasing", "UNCHANGED"); conf.setProperty("kylin.query.calcite.extras-props.quoting", "BRACKET"); conf.setProperty("kylin.query.calcite.extras-props.conformance", "DEFAULT"); extras = conf.getCalciteExtrasProperties(); assertEquals("false", extras.getProperty("caseSensitive")); assertEquals("UNCHANGED", extras.getProperty("unquotedCasing")); assertEquals("BRACKET", extras.getProperty("quoting")); assertEquals("DEFAULT", extras.getProperty("conformance")); }
public static KylinConfig getInstanceFromEnv() { synchronized (KylinConfig.class) { KylinConfig config = THREAD_ENV_INSTANCE.get(); if (config != null) { return config; } if (SYS_ENV_INSTANCE == null) { try { buildDefaultOrderedProperties(); config = new KylinConfig(); config.reloadKylinConfig(buildSiteProperties()); VersionUtil.loadKylinVersion(); logger.info("Initialized a new KylinConfig from getInstanceFromEnv : " + System.identityHashCode(config)); SYS_ENV_INSTANCE = config; } catch (IllegalArgumentException e) { throw new IllegalStateException("Failed to find KylinConfig ", e); } } return SYS_ENV_INSTANCE; } }
KylinConfig extends KylinConfigBase { public static KylinConfig getInstanceFromEnv() { synchronized (KylinConfig.class) { KylinConfig config = THREAD_ENV_INSTANCE.get(); if (config != null) { return config; } if (SYS_ENV_INSTANCE == null) { try { buildDefaultOrderedProperties(); config = new KylinConfig(); config.reloadKylinConfig(buildSiteProperties()); VersionUtil.loadKylinVersion(); logger.info("Initialized a new KylinConfig from getInstanceFromEnv : " + System.identityHashCode(config)); SYS_ENV_INSTANCE = config; } catch (IllegalArgumentException e) { throw new IllegalStateException("Failed to find KylinConfig ", e); } } return SYS_ENV_INSTANCE; } } }
KylinConfig extends KylinConfigBase { public static KylinConfig getInstanceFromEnv() { synchronized (KylinConfig.class) { KylinConfig config = THREAD_ENV_INSTANCE.get(); if (config != null) { return config; } if (SYS_ENV_INSTANCE == null) { try { buildDefaultOrderedProperties(); config = new KylinConfig(); config.reloadKylinConfig(buildSiteProperties()); VersionUtil.loadKylinVersion(); logger.info("Initialized a new KylinConfig from getInstanceFromEnv : " + System.identityHashCode(config)); SYS_ENV_INSTANCE = config; } catch (IllegalArgumentException e) { throw new IllegalStateException("Failed to find KylinConfig ", e); } } return SYS_ENV_INSTANCE; } } private  KylinConfig(); protected  KylinConfig(Properties props, boolean force); }
KylinConfig extends KylinConfigBase { public static KylinConfig getInstanceFromEnv() { synchronized (KylinConfig.class) { KylinConfig config = THREAD_ENV_INSTANCE.get(); if (config != null) { return config; } if (SYS_ENV_INSTANCE == null) { try { buildDefaultOrderedProperties(); config = new KylinConfig(); config.reloadKylinConfig(buildSiteProperties()); VersionUtil.loadKylinVersion(); logger.info("Initialized a new KylinConfig from getInstanceFromEnv : " + System.identityHashCode(config)); SYS_ENV_INSTANCE = config; } catch (IllegalArgumentException e) { throw new IllegalStateException("Failed to find KylinConfig ", e); } } return SYS_ENV_INSTANCE; } } private  KylinConfig(); protected  KylinConfig(Properties props, boolean force); static File getKylinHomeAtBestEffort(); static KylinConfig getInstanceFromEnv(); static void destroyInstance(); static KylinConfig createInstanceFromUri(String uri); static Properties streamToProps(InputStream is); static void setKylinConfigInEnvIfMissing(Properties prop); static void setKylinConfigInEnvIfMissing(String propsInStr); static SetAndUnsetThreadLocalConfig setAndUnsetThreadLocalConfig(KylinConfig config); static KylinConfig createKylinConfig(String propsInStr); static KylinConfig createKylinConfig(KylinConfig another); static KylinConfig createKylinConfig(Properties prop); static File getKylinConfDir(); static void setSandboxEnvIfPossible(); T getManager(Class<T> clz); void clearManagers(); Properties exportToProperties(); String exportAllToString(); String exportToString(Collection<String> propertyKeys); void exportToFile(File file); synchronized void reloadFromSiteProperties(); KylinConfig base(); static void setKylinConfigForLocalTest(String localMetaDir); @Override int hashCode(); @Override boolean equals(Object another); }
KylinConfig extends KylinConfigBase { public static KylinConfig getInstanceFromEnv() { synchronized (KylinConfig.class) { KylinConfig config = THREAD_ENV_INSTANCE.get(); if (config != null) { return config; } if (SYS_ENV_INSTANCE == null) { try { buildDefaultOrderedProperties(); config = new KylinConfig(); config.reloadKylinConfig(buildSiteProperties()); VersionUtil.loadKylinVersion(); logger.info("Initialized a new KylinConfig from getInstanceFromEnv : " + System.identityHashCode(config)); SYS_ENV_INSTANCE = config; } catch (IllegalArgumentException e) { throw new IllegalStateException("Failed to find KylinConfig ", e); } } return SYS_ENV_INSTANCE; } } private  KylinConfig(); protected  KylinConfig(Properties props, boolean force); static File getKylinHomeAtBestEffort(); static KylinConfig getInstanceFromEnv(); static void destroyInstance(); static KylinConfig createInstanceFromUri(String uri); static Properties streamToProps(InputStream is); static void setKylinConfigInEnvIfMissing(Properties prop); static void setKylinConfigInEnvIfMissing(String propsInStr); static SetAndUnsetThreadLocalConfig setAndUnsetThreadLocalConfig(KylinConfig config); static KylinConfig createKylinConfig(String propsInStr); static KylinConfig createKylinConfig(KylinConfig another); static KylinConfig createKylinConfig(Properties prop); static File getKylinConfDir(); static void setSandboxEnvIfPossible(); T getManager(Class<T> clz); void clearManagers(); Properties exportToProperties(); String exportAllToString(); String exportToString(Collection<String> propertyKeys); void exportToFile(File file); synchronized void reloadFromSiteProperties(); KylinConfig base(); static void setKylinConfigForLocalTest(String localMetaDir); @Override int hashCode(); @Override boolean equals(Object another); static final String KYLIN_CONF_PROPERTIES_FILE; static final String KYLIN_DEFAULT_CONF_PROPERTIES_FILE; static final String KYLIN_CONF; }