Murtadha Hubail has submitted this change and it was merged. ( https://asterix-gerrit.ics.uci.edu/3376 )
Change subject: [NO ISSUE][OTR] GlobalConfig Cleanup ...................................................................... [NO ISSUE][OTR] GlobalConfig Cleanup - user model changes: no - storage format changes: no - interface changes: no Details: - Remove usage of DEBUG flag in GlobalConfig. - Remove unused methods/constants in GlobalConfig. - Move storage constants from GlobalConfig to StorageConstants. Change-Id: Ie59a646d7d2eedaf1360c97c355f827d80917adf Reviewed-on: https://asterix-gerrit.ics.uci.edu/3376 Contrib: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: Ali Alsuliman <ali.al.solai...@gmail.com> --- M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/GlobalConfig.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryBTreeOperationsHelper.java M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryInvertedIndexOperationsHelper.java M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryRTreeOperationsHelper.java M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableAvgAggregateFunction.java M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSingleVariableStatisticsAggregateFunction.java M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSumAggregateFunction.java M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSingleVarStatisticsAggregateFunction.java M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java 14 files changed, 43 insertions(+), 98 deletions(-) Approvals: Jenkins: Verified; ; Verified Anon. E. Moose (1000171): Ali Alsuliman: Looks good to me, approved Objections: Jenkins: Violations found diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java index 42b573f..0c19303 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java @@ -72,6 +72,7 @@ import org.apache.asterix.common.functions.FunctionSignature; import org.apache.asterix.common.utils.JobUtils; import org.apache.asterix.common.utils.JobUtils.ProgressState; +import org.apache.asterix.common.utils.StorageConstants; import org.apache.asterix.compiler.provider.ILangCompilationProvider; import org.apache.asterix.external.indexing.ExternalFile; import org.apache.asterix.external.indexing.IndexingConstants; @@ -587,8 +588,8 @@ sourceLoc); if (compactionPolicy == null) { - compactionPolicy = GlobalConfig.DEFAULT_COMPACTION_POLICY_NAME; - compactionPolicyProperties = GlobalConfig.DEFAULT_COMPACTION_POLICY_PROPERTIES; + compactionPolicy = StorageConstants.DEFAULT_COMPACTION_POLICY_NAME; + compactionPolicyProperties = StorageConstants.DEFAULT_COMPACTION_POLICY_PROPERTIES; } else { validateCompactionPolicy(compactionPolicy, compactionPolicyProperties, mdTxnCtx, false, sourceLoc); } @@ -627,8 +628,8 @@ // If the dataset has a filter and the user didn't specify a merge // policy, then we will pick the // correlated-prefix as the default merge policy. - compactionPolicy = GlobalConfig.DEFAULT_FILTERED_DATASET_COMPACTION_POLICY_NAME; - compactionPolicyProperties = GlobalConfig.DEFAULT_COMPACTION_POLICY_PROPERTIES; + compactionPolicy = StorageConstants.DEFAULT_FILTERED_DATASET_COMPACTION_POLICY_NAME; + compactionPolicyProperties = StorageConstants.DEFAULT_COMPACTION_POLICY_PROPERTIES; } datasetDetails = new InternalDatasetDetails(InternalDatasetDetails.FileStructure.BTREE, InternalDatasetDetails.PartitioningStrategy.HASH, partitioningExprs, partitioningExprs, diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/GlobalConfig.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/GlobalConfig.java index 67d974b..dc8a266 100644 --- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/GlobalConfig.java +++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/GlobalConfig.java @@ -18,57 +18,14 @@ */ package org.apache.asterix.common.config; -import java.util.LinkedHashMap; -import java.util.Map; - import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class GlobalConfig { - public static final boolean DEBUG = true; public static final String ASTERIX_LOGGER_NAME = "org.apache.asterix"; - public static final Logger ASTERIX_LOGGER = LogManager.getLogger(ASTERIX_LOGGER_NAME); - - public static final String DEFAULT_CONFIG_FILE_NAME = "asterix-configuration.xml"; - public static final String CONFIG_FILE_PROPERTY = "AsterixConfigFileName"; - public static final int DEFAULT_FRAME_SIZE = 32768; - - public static final String FRAME_SIZE_PROPERTY = "FrameSize"; - - public static final float DEFAULT_TREE_FILL_FACTOR = 1.00f; - - public static int DEFAULT_INPUT_DATA_COLUMN = 0; - - public static final String DEFAULT_COMPACTION_POLICY_NAME = "prefix"; - - public static final String DEFAULT_FILTERED_DATASET_COMPACTION_POLICY_NAME = "correlated-prefix"; - - public static final Map<String, String> DEFAULT_COMPACTION_POLICY_PROPERTIES; - static { - DEFAULT_COMPACTION_POLICY_PROPERTIES = new LinkedHashMap<String, String>(); - DEFAULT_COMPACTION_POLICY_PROPERTIES.put("max-mergable-component-size", "1073741824"); // 1GB - DEFAULT_COMPACTION_POLICY_PROPERTIES.put("max-tolerance-component-count", "5"); // 5 components - } - - public static int getFrameSize() { - int frameSize = GlobalConfig.DEFAULT_FRAME_SIZE; - String frameSizeStr = System.getProperty(GlobalConfig.FRAME_SIZE_PROPERTY); - if (frameSizeStr != null) { - int fz = -1; - try { - fz = Integer.parseInt(frameSizeStr); - } catch (NumberFormatException nfe) { - GlobalConfig.ASTERIX_LOGGER.warn("Wrong frame size size argument. Picking default value (" - + GlobalConfig.DEFAULT_FRAME_SIZE + ") instead.\n"); - } - if (fz >= 0) { - frameSize = fz; - } - } - return frameSize; - } -} + public static final int DEFAULT_INPUT_DATA_COLUMN = 0; +} \ No newline at end of file diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java index 644f3c0..d2443e1 100644 --- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java +++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java @@ -18,6 +18,9 @@ */ package org.apache.asterix.common.utils; +import java.util.LinkedHashMap; +import java.util.Map; + import org.apache.hyracks.storage.am.common.api.ITreeIndexFrame; import org.apache.hyracks.storage.am.lsm.common.impls.AbstractLSMIndexFileManager; @@ -37,6 +40,10 @@ public static final String METADATA_FILE_NAME = ".metadata"; public static final String MASK_FILE_PREFIX = ".mask_"; public static final String COMPONENT_MASK_FILE_PREFIX = MASK_FILE_PREFIX + "C_"; + public static final float DEFAULT_TREE_FILL_FACTOR = 1.00f; + public static final String DEFAULT_COMPACTION_POLICY_NAME = "prefix"; + public static final String DEFAULT_FILTERED_DATASET_COMPACTION_POLICY_NAME = "correlated-prefix"; + public static final Map<String, String> DEFAULT_COMPACTION_POLICY_PROPERTIES; /** * The storage version of AsterixDB related artifacts (e.g. log files, checkpoint files, etc..). @@ -48,6 +55,12 @@ */ public static final int VERSION = LOCAL_STORAGE_VERSION + ITreeIndexFrame.Constants.VERSION; + static { + DEFAULT_COMPACTION_POLICY_PROPERTIES = new LinkedHashMap<>(); + DEFAULT_COMPACTION_POLICY_PROPERTIES.put("max-mergable-component-size", "1073741824"); // 1GB + DEFAULT_COMPACTION_POLICY_PROPERTIES.put("max-tolerance-component-count", "5"); // 5 components + } + private StorageConstants() { } } \ No newline at end of file diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java index 2380ab6..1ce9002 100644 --- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java +++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java @@ -27,7 +27,6 @@ import org.apache.asterix.common.api.ILSMComponentIdGeneratorFactory; import org.apache.asterix.common.api.INcApplicationContext; import org.apache.asterix.common.config.DatasetConfig.DatasetType; -import org.apache.asterix.common.config.GlobalConfig; import org.apache.asterix.common.config.MetadataProperties; import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider; import org.apache.asterix.common.context.CorrelatedPrefixMergePolicyFactory; @@ -37,6 +36,7 @@ import org.apache.asterix.common.exceptions.ACIDException; import org.apache.asterix.common.exceptions.MetadataException; import org.apache.asterix.common.ioopcallbacks.LSMIndexIOOperationCallbackFactory; +import org.apache.asterix.common.utils.StorageConstants; import org.apache.asterix.common.utils.StoragePathUtil; import org.apache.asterix.external.adapter.factory.GenericAdapterFactory; import org.apache.asterix.external.api.IAdapterFactory; @@ -207,8 +207,8 @@ MetadataManager.INSTANCE.addDataset(mdTxnCtx, new Dataset(indexes[i].getDataverseName(), indexes[i].getIndexedDatasetName(), indexes[i].getDataverseName(), indexes[i].getPayloadRecordType().getTypeName(), - indexes[i].getNodeGroupName(), GlobalConfig.DEFAULT_COMPACTION_POLICY_NAME, - GlobalConfig.DEFAULT_COMPACTION_POLICY_PROPERTIES, id, new HashMap<String, String>(), + indexes[i].getNodeGroupName(), StorageConstants.DEFAULT_COMPACTION_POLICY_NAME, + StorageConstants.DEFAULT_COMPACTION_POLICY_PROPERTIES, id, new HashMap<String, String>(), DatasetType.INTERNAL, indexes[i].getDatasetId().getId(), MetadataUtil.PENDING_NO_OP)); } if (LOGGER.isInfoEnabled()) { @@ -338,8 +338,8 @@ opTrackerFactory, ioOpCallbackFactory, storageComponentProvider.getMetadataPageManagerFactory(), new AsterixVirtualBufferCacheProvider(datasetId), storageComponentProvider.getIoOperationSchedulerProvider(), - appContext.getMetadataMergePolicyFactory(), GlobalConfig.DEFAULT_COMPACTION_POLICY_PROPERTIES, true, - bloomFilterKeyFields, bloomFilterFalsePositiveRate, true, null, + appContext.getMetadataMergePolicyFactory(), StorageConstants.DEFAULT_COMPACTION_POLICY_PROPERTIES, + true, bloomFilterKeyFields, bloomFilterFalsePositiveRate, true, null, NoOpCompressorDecompressorFactory.INSTANCE); DatasetLocalResourceFactory dsLocalResourceFactory = new DatasetLocalResourceFactory(datasetId, lsmBtreeFactory); diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java index 72c031f..418ef4b 100644 --- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java +++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java @@ -34,7 +34,6 @@ import org.apache.asterix.common.config.DatasetConfig.DatasetType; import org.apache.asterix.common.config.DatasetConfig.ExternalFilePendingOp; import org.apache.asterix.common.config.DatasetConfig.IndexType; -import org.apache.asterix.common.config.GlobalConfig; import org.apache.asterix.common.config.StorageProperties; import org.apache.asterix.common.context.IStorageComponentProvider; import org.apache.asterix.common.dataflow.ICcApplicationContext; @@ -44,6 +43,7 @@ import org.apache.asterix.common.storage.ICompressionManager; import org.apache.asterix.common.transactions.ITxnIdFactory; import org.apache.asterix.common.transactions.TxnId; +import org.apache.asterix.common.utils.StorageConstants; import org.apache.asterix.common.utils.StoragePathUtil; import org.apache.asterix.dataflow.data.nontagged.MissingWriterFactory; import org.apache.asterix.dataflow.data.nontagged.serde.SerializerDeserializerUtil; @@ -650,7 +650,7 @@ IIndexDataflowHelperFactory indexHelperFactory = new IndexDataflowHelperFactory(storageComponentProvider.getStorageManager(), splitsAndConstraint.first); LSMIndexBulkLoadOperatorDescriptor btreeBulkLoad = new LSMIndexBulkLoadOperatorDescriptor(spec, null, - fieldPermutation, GlobalConfig.DEFAULT_TREE_FILL_FACTOR, false, numElementsHint, true, + fieldPermutation, StorageConstants.DEFAULT_TREE_FILL_FACTOR, false, numElementsHint, true, indexHelperFactory, null, BulkLoadUsage.LOAD, dataset.getDatasetId(), null); return new Pair<>(btreeBulkLoad, splitsAndConstraint.second); } @@ -1044,8 +1044,8 @@ if (bulkload) { long numElementsHint = getCardinalityPerPartitionHint(dataset); op = new LSMIndexBulkLoadOperatorDescriptor(spec, inputRecordDesc, fieldPermutation, - GlobalConfig.DEFAULT_TREE_FILL_FACTOR, true, numElementsHint, true, idfh, null, BulkLoadUsage.LOAD, - dataset.getDatasetId(), null); + StorageConstants.DEFAULT_TREE_FILL_FACTOR, true, numElementsHint, true, idfh, null, + BulkLoadUsage.LOAD, dataset.getDatasetId(), null); } else { if (indexOp == IndexOperation.INSERT) { ISearchOperationCallbackFactory searchCallbackFactory = dataset @@ -1188,7 +1188,7 @@ if (bulkload) { long numElementsHint = getCardinalityPerPartitionHint(dataset); op = new LSMIndexBulkLoadOperatorDescriptor(spec, inputRecordDesc, fieldPermutation, - GlobalConfig.DEFAULT_TREE_FILL_FACTOR, false, numElementsHint, false, idfh, null, + StorageConstants.DEFAULT_TREE_FILL_FACTOR, false, numElementsHint, false, idfh, null, BulkLoadUsage.LOAD, dataset.getDatasetId(), filterFactory); } else if (indexOp == IndexOperation.UPSERT) { int upsertIndicatorFieldIndex = propagatedSchema.findVariable(upsertIndicatorVar); @@ -1288,8 +1288,8 @@ if (bulkload) { long numElementsHint = getCardinalityPerPartitionHint(dataset); op = new LSMIndexBulkLoadOperatorDescriptor(spec, recordDesc, fieldPermutation, - GlobalConfig.DEFAULT_TREE_FILL_FACTOR, false, numElementsHint, false, indexDataflowHelperFactory, - null, BulkLoadUsage.LOAD, dataset.getDatasetId(), filterFactory); + StorageConstants.DEFAULT_TREE_FILL_FACTOR, false, numElementsHint, false, + indexDataflowHelperFactory, null, BulkLoadUsage.LOAD, dataset.getDatasetId(), filterFactory); } else if (indexOp == IndexOperation.UPSERT) { int upsertIndicatorFieldIndex = propagatedSchema.findVariable(upsertIndicatorVar); op = new LSMSecondaryUpsertOperatorDescriptor(spec, recordDesc, fieldPermutation, @@ -1399,7 +1399,7 @@ if (bulkload) { long numElementsHint = getCardinalityPerPartitionHint(dataset); op = new LSMIndexBulkLoadOperatorDescriptor(spec, recordDesc, fieldPermutation, - GlobalConfig.DEFAULT_TREE_FILL_FACTOR, false, numElementsHint, false, indexDataFlowFactory, + StorageConstants.DEFAULT_TREE_FILL_FACTOR, false, numElementsHint, false, indexDataFlowFactory, null, BulkLoadUsage.LOAD, dataset.getDatasetId(), filterFactory); } else if (indexOp == IndexOperation.UPSERT) { int upsertIndicatorFieldIndex = propagatedSchema.findVariable(upsertIndicatorVar); diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryBTreeOperationsHelper.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryBTreeOperationsHelper.java index 36918d2..f47786d 100644 --- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryBTreeOperationsHelper.java +++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryBTreeOperationsHelper.java @@ -21,7 +21,7 @@ import java.util.List; import org.apache.asterix.common.config.DatasetConfig.DatasetType; -import org.apache.asterix.common.config.GlobalConfig; +import org.apache.asterix.common.utils.StorageConstants; import org.apache.asterix.external.indexing.IndexingConstants; import org.apache.asterix.external.operators.ExternalScanOperatorDescriptor; import org.apache.asterix.metadata.declared.MetadataProvider; @@ -101,11 +101,11 @@ if (externalFiles != null) { // Transaction load secondaryBulkLoadOp = createExternalIndexBulkModifyOp(spec, fieldPermutation, dataflowHelperFactory, - GlobalConfig.DEFAULT_TREE_FILL_FACTOR); + StorageConstants.DEFAULT_TREE_FILL_FACTOR); } else { // Initial load secondaryBulkLoadOp = createExternalIndexBulkLoadOp(spec, fieldPermutation, dataflowHelperFactory, - GlobalConfig.DEFAULT_TREE_FILL_FACTOR); + StorageConstants.DEFAULT_TREE_FILL_FACTOR); } SinkRuntimeFactory sinkRuntimeFactory = new SinkRuntimeFactory(); sinkRuntimeFactory.setSourceLocation(sourceLoc); @@ -166,7 +166,7 @@ // assign op OR select op OR sort op ----> bulk load op targetOp = createTreeIndexBulkLoadOp(spec, fieldPermutation, dataflowHelperFactory, - GlobalConfig.DEFAULT_TREE_FILL_FACTOR); + StorageConstants.DEFAULT_TREE_FILL_FACTOR); spec.connect(new OneToOneConnectorDescriptor(spec), sourceOp, 0, targetOp, 0); // bulk load op ----> sink op diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryInvertedIndexOperationsHelper.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryInvertedIndexOperationsHelper.java index bd1f191..30ebb3e 100644 --- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryInvertedIndexOperationsHelper.java +++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryInvertedIndexOperationsHelper.java @@ -19,9 +19,9 @@ package org.apache.asterix.metadata.utils; import org.apache.asterix.common.config.DatasetConfig.IndexType; -import org.apache.asterix.common.config.GlobalConfig; import org.apache.asterix.common.exceptions.CompilationException; import org.apache.asterix.common.exceptions.ErrorCode; +import org.apache.asterix.common.utils.StorageConstants; import org.apache.asterix.dataflow.data.nontagged.MissingWriterFactory; import org.apache.asterix.metadata.declared.MetadataProvider; import org.apache.asterix.metadata.entities.Dataset; @@ -303,6 +303,6 @@ IIndexDataflowHelperFactory dataflowHelperFactory = new IndexDataflowHelperFactory( metadataProvider.getStorageComponentProvider().getStorageManager(), secondaryFileSplitProvider); return createTreeIndexBulkLoadOp(spec, fieldPermutation, dataflowHelperFactory, - GlobalConfig.DEFAULT_TREE_FILL_FACTOR); + StorageConstants.DEFAULT_TREE_FILL_FACTOR); } } diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryRTreeOperationsHelper.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryRTreeOperationsHelper.java index 1238389..fef5097 100644 --- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryRTreeOperationsHelper.java +++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryRTreeOperationsHelper.java @@ -21,8 +21,8 @@ import java.util.List; import org.apache.asterix.common.config.DatasetConfig.DatasetType; -import org.apache.asterix.common.config.GlobalConfig; import org.apache.asterix.common.exceptions.AsterixException; +import org.apache.asterix.common.utils.StorageConstants; import org.apache.asterix.external.indexing.IndexingConstants; import org.apache.asterix.external.operators.ExternalScanOperatorDescriptor; import org.apache.asterix.formats.nontagged.BinaryComparatorFactoryProvider; @@ -227,7 +227,7 @@ isPointMBR ? secondaryRecDescForPointMBR : secondaryRecDesc); // Create secondary RTree bulk load op. TreeIndexBulkLoadOperatorDescriptor secondaryBulkLoadOp = createTreeIndexBulkLoadOp(spec, fieldPermutation, - indexDataflowHelperFactory, GlobalConfig.DEFAULT_TREE_FILL_FACTOR); + indexDataflowHelperFactory, StorageConstants.DEFAULT_TREE_FILL_FACTOR); SinkRuntimeFactory sinkRuntimeFactory = new SinkRuntimeFactory(); sinkRuntimeFactory.setSourceLocation(sourceLoc); AlgebricksMetaOperatorDescriptor metaOp = new AlgebricksMetaOperatorDescriptor(spec, 1, 0, @@ -282,11 +282,11 @@ if (externalFiles != null) { // Transaction load secondaryBulkLoadOp = createExternalIndexBulkModifyOp(spec, fieldPermutation, - indexDataflowHelperFactory, GlobalConfig.DEFAULT_TREE_FILL_FACTOR); + indexDataflowHelperFactory, StorageConstants.DEFAULT_TREE_FILL_FACTOR); } else { // Initial load secondaryBulkLoadOp = createExternalIndexBulkLoadOp(spec, fieldPermutation, indexDataflowHelperFactory, - GlobalConfig.DEFAULT_TREE_FILL_FACTOR); + StorageConstants.DEFAULT_TREE_FILL_FACTOR); } SinkRuntimeFactory sinkRuntimeFactory = new SinkRuntimeFactory(); sinkRuntimeFactory.setSourceLocation(sourceLoc); diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableAvgAggregateFunction.java index 1270cdc..f4be64de 100644 --- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableAvgAggregateFunction.java +++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableAvgAggregateFunction.java @@ -22,7 +22,6 @@ import java.io.DataOutputStream; import java.io.IOException; -import org.apache.asterix.common.config.GlobalConfig; import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AFloatSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer; @@ -200,9 +199,6 @@ try { if (aggType == ATypeTag.SYSTEM_NULL) { - if (GlobalConfig.DEBUG) { - GlobalConfig.ASTERIX_LOGGER.trace("AVG aggregate ran over empty input."); - } result.writeByte(ATypeTag.SERIALIZED_SYSTEM_NULL_TYPE_TAG); } else if (aggType == ATypeTag.NULL) { result.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG); diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSingleVariableStatisticsAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSingleVariableStatisticsAggregateFunction.java index 784b520..dc7ddac 100644 --- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSingleVariableStatisticsAggregateFunction.java +++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSingleVariableStatisticsAggregateFunction.java @@ -22,7 +22,6 @@ import java.io.DataOutputStream; import java.io.IOException; -import org.apache.asterix.common.config.GlobalConfig; import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AFloatSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer; @@ -241,9 +240,6 @@ try { if (aggType == ATypeTag.SYSTEM_NULL) { - if (GlobalConfig.DEBUG) { - GlobalConfig.ASTERIX_LOGGER.trace("Single Var statistics aggregate ran over empty input."); - } result.writeByte(ATypeTag.SERIALIZED_SYSTEM_NULL_TYPE_TAG); } else if (aggType == ATypeTag.NULL) { result.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG); diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSumAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSumAggregateFunction.java index 3baafcb..23fed62 100644 --- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSumAggregateFunction.java +++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/serializable/std/AbstractSerializableSumAggregateFunction.java @@ -21,7 +21,6 @@ import java.io.DataOutput; import java.io.IOException; -import org.apache.asterix.common.config.GlobalConfig; import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AFloatSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer; @@ -239,10 +238,6 @@ try { // aggType is SYSTEM_NULL (ran over zero values) if (aggType == ATypeTag.SYSTEM_NULL) { - if (GlobalConfig.DEBUG) { - GlobalConfig.ASTERIX_LOGGER.trace("SUM aggregate ran over zero values."); - } - finishSystemNull(out); } // aggType is NULL diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java index 164fa6f..6e7f021 100644 --- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java +++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractAvgAggregateFunction.java @@ -22,7 +22,6 @@ import java.io.DataOutputStream; import java.io.IOException; -import org.apache.asterix.common.config.GlobalConfig; import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AFloatSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer; @@ -186,9 +185,6 @@ try { // Double check that count 0 is accounted if (aggType == ATypeTag.SYSTEM_NULL) { - if (GlobalConfig.DEBUG) { - GlobalConfig.ASTERIX_LOGGER.trace("AVG aggregate ran over empty input."); - } resultStorage.getDataOutput().writeByte(ATypeTag.SERIALIZED_SYSTEM_NULL_TYPE_TAG); result.set(resultStorage); } else if (aggType == ATypeTag.NULL) { diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSingleVarStatisticsAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSingleVarStatisticsAggregateFunction.java index 8429e31..d17db3d 100644 --- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSingleVarStatisticsAggregateFunction.java +++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSingleVarStatisticsAggregateFunction.java @@ -22,7 +22,6 @@ import java.io.DataOutputStream; import java.io.IOException; -import org.apache.asterix.common.config.GlobalConfig; import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AFloatSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer; @@ -206,9 +205,6 @@ try { // Double check that count 0 is accounted if (aggType == ATypeTag.SYSTEM_NULL) { - if (GlobalConfig.DEBUG) { - GlobalConfig.ASTERIX_LOGGER.trace("Single var statistics aggregate ran over empty input."); - } resultStorage.getDataOutput().writeByte(ATypeTag.SERIALIZED_SYSTEM_NULL_TYPE_TAG); result.set(resultStorage); } else if (aggType == ATypeTag.NULL) { diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java index eb6786e..39147f9 100644 --- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java +++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/AbstractSumAggregateFunction.java @@ -20,7 +20,6 @@ import java.io.IOException; -import org.apache.asterix.common.config.GlobalConfig; import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AFloatSerializerDeserializer; import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer; @@ -225,10 +224,6 @@ try { // aggType is SYSTEM_NULL if (aggType == ATypeTag.SYSTEM_NULL) { - if (GlobalConfig.DEBUG) { - GlobalConfig.ASTERIX_LOGGER.trace("SUM aggregate ran over zero values."); - } - finishSystemNull(result); } // aggType is NULL -- To view, visit https://asterix-gerrit.ics.uci.edu/3376 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie59a646d7d2eedaf1360c97c355f827d80917adf Gerrit-Change-Number: 3376 Gerrit-PatchSet: 2 Gerrit-Owner: Murtadha Hubail <mhub...@apache.org> Gerrit-Reviewer: Ali Alsuliman <ali.al.solai...@gmail.com> Gerrit-Reviewer: Anon. E. Moose (1000171) Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Michael Blow <mb...@apache.org> Gerrit-Reviewer: Murtadha Hubail <mhub...@apache.org> Gerrit-Reviewer: Till Westmann <ti...@apache.org>