Search in sources :

Example 1 with RowTransform

use of org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter.RowTransform in project geowave by locationtech.

the class MergingEntryIterator method getNextEncodedResult.

@Override
protected GeoWaveRow getNextEncodedResult() {
    GeoWaveRow nextResult = scannerIt.next();
    final short internalAdapterId = nextResult.getAdapterId();
    final RowMergingDataAdapter mergingAdapter = mergingAdapters.get(internalAdapterId);
    if ((mergingAdapter != null) && (mergingAdapter.getTransform() != null)) {
        final RowTransform rowTransform = getRowTransform(internalAdapterId, mergingAdapter);
        // This iterator expects a single GeoWaveRow w/ multiple fieldValues
        nextResult = mergeSingleRowValues(nextResult, rowTransform);
    }
    return nextResult;
}
Also used : RowMergingDataAdapter(org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter) GeoWaveRow(org.locationtech.geowave.core.store.entities.GeoWaveRow) RowTransform(org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter.RowTransform)

Example 2 with RowTransform

use of org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter.RowTransform in project geowave by locationtech.

the class ServerOpHelper method addServerSideRowMerging.

public static void addServerSideRowMerging(final RowMergingDataAdapter<?, ?> adapter, final short internalAdapterId, final ServerSideOperations operations, final String serverOpClassName, final String serverOpVisiblityClassName, final String tableName) {
    final RowTransform rowTransform = adapter.getTransform();
    if (rowTransform != null) {
        final OptionProvider optionProvider = new RowMergingAdapterOptionProvider(internalAdapterId, adapter);
        final ServerOpConfig rowMergingCombinerConfig = new ServerOpConfig(EnumSet.allOf(ServerOpScope.class), rowTransform.getBaseTransformPriority(), rowTransform.getTransformName() + ROW_MERGING_SUFFIX, serverOpClassName, optionProvider);
        final ServerOpConfig rowMergingVisibilityCombinerConfig = new ServerOpConfig(EnumSet.of(ServerOpScope.SCAN), rowTransform.getBaseTransformPriority() + 1, rowTransform.getTransformName() + ROW_MERGING_VISIBILITY_SUFFIX, serverOpVisiblityClassName, optionProvider);
        updateServerOps(operations, tableName, rowMergingCombinerConfig, rowMergingVisibilityCombinerConfig);
    }
}
Also used : ServerOpScope(org.locationtech.geowave.core.store.server.ServerOpConfig.ServerOpScope) RowTransform(org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter.RowTransform) OptionProvider(org.locationtech.geowave.core.store.server.ServerOpConfig.OptionProvider)

Example 3 with RowTransform

use of org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter.RowTransform in project geowave by locationtech.

the class MergingEntryIterator method getRowTransform.

private RowTransform getRowTransform(final short internalAdapterId, final RowMergingDataAdapter mergingAdapter) {
    RowTransform transform = transforms.get(internalAdapterId);
    if (transform == null) {
        transform = mergingAdapter.getTransform();
        // set strategy
        try {
            transform.initOptions(mergingAdapter.getOptions(internalAdapterId, null));
        } catch (final IOException e) {
            LOGGER.error("Unable to initialize merge strategy for adapter: " + mergingAdapter.getTypeName(), e);
        }
        transforms.put(internalAdapterId, transform);
    }
    return transform;
}
Also used : RowTransform(org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter.RowTransform) IOException(java.io.IOException)

Aggregations

RowTransform (org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter.RowTransform)3 IOException (java.io.IOException)1 RowMergingDataAdapter (org.locationtech.geowave.core.store.adapter.RowMergingDataAdapter)1 GeoWaveRow (org.locationtech.geowave.core.store.entities.GeoWaveRow)1 OptionProvider (org.locationtech.geowave.core.store.server.ServerOpConfig.OptionProvider)1 ServerOpScope (org.locationtech.geowave.core.store.server.ServerOpConfig.ServerOpScope)1