public CheckpointProperties(TransactionProperties txnProperties, String nodeId) { // Currently we use the log files directory for checkpoints checkpointDirPath = txnProperties.getLogDirectory(nodeId); lsnThreshold = txnProperties.getCheckpointLSNThreshold(); pollFrequency = txnProperties.getCheckpointPollFrequency(); historyToKeep = txnProperties.getCheckpointHistory(); datasetCheckpointInterval = txnProperties.getDatasetCheckpointInterval(); }
public int getMemoryComponentNumPages() { final long metadataReservedMem = getMetadataReservedMemory(); final long globalUserDatasetMem = getMemoryComponentGlobalBudget() - metadataReservedMem; final long userDatasetMem = globalUserDatasetMem / (getMaxActiveWritableDatasets() + geSystemReservedDatasets()); return (int) (userDatasetMem / getMemoryComponentPageSize()); }
public LogManagerProperties(TransactionProperties txnProperties, String nodeId) { this.logPageSize = txnProperties.getLogBufferPageSize(); this.numLogPages = txnProperties.getLogBufferNumPages(); long logPartitionSize = txnProperties.getLogPartitionSize(); this.logDir = txnProperties.getLogDirectory(nodeId); this.logFilePrefix = DEFAULT_LOG_FILE_PREFIX; int logBufferSize = logPageSize * numLogPages; //make sure that the log partition size is the multiple of log buffer size. this.logPartitionSize = (logPartitionSize / logBufferSize) * logBufferSize; }
public static int getTextSearchNumFrames(CompilerProperties compilerProperties, Map<String, Object> querySpecificConfig, SourceLocation sourceLoc) throws AlgebricksException { return getFrameLimit(CompilerProperties.COMPILER_TEXTSEARCHMEMORY_KEY, (String) querySpecificConfig.get(CompilerProperties.COMPILER_TEXTSEARCHMEMORY_KEY), compilerProperties.getTextSearchMemorySize(), compilerProperties.getFrameSize(), MIN_FRAME_LIMIT_FOR_TEXT_SEARCH, sourceLoc); }
public static int getSortNumFrames(CompilerProperties compilerProperties, Map<String, Object> querySpecificConfig, SourceLocation sourceLoc) throws AlgebricksException { return getFrameLimit(CompilerProperties.COMPILER_SORTMEMORY_KEY, (String) querySpecificConfig.get(CompilerProperties.COMPILER_SORTMEMORY_KEY), compilerProperties.getSortMemorySize(), compilerProperties.getFrameSize(), MIN_FRAME_LIMIT_FOR_SORT, sourceLoc); }
@Override public ReplicationProperties newReplicationProperties() { return new ReplicationProperties(propertiesAccessor); }
@Override public NodeProperties newNodeProperties() { return new NodeProperties(propertiesAccessor); } }
@Override public MessagingProperties newMessagingProperties() { return new MessagingProperties(propertiesAccessor); }
@Override public TransactionProperties newTransactionProperties() { return new TransactionProperties(propertiesAccessor); }
@Override public MetadataProperties newMetadataProperties() { return new MetadataProperties(propertiesAccessor); }
@Override public BuildProperties newBuildProperties() { return new BuildProperties(propertiesAccessor); }
public int getSortSamples() { int numSamples = accessor.getInt(Option.COMPILER_SORT_SAMPLES); return numSamples > 0 ? numSamples : AlgebricksConfig.SORT_SAMPLES; } }
protected int calculateMaxWidth(IOption option, Column column) { final String string = extractValue(column, option); return calculateMaxWidth(column, string); }
public DatasetMemoryManager(StorageProperties storageProperties) { this.storageProperties = storageProperties; available = storageProperties.getMemoryComponentGlobalBudget(); }
public int getReplicationFactor() { return accessor.getInt(Option.REPLICATION_FACTOR); } }
public int getFrameCount() { return accessor.getInt(Option.MESSAGING_FRAME_COUNT); } }
public int getStringOffset() { int value = accessor.getInt(Option.COMPILER_STRINGOFFSET); return value > 0 ? 1 : 0; }
public int getMaxWebRequestSize() { return accessor.getInt(Option.MAX_WEB_REQUEST_SIZE); } }
public int getDatasetCheckpointInterval() { return accessor.getInt(Option.TXN_DATASET_CHECKPOINT_INTERVAL); } }
public int getActiveSuspendTimeout() { return accessor.getInt(Option.ACTIVE_SUSPEND_TIMEOUT); } }