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;
}
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);
}
}
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;
}
Aggregations