public String getPropertiesWhiteList() { return getOptional("kylin.web.properties.whitelist", "kylin.web.timezone,kylin.query.cache-enabled,kylin.env," + "kylin.web.hive-limit,kylin.storage.default," + "kylin.engine.default,kylin.web.link-hadoop,kylin.web.link-diagnostic," + "kylin.web.contact-mail,kylin.web.help.length,kylin.web.help.0,kylin.web.help.1,kylin.web.help.2," + "kylin.web.help.3," + "kylin.web.help,kylin.web.hide-measures,kylin.web.link-streaming-guide,kylin.server.external-acl-provider," + "kylin.security.profile," + "kylin.htrace.show-gui-trace-toggle,kylin.web.export-allow-admin,kylin.web.export-allow-other," + "kylin.cube.cubeplanner.enabled,kylin.web.dashboard-enabled,kylin.tool.auto-migrate-cube.enabled"); }
public String getDefaultIGTStorage() { return getOptional("kylin.storage.hbase.gtstorage", "org.apache.kylin.storage.hbase.cube.v2.CubeHBaseEndpointRPC"); }
public String getCoadhaleMetricsReportClassesNames() { return getOptional("kylin.metrics.reporter-classes", "org.apache.kylin.common.metrics.metrics2.JsonFileMetricsReporter,org.apache.kylin.common.metrics.metrics2.JmxMetricsReporter"); }
/** * was for route to hive, not used any more */ @Deprecated public String getHiveUser() { return getOptional("kylin.source.hive.connection-user", ""); }
public int getDefaultCharPrecision() { //at most 255 according to https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-CharcharChar int v = Integer.parseInt(getOptional("kylin.source.hive.default-char-precision", "255")); if (v < 1) { return 255; } else if (v > 255) { return 255; } else { return v; } }
public int getDefaultDecimalPrecision() { int v = Integer.parseInt(getOptional("kylin.source.hive.default-decimal-precision", "19")); if (v < 1) { return 19; } else { return v; } }
public int getDefaultDecimalScale() { int v = Integer.parseInt(getOptional("kylin.source.hive.default-decimal-scale", "4")); if (v < 1) { return 4; } else { return v; } }
public int getDefaultVarcharPrecision() { int v = Integer.parseInt(getOptional("kylin.source.hive.default-varchar-precision", "256")); if (v < 1) { return 256; } else if (v > 65535) { return 65535; } else { return v; } }
/** * was for route to hive, not used any more */ @Deprecated public String getHivePassword() { return getOptional("kylin.source.hive.connection-password", ""); }
/** * was for route to hive, not used any more */ @Deprecated public String getHiveUrl() { return getOptional("kylin.source.hive.connection-url", ""); }
final protected String getRequired(String prop) { String r = getOptional(prop); if (StringUtils.isEmpty(r)) { throw new IllegalArgumentException("missing '" + prop + "' in conf/kylin.properties"); } return r; }
public long getPartitionMaxScanBytes() { long value = Long.parseLong( this.getOptional("kylin.storage.partition.max-scan-bytes", String.valueOf(3L * 1024 * 1024 * 1024))); return value > 0 ? value : Long.MAX_VALUE; }
final protected String[] getOptionalStringArray(String prop, String[] dft) { final String property = getOptional(prop); if (!StringUtils.isBlank(property)) { return property.split("\\s*,\\s*"); } else { return dft; } }
/** * Rule is usually singleton as static field, the configuration of this property is like: * RuleClassName1#FieldName1,RuleClassName2#FieldName2,... */ public List<String> getCalciteAddRule() { String rules = getOptional("kylin.query.calcite.add-rule"); if (rules == null) { return Lists.newArrayList(); } return Lists.newArrayList(rules.split(",")); }
public int getCubingInMemSamplingPercent() { int percent = Integer.parseInt(this.getOptional("kylin.job.sampling-percentage", "100")); percent = Math.max(percent, 1); percent = Math.min(percent, 100); return percent; }
/** * A comma separated list of host:port pairs, each corresponding to a ZooKeeper server */ public String getZookeeperConnectString() { String str = getOptional("kylin.env.zookeeper-connect-string"); if (str != null) return str; str = ZooKeeperUtil.getZKConnectStringFromHBase(); if (str != null) return str; throw new RuntimeException("Please set 'kylin.env.zookeeper-connect-string' in kylin.properties"); }
public DistributedLockFactory getDistributedLockFactory() { String clsName = getOptional("kylin.metadata.distributed-lock-impl", "org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock$Factory"); return (DistributedLockFactory) ClassUtil.newInstance(clsName); }
public StorageURL getStorageUrl() { String url = getOptional("kylin.storage.url", "default@hbase"); // for backward compatibility if ("hbase".equals(url)) url = "default@hbase"; return StorageURL.valueOf(url); }
public String getCoprocessorLocalJar() { final String coprocessorJar = getOptional(KYLIN_STORAGE_HBASE_COPROCESSOR_LOCAL_JAR); if (StringUtils.isNotEmpty(coprocessorJar)) { return coprocessorJar; } String kylinHome = getKylinHome(); if (StringUtils.isEmpty(kylinHome)) { throw new RuntimeException("getCoprocessorLocalJar needs KYLIN_HOME"); } return getFileName(kylinHome + File.separator + "lib", COPROCESSOR_JAR_NAME_PATTERN); }
public String getKylinJobJarPath() { final String jobJar = getOptional(KYLIN_ENGINE_MR_JOB_JAR); if (StringUtils.isNotEmpty(jobJar)) { return jobJar; } String kylinHome = getKylinHome(); if (StringUtils.isEmpty(kylinHome)) { return ""; } return getFileName(kylinHome + File.separator + "lib", JOB_JAR_NAME_PATTERN); }