public int getInt(String name, int defaultValue) { return mProperties.getInt(name, defaultValue); }
public static int getConfigInteger(String key, int defaultValue) { return config.getInt(key, defaultValue); }
public int getInt(String name) { checkProperty(name); return mProperties.getInt(name); }
/** * For segments on disk. * <p>Index directory passed in should be top level segment directory. * <p>If segment metadata file exists in multiple segment version, load the one in highest segment version. */ public SegmentMetadataImpl(File indexDir) throws IOException { _indexDir = indexDir; PropertiesConfiguration segmentMetadataPropertiesConfiguration = getPropertiesConfiguration(indexDir); _columnMetadataMap = new HashMap<>(); _allColumns = new HashSet<>(); _schema = new Schema(); init(segmentMetadataPropertiesConfiguration); File creationMetaFile = SegmentDirectoryPaths.findCreationMetaFile(indexDir); if (creationMetaFile != null) { loadCreationMeta(creationMetaFile); } setTimeInfo(segmentMetadataPropertiesConfiguration); _totalDocs = segmentMetadataPropertiesConfiguration.getInt(SEGMENT_TOTAL_DOCS); _totalRawDocs = segmentMetadataPropertiesConfiguration.getInt(SEGMENT_TOTAL_RAW_DOCS, _totalDocs); }
/** * return -1 if there is no setting * * @return */ public int getPropScanThreshold() { return kylinConfig.getInt(PROP_SCAN_THRESHOLD, -1); }
builder.setCardinality(config.getInt(getKeyFor(column, CARDINALITY))); int totalDocs = config.getInt(getKeyFor(column, TOTAL_DOCS)); builder.setTotalDocs(totalDocs); builder.setTotalRawDocs(config.getInt(getKeyFor(column, TOTAL_RAW_DOCS), totalDocs)); builder.setTotalAggDocs(config.getInt(getKeyFor(column, TOTAL_AGG_DOCS), 0)); DataType dataType = DataType.valueOf(config.getString(getKeyFor(column, DATA_TYPE)).toUpperCase()); builder.setDataType(dataType); builder.setBitsPerElement(config.getInt(getKeyFor(column, BITS_PER_ELEMENT))); builder.setColumnMaxLength(config.getInt(getKeyFor(column, DICTIONARY_ELEMENT_SIZE))); builder.setFieldType(FieldType.valueOf(config.getString(getKeyFor(column, COLUMN_TYPE)).toUpperCase())); builder.setIsSorted(config.getBoolean(getKeyFor(column, IS_SORTED))); builder.setHasInvertedIndex(config.getBoolean(getKeyFor(column, HAS_INVERTED_INDEX))); builder.setSingleValue(config.getBoolean(getKeyFor(column, IS_SINGLE_VALUED))); builder.setMaxNumberOfMultiValues(config.getInt(getKeyFor(column, MAX_MULTI_VALUE_ELEMTS))); builder.setTotalNumberOfEntries(config.getInt(getKeyFor(column, TOTAL_NUMBER_OF_ENTRIES))); builder.setAutoGenerated(config.getBoolean(getKeyFor(column, IS_AUTO_GENERATED), false)); builder.setDefaultNullValueString(config.getString(getKeyFor(column, DEFAULT_NULL_VALUE), null)); case HLL: try { final int hllLog2m = config.getInt(V1Constants.MetadataKeys.Segment.SEGMENT_HLL_LOG2M); builder.setFieldSize(HllSizeUtils.getHllFieldSizeFromLog2m(hllLog2m)); final String originColumnName = config.getString(getKeyFor(column, ORIGIN_COLUMN)); config.getString(getKeyFor(column, V1Constants.MetadataKeys.Column.PARTITION_FUNCTION)); if (partitionFunctionName != null) { int numPartitions = config.getInt(getKeyFor(column, V1Constants.MetadataKeys.Column.NUM_PARTITIONS)); PartitionFunction partitionFunction =
@Override public int getLoggingPort() { return conf.getInt(LOGGING_PORT, DEFAULT_LOGGING_PORT); } }
@Override public int getRestPort() { return conf.getInt(COMMUNICATION_PORT_PARAM, HttpEndpointConstants.DEFAULT_PORT); }
@Override public int getOldMaxSize() { return conf.getInt(OLD_MAX_SIZE_MB, MongoConfiguration.OLD_MAX_SIZE_MB_DEFAULT); }
public int getEdgeCacheTimeout() { return conf.getInt(Keys.EDGE_CACHE_TIMEOUT, -1); }
public int getEdgeTableTTL() { return conf.getInt(Keys.EDGE_TABLE_TTL, HConstants.FOREVER); }
import org.apache.commons.configuration.PropertiesConfiguration; PropertiesConfiguration props = new PropertiesConfiguration(); props.load(fileName); MongoClientOptions copts = MongoClientOptions.builder() .connectionsPerHost(props.getInt("connectionsPerHost", 100)) .connectTimeout(props.getInt("connectTimeout", 10000)) ... .build();
private String constructClaimDescriptor(String source) { return String.format("%s:%d:%d:%s:%d", serverHostName, configuration.getInt("THRIFT_PORT"), serverStartTimeMillis, source, claimSuffix.incrementAndGet()); } }
@SuppressWarnings("unchecked") private void resolveEngineConfiguration(InitialConfiguration initialConfiguration) { EngineConfig engineConfig = new EngineConfig(); engineConfig.setName(propertiesConfiguration.getString(ENGINE_NAME_PROPERTY, InitialConfiguration.DEFAULT_ENGINE_NAME)); engineConfig.setPort(propertiesConfiguration.getInt(ENGINE_PORT_PROPERTY, InitialConfiguration.DEFAULT_ENGINE_PORT)); engineConfig.setTimeout(propertiesConfiguration.getInt(ENGINE_TIMEOUT_PROPERTY, InitialConfiguration.DEFAULT_ENGINE_TIMEOUT)); engineConfig.setMaxBufferSize(propertiesConfiguration.getInt(ENGINE_MAX_BUFFER_SIZE_PROPERTY, InitialConfiguration.DEFAULT_MAX_BUFFER_SIZE)); engineConfig.setMaxFrameSize(propertiesConfiguration.getInt(ENGINE_MAX_MESSAGE_SIZE_PROPERTY, InitialConfiguration.DEFAULT_MAX_FRAME_SIZE)); engineConfig.setRejectedDomains(propertiesConfiguration.getList(ENGINE_REJECTED_DOMAINS_PROPERTY, new ArrayList())); initialConfiguration.setEngineConfiguration(engineConfig); }
public EsStore() { this(Configuration.getProperties().getString("es_cluster_lb"), Configuration.getProperties().getInt("es_cluster_port")); }
public EsInstanceStore() { this(Configuration.getProperties().getString("es_cluster_lb"), Configuration.getProperties().getInt("es_cluster_port")); }