@AutoService(value=cz.o2.proxima.beam.core.DataAccessorFactory.class) public class TestStreamStorage extends java.lang.Object implements DataAccessorFactory
test-stream://. This storage is backed by TestStream and
enables fine tuning with regard to watermark and other stream aspects.| Modifier and Type | Class and Description |
|---|---|
private static class |
TestStreamStorage.StreamProviders |
| Modifier and Type | Field and Description |
|---|---|
private cz.o2.proxima.repository.Repository |
repo |
private static java.util.Map<cz.o2.proxima.repository.Repository,TestStreamStorage.StreamProviders> |
storages |
| Constructor and Description |
|---|
TestStreamStorage() |
| Modifier and Type | Method and Description |
|---|---|
cz.o2.proxima.storage.internal.AbstractDataAccessorFactory.Accept |
accepts(java.net.URI uri) |
DataAccessor |
createAccessor(BeamDataOperator operator,
cz.o2.proxima.repository.AttributeFamilyDescriptor familyDescriptor) |
private TestStreamStorage.StreamProviders |
providers() |
static void |
putStream(cz.o2.proxima.repository.Repository repo,
cz.o2.proxima.repository.AttributeFamilyDescriptor family,
org.apache.beam.sdk.testing.TestStream<cz.o2.proxima.storage.StreamElement> stream)
Put given
TestStream for given AttributeFamilyDescriptor. |
static com.typesafe.config.Config |
replaceStorages(com.typesafe.config.Config config)
Replace all storages in all attribute families in given config with
test-stream. |
static com.typesafe.config.Config |
replaceStorages(com.typesafe.config.Config config,
cz.o2.proxima.functional.UnaryPredicate<java.lang.String> familyFilter)
Replace all storages in all attribute families in given config with
test-stream. |
void |
setup(cz.o2.proxima.repository.Repository repo) |
private org.apache.beam.sdk.values.PCollection<cz.o2.proxima.storage.StreamElement> |
streamFor(org.apache.beam.sdk.Pipeline pipeline,
java.net.URI uri) |
private static final java.util.Map<cz.o2.proxima.repository.Repository,TestStreamStorage.StreamProviders> storages
private cz.o2.proxima.repository.Repository repo
public static com.typesafe.config.Config replaceStorages(com.typesafe.config.Config config)
test-stream.config - the configuration to replacepublic static com.typesafe.config.Config replaceStorages(com.typesafe.config.Config config,
cz.o2.proxima.functional.UnaryPredicate<java.lang.String> familyFilter)
test-stream.config - the configuration to replacefamilyFilter - filter for families to replace storage inpublic static void putStream(cz.o2.proxima.repository.Repository repo,
cz.o2.proxima.repository.AttributeFamilyDescriptor family,
org.apache.beam.sdk.testing.TestStream<cz.o2.proxima.storage.StreamElement> stream)
TestStream for given AttributeFamilyDescriptor.repo - repositoryfamily - attribute family descriptorstream - the stream to use as data sourcepublic void setup(cz.o2.proxima.repository.Repository repo)
setup in interface cz.o2.proxima.storage.internal.AbstractDataAccessorFactory<BeamDataOperator,DataAccessor>public cz.o2.proxima.storage.internal.AbstractDataAccessorFactory.Accept accepts(java.net.URI uri)
accepts in interface cz.o2.proxima.storage.internal.AbstractDataAccessorFactory<BeamDataOperator,DataAccessor>public DataAccessor createAccessor(BeamDataOperator operator, cz.o2.proxima.repository.AttributeFamilyDescriptor familyDescriptor)
createAccessor in interface cz.o2.proxima.storage.internal.AbstractDataAccessorFactory<BeamDataOperator,DataAccessor>private org.apache.beam.sdk.values.PCollection<cz.o2.proxima.storage.StreamElement> streamFor(org.apache.beam.sdk.Pipeline pipeline,
java.net.URI uri)
private TestStreamStorage.StreamProviders providers()
Copyright © 2017–2022. All rights reserved.