You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by il...@apache.org on 2015/12/05 01:50:06 UTC
[3/4] incubator-asterixdb git commit: Checkpointing: more or less
stable version
Checkpointing: more or less stable version
Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/commit/fd5d424f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/tree/fd5d424f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/diff/fd5d424f
Branch: refs/heads/statistics
Commit: fd5d424f5156be0c62ed3b5651fa330f5bb04014
Parents: d0abc98
Author: Ildar Absalyamov <il...@gmail.com>
Authored: Fri Dec 4 11:04:45 2015 -0800
Committer: Ildar Absalyamov <il...@gmail.com>
Committed: Fri Dec 4 11:04:45 2015 -0800
----------------------------------------------------------------------
.../common/AsterixHyracksIntegrationUtil.java | 4 +-
.../apache/asterix/file/DatasetOperations.java | 14 +--
.../file/ExternalIndexingOperations.java | 21 ++---
.../apache/asterix/file/IndexOperations.java | 2 +-
.../file/SecondaryBTreeOperationsHelper.java | 28 +++---
.../file/SecondaryIndexOperationsHelper.java | 6 +-
.../resources/asterix-build-configuration.xml | 16 ++--
.../common/config/AsterixStorageProperties.java | 2 +-
.../dataflow/HDFSLookupAdapterFactory.java | 7 +-
.../metadata/declared/AqlMetadataProvider.java | 28 +++---
...AqlOrdinalPrimitiveValueProviderFactory.java | 76 ++++++++++++++++
...AqlPrimitiveIntegerValueProviderFactory.java | 94 --------------------
12 files changed, 131 insertions(+), 167 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java b/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
index 9016e04..4f6da9b 100644
--- a/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
+++ b/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
@@ -36,8 +36,8 @@ import org.apache.hyracks.control.nc.NodeControllerService;
public class AsterixHyracksIntegrationUtil {
- public static final int NODES = 1;
- public static final int PARTITONS = 1;
+ public static final int NODES = 2;
+ public static final int PARTITONS = 2;
public static final int DEFAULT_HYRACKS_CC_CLIENT_PORT = 1098;
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-app/src/main/java/org/apache/asterix/file/DatasetOperations.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/file/DatasetOperations.java b/asterix-app/src/main/java/org/apache/asterix/file/DatasetOperations.java
index dbf21d9..4d6ee1c 100644
--- a/asterix-app/src/main/java/org/apache/asterix/file/DatasetOperations.java
+++ b/asterix-app/src/main/java/org/apache/asterix/file/DatasetOperations.java
@@ -31,7 +31,7 @@ import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
import org.apache.asterix.common.exceptions.ACIDException;
import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
-import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlPrimitiveIntegerValueProviderFactory;
+import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlOrdinalPrimitiveValueProviderFactory;
import org.apache.asterix.formats.base.IDataFormat;
import org.apache.asterix.metadata.MetadataManager;
import org.apache.asterix.metadata.declared.AqlMetadataProvider;
@@ -58,10 +58,10 @@ import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
import org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor;
import org.apache.hyracks.storage.am.common.dataflow.TreeIndexCreateOperatorDescriptor;
import org.apache.hyracks.storage.am.common.impls.NoOpOperationCallbackFactory;
-import org.apache.hyracks.storage.am.common.statistics.SynopsisType;
import org.apache.hyracks.storage.am.lsm.btree.dataflow.LSMBTreeDataflowHelperFactory;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMMergePolicyFactory;
import org.apache.hyracks.storage.am.lsm.common.dataflow.LSMTreeIndexCompactOperatorDescriptor;
+import org.apache.hyracks.storage.am.statistics.common.SynopsisType;
import org.apache.hyracks.storage.common.file.ILocalResourceFactoryProvider;
import org.apache.hyracks.storage.common.file.LocalResource;
@@ -128,7 +128,7 @@ public class DatasetOperations {
new PrimaryIndexOperationTrackerProvider(dataset.getDatasetId()),
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), true, filterTypeTraits, filterCmpFactories,
- btreeFields, filterFields, true, false, null));
+ btreeFields, filterFields, true, false, null, null));
AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(specPrimary, primaryBtreeDrop,
splitsAndConstraint.second);
@@ -193,8 +193,8 @@ public class DatasetOperations {
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), true, filterTypeTraits, filterCmpFactories,
btreeFields, filterFields, true,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE),
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, typeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE),
localResourceFactoryProvider, NoOpOperationCallbackFactory.INSTANCE);
AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, indexCreateOp,
splitsAndConstraint.second);
@@ -250,8 +250,8 @@ public class DatasetOperations {
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), true, filterTypeTraits, filterCmpFactories,
btreeFields, filterFields, !temp,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE),
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, typeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE),
NoOpOperationCallbackFactory.INSTANCE);
AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, compactOp,
splitsAndConstraint.second);
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-app/src/main/java/org/apache/asterix/file/ExternalIndexingOperations.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/file/ExternalIndexingOperations.java b/asterix-app/src/main/java/org/apache/asterix/file/ExternalIndexingOperations.java
index bb49ed3..5f8d86b 100644
--- a/asterix-app/src/main/java/org/apache/asterix/file/ExternalIndexingOperations.java
+++ b/asterix-app/src/main/java/org/apache/asterix/file/ExternalIndexingOperations.java
@@ -39,7 +39,6 @@ import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
import org.apache.asterix.common.ioopcallbacks.LSMBTreeWithBuddyIOOperationCallbackFactory;
import org.apache.asterix.common.ioopcallbacks.LSMRTreeIOOperationCallbackFactory;
-import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlPrimitiveIntegerValueProviderFactory;
import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlPrimitiveValueProviderFactory;
import org.apache.asterix.external.adapter.factory.HDFSAdapterFactory;
import org.apache.asterix.external.adapter.factory.HDFSIndexingAdapterFactory;
@@ -94,7 +93,6 @@ import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
import org.apache.hyracks.storage.am.common.api.IPrimitiveValueProviderFactory;
import org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor;
import org.apache.hyracks.storage.am.common.impls.NoOpOperationCallbackFactory;
-import org.apache.hyracks.storage.am.common.statistics.SynopsisType;
import org.apache.hyracks.storage.am.lsm.btree.dataflow.ExternalBTreeDataflowHelperFactory;
import org.apache.hyracks.storage.am.lsm.btree.dataflow.ExternalBTreeWithBuddyDataflowHelperFactory;
import org.apache.hyracks.storage.am.lsm.btree.dataflow.LSMBTreeDataflowHelperFactory;
@@ -248,9 +246,7 @@ public class ExternalIndexingOperations {
new SecondaryIndexOperationTrackerProvider(dataset.getDatasetId()),
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(),
- ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(dataset), true,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE);
+ ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(dataset), true, false, null, null);
ExternalFilesIndexOperatorDescriptor externalFilesOp = new ExternalFilesIndexOperatorDescriptor(spec,
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
secondaryFileSplitProvider, indexDataflowHelperFactory, localResourceFactoryProvider,
@@ -433,8 +429,7 @@ public class ExternalIndexingOperations {
new SecondaryIndexOperationTrackerProvider(dataset.getDatasetId()),
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), false, null, null, null, null, !temp,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE));
+ false, null, null));
AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, btreeDrop,
splitsAndConstraint.second);
spec.addRoot(btreeDrop);
@@ -558,9 +553,7 @@ public class ExternalIndexingOperations {
new SecondaryIndexOperationTrackerProvider(ds.getDatasetId()),
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(),
- ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(ds), true,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE);
+ ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(ds), true, false, null, null);
}
private static ExternalBTreeWithBuddyDataflowHelperFactory getBTreeDataflowHelperFactory(Dataset ds, Index index,
@@ -570,9 +563,7 @@ public class ExternalIndexingOperations {
new SecondaryIndexOperationTrackerProvider(ds.getDatasetId()),
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeWithBuddyIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), new int[] { index.getKeyFieldNames().size() },
- ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(ds), true,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE);
+ ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(ds), true, false, null, null);
}
@SuppressWarnings("rawtypes")
@@ -763,9 +754,7 @@ public class ExternalIndexingOperations {
new SecondaryIndexOperationTrackerProvider(dataset.getDatasetId()),
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(),
- ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(dataset), true,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE);
+ ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(dataset), true, false, null, null);
LSMTreeIndexCompactOperatorDescriptor compactOp = new LSMTreeIndexCompactOperatorDescriptor(spec,
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
secondaryFileSplitProvider, FilesIndexDescription.EXTERNAL_FILE_INDEX_TYPE_TRAITS,
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-app/src/main/java/org/apache/asterix/file/IndexOperations.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/file/IndexOperations.java b/asterix-app/src/main/java/org/apache/asterix/file/IndexOperations.java
index 6a817e1..02b25ca 100644
--- a/asterix-app/src/main/java/org/apache/asterix/file/IndexOperations.java
+++ b/asterix-app/src/main/java/org/apache/asterix/file/IndexOperations.java
@@ -115,7 +115,7 @@ public class IndexOperations {
new SecondaryIndexOperationTrackerProvider(dataset.getDatasetId()),
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), false, null, null, null, null, true, false,
- null));
+ null, null));
AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, btreeDrop,
splitsAndConstraint.second);
spec.addRoot(btreeDrop);
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-app/src/main/java/org/apache/asterix/file/SecondaryBTreeOperationsHelper.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/file/SecondaryBTreeOperationsHelper.java b/asterix-app/src/main/java/org/apache/asterix/file/SecondaryBTreeOperationsHelper.java
index 10d9c8e..485bcca 100644
--- a/asterix-app/src/main/java/org/apache/asterix/file/SecondaryBTreeOperationsHelper.java
+++ b/asterix-app/src/main/java/org/apache/asterix/file/SecondaryBTreeOperationsHelper.java
@@ -30,7 +30,7 @@ import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
import org.apache.asterix.common.ioopcallbacks.LSMBTreeWithBuddyIOOperationCallbackFactory;
-import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlPrimitiveIntegerValueProviderFactory;
+import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlOrdinalPrimitiveValueProviderFactory;
import org.apache.asterix.metadata.declared.AqlMetadataProvider;
import org.apache.asterix.metadata.entities.Index;
import org.apache.asterix.metadata.external.IndexingConstants;
@@ -69,10 +69,10 @@ import org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory
import org.apache.hyracks.storage.am.common.dataflow.TreeIndexBulkLoadOperatorDescriptor;
import org.apache.hyracks.storage.am.common.dataflow.TreeIndexCreateOperatorDescriptor;
import org.apache.hyracks.storage.am.common.impls.NoOpOperationCallbackFactory;
-import org.apache.hyracks.storage.am.common.statistics.SynopsisType;
import org.apache.hyracks.storage.am.lsm.btree.dataflow.ExternalBTreeWithBuddyDataflowHelperFactory;
import org.apache.hyracks.storage.am.lsm.btree.dataflow.LSMBTreeDataflowHelperFactory;
import org.apache.hyracks.storage.am.lsm.common.dataflow.LSMTreeIndexCompactOperatorDescriptor;
+import org.apache.hyracks.storage.am.statistics.common.SynopsisType;
import org.apache.hyracks.storage.common.file.ILocalResourceFactoryProvider;
import org.apache.hyracks.storage.common.file.LocalResource;
@@ -105,8 +105,8 @@ public class SecondaryBTreeOperationsHelper extends SecondaryIndexOperationsHelp
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), false, filterTypeTraits, filterCmpFactories,
secondaryBTreeFields, secondaryFilterFields, true,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE);
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, secondaryTypeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE);
} else {
// External dataset local resource and dataflow helper
int[] buddyBreeFields = new int[] { numSecondaryKeys };
@@ -121,8 +121,8 @@ public class SecondaryBTreeOperationsHelper extends SecondaryIndexOperationsHelp
LSMBTreeWithBuddyIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), buddyBreeFields,
ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(dataset), true,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE);
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, secondaryTypeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE);
}
TreeIndexCreateOperatorDescriptor secondaryIndexCreateOp = new TreeIndexCreateOperatorDescriptor(spec,
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
@@ -176,8 +176,8 @@ public class SecondaryBTreeOperationsHelper extends SecondaryIndexOperationsHelp
LSMBTreeWithBuddyIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), new int[] { numSecondaryKeys },
ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(dataset), true,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE);
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, secondaryTypeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE);
IOperatorDescriptor root;
if (externalFiles != null) {
// Transaction load
@@ -240,8 +240,8 @@ public class SecondaryBTreeOperationsHelper extends SecondaryIndexOperationsHelp
LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), false, filterTypeTraits,
filterCmpFactories, secondaryBTreeFields, secondaryFilterFields, !temp,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE),
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, secondaryTypeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE),
GlobalConfig.DEFAULT_TREE_FILL_FACTOR);
AlgebricksMetaOperatorDescriptor metaOp = new AlgebricksMetaOperatorDescriptor(spec, 1, 0,
@@ -288,8 +288,8 @@ public class SecondaryBTreeOperationsHelper extends SecondaryIndexOperationsHelp
LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), false, filterTypeTraits,
filterCmpFactories, secondaryBTreeFields, secondaryFilterFields, !temp,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE),
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, secondaryTypeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE),
NoOpOperationCallbackFactory.INSTANCE);
} else {
// External dataset
@@ -303,8 +303,8 @@ public class SecondaryBTreeOperationsHelper extends SecondaryIndexOperationsHelp
LSMBTreeWithBuddyIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), new int[] { numSecondaryKeys },
ExternalDatasetsRegistry.INSTANCE.getDatasetVersion(dataset), true,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE),
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, secondaryTypeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE),
NoOpOperationCallbackFactory.INSTANCE);
}
AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, compactOp,
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java b/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java
index c2e97fe..4486751 100644
--- a/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java
+++ b/asterix-app/src/main/java/org/apache/asterix/file/SecondaryIndexOperationsHelper.java
@@ -36,7 +36,6 @@ import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
import org.apache.asterix.common.transactions.IRecoveryManager.ResourceType;
import org.apache.asterix.common.transactions.JobId;
-import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlPrimitiveIntegerValueProviderFactory;
import org.apache.asterix.external.indexing.operators.ExternalIndexBulkModifyOperatorDescriptor;
import org.apache.asterix.formats.nontagged.AqlBinaryBooleanInspectorImpl;
import org.apache.asterix.formats.nontagged.AqlBinaryComparatorFactoryProvider;
@@ -93,7 +92,6 @@ import org.apache.hyracks.storage.am.common.api.ISearchOperationCallbackFactory;
import org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory;
import org.apache.hyracks.storage.am.common.dataflow.TreeIndexBulkLoadOperatorDescriptor;
import org.apache.hyracks.storage.am.common.impls.NoOpOperationCallbackFactory;
-import org.apache.hyracks.storage.am.common.statistics.SynopsisType;
import org.apache.hyracks.storage.am.lsm.btree.dataflow.LSMBTreeDataflowHelperFactory;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMMergePolicyFactory;
@@ -351,9 +349,7 @@ public abstract class SecondaryIndexOperationsHelper {
new PrimaryIndexOperationTrackerProvider(dataset.getDatasetId()),
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), true, filterTypeTraits, filterCmpFactories,
- primaryBTreeFields, primaryFilterFields, !temp,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE),
+ primaryBTreeFields, primaryFilterFields, !temp, false, null, null),
false, false, null, searchCallbackFactory, null, null);
AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, primarySearchOp,
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-app/src/main/resources/asterix-build-configuration.xml
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/resources/asterix-build-configuration.xml b/asterix-app/src/main/resources/asterix-build-configuration.xml
index 490050d..23e9bf9 100644
--- a/asterix-app/src/main/resources/asterix-build-configuration.xml
+++ b/asterix-app/src/main/resources/asterix-build-configuration.xml
@@ -22,18 +22,18 @@
<ncId>nc1</ncId>
<storeDirs>nc1data</storeDirs>
</store>
-<!-- <store> -->
-<!-- <ncId>nc2</ncId> -->
-<!-- <storeDirs>nc2data</storeDirs> -->
-<!-- </store> -->
+ <store>
+ <ncId>nc2</ncId>
+ <storeDirs>nc2data</storeDirs>
+ </store>
<transactionLogDir>
<ncId>nc1</ncId>
<txnLogDirPath>target/txnLogDir/nc1</txnLogDirPath>
</transactionLogDir>
-<!-- <transactionLogDir> -->
-<!-- <ncId>nc2</ncId> -->
-<!-- <txnLogDirPath>target/txnLogDir/nc2</txnLogDirPath> -->
-<!-- </transactionLogDir> -->
+ <transactionLogDir>
+ <ncId>nc2</ncId>
+ <txnLogDirPath>target/txnLogDir/nc2</txnLogDirPath>
+ </transactionLogDir>
<property>
<name>max.wait.active.cluster</name>
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixStorageProperties.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixStorageProperties.java b/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixStorageProperties.java
index 98de109..55d1934 100644
--- a/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixStorageProperties.java
+++ b/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixStorageProperties.java
@@ -18,7 +18,7 @@
*/
package org.apache.asterix.common.config;
-import org.apache.hyracks.storage.am.common.statistics.SynopsisType;
+import org.apache.hyracks.storage.am.statistics.common.SynopsisType;
public class AsterixStorageProperties extends AbstractAsterixProperties {
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSLookupAdapterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSLookupAdapterFactory.java b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSLookupAdapterFactory.java
index 86a6878..a72e5a9 100644
--- a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSLookupAdapterFactory.java
+++ b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSLookupAdapterFactory.java
@@ -23,7 +23,6 @@ import java.util.Map;
import org.apache.asterix.common.dataflow.IAsterixApplicationContextInfo;
import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
-import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlPrimitiveIntegerValueProviderFactory;
import org.apache.asterix.metadata.MetadataException;
import org.apache.asterix.metadata.MetadataManager;
import org.apache.asterix.metadata.declared.AqlMetadataProvider;
@@ -57,7 +56,6 @@ import org.apache.hyracks.api.job.JobSpecification;
import org.apache.hyracks.dataflow.std.file.IFileSplitProvider;
import org.apache.hyracks.storage.am.common.api.ISearchOperationCallbackFactory;
import org.apache.hyracks.storage.am.common.impls.NoOpOperationCallbackFactory;
-import org.apache.hyracks.storage.am.common.statistics.SynopsisType;
import org.apache.hyracks.storage.am.lsm.btree.dataflow.ExternalBTreeDataflowHelperFactory;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMMergePolicyFactory;
@@ -156,9 +154,8 @@ public class HDFSLookupAdapterFactory implements IControlledAdapterFactory {
new SecondaryIndexOperationTrackerProvider(dataset.getDatasetId()),
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
metadataProvider.getStorageProperties().getBloomFilterFalsePositiveRate(),
- ExternalDatasetsRegistry.INSTANCE.getAndLockDatasetVersion(dataset, metadataProvider), !temp,
- metadataProvider.getStorageProperties().getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE);
+ ExternalDatasetsRegistry.INSTANCE.getAndLockDatasetVersion(dataset, metadataProvider), !temp, false,
+ null, null);
// Create the out record descriptor, appContext and fileSplitProvider for the files index
RecordDescriptor outRecDesc = JobGenHelper.mkRecordDescriptor(typeEnv, opSchema, context);
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlMetadataProvider.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlMetadataProvider.java b/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlMetadataProvider.java
index f22118b..d68f051 100644
--- a/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlMetadataProvider.java
+++ b/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlMetadataProvider.java
@@ -55,7 +55,7 @@ import org.apache.asterix.common.ioopcallbacks.LSMRTreeIOOperationCallbackFactor
import org.apache.asterix.common.parse.IParseFileSplitsDecl;
import org.apache.asterix.common.transactions.IRecoveryManager.ResourceType;
import org.apache.asterix.common.transactions.JobId;
-import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlPrimitiveIntegerValueProviderFactory;
+import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlOrdinalPrimitiveValueProviderFactory;
import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlPrimitiveValueProviderFactory;
import org.apache.asterix.formats.base.IDataFormat;
import org.apache.asterix.formats.nontagged.AqlBinaryComparatorFactoryProvider;
@@ -168,7 +168,6 @@ import org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory
import org.apache.hyracks.storage.am.common.dataflow.TreeIndexBulkLoadOperatorDescriptor;
import org.apache.hyracks.storage.am.common.impls.NoOpOperationCallbackFactory;
import org.apache.hyracks.storage.am.common.ophelpers.IndexOperation;
-import org.apache.hyracks.storage.am.common.statistics.SynopsisType;
import org.apache.hyracks.storage.am.common.tuples.TypeAwareTupleWriterFactory;
import org.apache.hyracks.storage.am.lsm.btree.dataflow.ExternalBTreeWithBuddyDataflowHelperFactory;
import org.apache.hyracks.storage.am.lsm.btree.dataflow.LSMBTreeDataflowHelperFactory;
@@ -182,6 +181,7 @@ import org.apache.hyracks.storage.am.lsm.rtree.dataflow.ExternalRTreeDataflowHel
import org.apache.hyracks.storage.am.lsm.rtree.dataflow.LSMRTreeDataflowHelperFactory;
import org.apache.hyracks.storage.am.rtree.dataflow.RTreeSearchOperatorDescriptor;
import org.apache.hyracks.storage.am.rtree.frames.RTreePolicyType;
+import org.apache.hyracks.storage.am.statistics.common.SynopsisType;
public class AqlMetadataProvider implements IMetadataProvider<AqlSourceId, String> {
private static Logger LOGGER = Logger.getLogger(AqlMetadataProvider.class.getName());
@@ -785,8 +785,8 @@ public class AqlMetadataProvider implements IMetadataProvider<AqlSourceId, Strin
rtcProvider, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), !isSecondary, filterTypeTraits,
filterCmpFactories, btreeFields, filterFields, !temp,
- getStorageProperties().getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE),
+ getStorageProperties().getStatisticsSynopsisType() != SynopsisType.None, typeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE),
retainInput, retainNull, context.getNullWriterFactory(), searchCallbackFactory,
minFilterFieldIndexes, maxFilterFieldIndexes);
} else {
@@ -800,8 +800,8 @@ public class AqlMetadataProvider implements IMetadataProvider<AqlSourceId, Strin
LSMBTreeWithBuddyIOOperationCallbackFactory.INSTANCE,
getStorageProperties().getBloomFilterFalsePositiveRate(), buddyBreeFields,
ExternalDatasetsRegistry.INSTANCE.getAndLockDatasetVersion(dataset, this), !temp,
- getStorageProperties().getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE);
+ getStorageProperties().getStatisticsSynopsisType() != SynopsisType.None, typeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE);
btreeSearchOp = new ExternalBTreeSearchOperatorDescriptor(jobSpec, outputRecDesc, rtcProvider,
rtcProvider, spPc.first, typeTraits, comparatorFactories, bloomFilterKeyFields, lowKeyFields,
highKeyFields, lowKeyInclusive, highKeyInclusive, indexDataflowHelperFactory, retainInput,
@@ -1144,8 +1144,8 @@ public class AqlMetadataProvider implements IMetadataProvider<AqlSourceId, Strin
LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), true, filterTypeTraits,
filterCmpFactories, btreeFields, filterFields, !temp,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE));
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, typeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE));
return new Pair<IOperatorDescriptor, AlgebricksPartitionConstraint>(btreeBulkLoad,
splitsAndConstraint.second);
} catch (MetadataException me) {
@@ -1232,8 +1232,8 @@ public class AqlMetadataProvider implements IMetadataProvider<AqlSourceId, Strin
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), true, filterTypeTraits, filterCmpFactories,
btreeFields, filterFields, !temp,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE);
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, typeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE);
IOperatorDescriptor op;
if (bulkload) {
long numElementsHint = getCardinalityPerPartitionHint(dataset);
@@ -1712,8 +1712,8 @@ public class AqlMetadataProvider implements IMetadataProvider<AqlSourceId, Strin
AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER, LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), false, filterTypeTraits, filterCmpFactories,
btreeFields, filterFields, !temp,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE);
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, typeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE);
IOperatorDescriptor op;
if (bulkload) {
long numElementsHint = getCardinalityPerPartitionHint(dataset);
@@ -1733,8 +1733,8 @@ public class AqlMetadataProvider implements IMetadataProvider<AqlSourceId, Strin
LSMBTreeIOOperationCallbackFactory.INSTANCE,
storageProperties.getBloomFilterFalsePositiveRate(), false, filterTypeTraits,
filterCmpFactories, btreeFields, filterFields, !temp,
- storageProperties.getStatisticsSynopsisType() != SynopsisType.None,
- AqlPrimitiveIntegerValueProviderFactory.INSTANCE),
+ storageProperties.getStatisticsSynopsisType() != SynopsisType.None, typeTraits,
+ AqlOrdinalPrimitiveValueProviderFactory.INSTANCE),
filterFactory, modificationCallbackFactory, false, indexName);
}
return new Pair<IOperatorDescriptor, AlgebricksPartitionConstraint>(op, splitsAndConstraint.second);
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlOrdinalPrimitiveValueProviderFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlOrdinalPrimitiveValueProviderFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlOrdinalPrimitiveValueProviderFactory.java
new file mode 100644
index 0000000..5e85722
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlOrdinalPrimitiveValueProviderFactory.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.valueproviders;
+
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
+import org.apache.hyracks.storage.am.common.api.IOrdinalPrimitiveValueProvider;
+import org.apache.hyracks.storage.am.common.api.IOrdinalPrimitiveValueProviderFactory;
+import org.apache.hyracks.storage.am.rtree.impls.BytePrimitiveValueProviderFactory;
+import org.apache.hyracks.storage.am.rtree.impls.IntegerPrimitiveValueProviderFactory;
+import org.apache.hyracks.storage.am.rtree.impls.LongPrimitiveValueProviderFactory;
+import org.apache.hyracks.storage.am.rtree.impls.ShortPrimitiveValueProviderFactory;
+
+public class AqlOrdinalPrimitiveValueProviderFactory implements IOrdinalPrimitiveValueProviderFactory {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final AqlOrdinalPrimitiveValueProviderFactory INSTANCE = new AqlOrdinalPrimitiveValueProviderFactory();
+
+ private AqlOrdinalPrimitiveValueProviderFactory() {
+ }
+
+ @Override
+ public IOrdinalPrimitiveValueProvider createOrdinalPrimitiveValueProvider() {
+ return new IOrdinalPrimitiveValueProvider() {
+ final IOrdinalPrimitiveValueProvider byteProvider = BytePrimitiveValueProviderFactory.INSTANCE
+ .createOrdinalPrimitiveValueProvider();
+ final IOrdinalPrimitiveValueProvider shortProvider = ShortPrimitiveValueProviderFactory.INSTANCE
+ .createOrdinalPrimitiveValueProvider();
+ final IOrdinalPrimitiveValueProvider intProvider = IntegerPrimitiveValueProviderFactory.INSTANCE
+ .createOrdinalPrimitiveValueProvider();
+ final IOrdinalPrimitiveValueProvider longProvider = LongPrimitiveValueProviderFactory.INSTANCE
+ .createOrdinalPrimitiveValueProvider();
+
+ @Override
+ public long getOrdinalValue(byte[] bytes, int offset) {
+
+ ATypeTag tag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]);
+ switch (tag) {
+ case INT8: {
+ return byteProvider.getOrdinalValue(bytes, offset + 1);
+ }
+ case INT16: {
+ return shortProvider.getOrdinalValue(bytes, offset + 1);
+ }
+ case INT32: {
+ return intProvider.getOrdinalValue(bytes, offset + 1);
+ }
+ case INT64: {
+ return longProvider.getOrdinalValue(bytes, offset + 1);
+ }
+ default: {
+ throw new NotImplementedException("Value provider for type " + tag + " is not implemented");
+ }
+ }
+ }
+ };
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/fd5d424f/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlPrimitiveIntegerValueProviderFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlPrimitiveIntegerValueProviderFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlPrimitiveIntegerValueProviderFactory.java
deleted file mode 100644
index 4f2383a..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlPrimitiveIntegerValueProviderFactory.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.dataflow.data.nontagged.valueproviders;
-
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.storage.am.common.api.IPrimitiveIntegerValueProvider;
-import org.apache.hyracks.storage.am.common.api.IPrimitiveIntegerValueProviderFactory;
-import org.apache.hyracks.storage.am.lsm.common.impls.BytePrimitiveIntegerValueProviderFactory;
-import org.apache.hyracks.storage.am.lsm.common.impls.IntegerPrimitiveIntegerValueProviderFactory;
-import org.apache.hyracks.storage.am.lsm.common.impls.LongPrimitiveIntegerValueProviderFactory;
-import org.apache.hyracks.storage.am.lsm.common.impls.ShortPrimitiveIntegerValueProviderFactory;
-
-public class AqlPrimitiveIntegerValueProviderFactory implements IPrimitiveIntegerValueProviderFactory {
-
- private static final long serialVersionUID = 1L;
-
- public static final AqlPrimitiveIntegerValueProviderFactory INSTANCE = new AqlPrimitiveIntegerValueProviderFactory();
-
- private AqlPrimitiveIntegerValueProviderFactory() {
- }
-
- @Override
- public IPrimitiveIntegerValueProvider createPrimitiveIntegerValueProvider() {
- return new IPrimitiveIntegerValueProvider() {
- final IPrimitiveIntegerValueProvider byteProvider = BytePrimitiveIntegerValueProviderFactory.INSTANCE
- .createPrimitiveIntegerValueProvider();
- final IPrimitiveIntegerValueProvider shortProvider = ShortPrimitiveIntegerValueProviderFactory.INSTANCE
- .createPrimitiveIntegerValueProvider();
- final IPrimitiveIntegerValueProvider intProvider = IntegerPrimitiveIntegerValueProviderFactory.INSTANCE
- .createPrimitiveIntegerValueProvider();
- final IPrimitiveIntegerValueProvider longProvider = LongPrimitiveIntegerValueProviderFactory.INSTANCE
- .createPrimitiveIntegerValueProvider();
-
- private IPrimitiveIntegerValueProvider getTypeValueProvider(byte[] bytes, int offset) {
- final ATypeTag tag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]);
- switch (tag) {
- case INT16: {
- return shortProvider;
- }
- case INT8: {
- return byteProvider;
- }
- case INT32: {
- return intProvider;
- }
- case INT64: {
- return longProvider;
- }
- default: {
- throw new NotImplementedException("Value provider for type " + tag + " is not implemented");
- }
- }
- }
-
- @Override
- public long getValue(byte[] bytes, int offset) {
- return getTypeValueProvider(bytes, offset).getValue(bytes, offset + 1);
- }
-
- @Override
- public long minDomainValue(byte[] bytes, int offset) {
- return getTypeValueProvider(bytes, offset).minDomainValue(bytes, offset);
- }
-
- @Override
- public long maxDomainValue(byte[] bytes, int offset) {
- return getTypeValueProvider(bytes, offset).maxDomainValue(bytes, offset);
- }
-
- @Override
- public int maxLevel(byte[] bytes, int offset) {
- return getTypeValueProvider(bytes, offset).maxLevel(bytes, offset);
- }
- };
- }
-}