Package cz.o2.proxima.beam.core
Class AttributeFamilyProxyDataAccessor
- java.lang.Object
-
- cz.o2.proxima.beam.core.AttributeFamilyProxyDataAccessor
-
- All Implemented Interfaces:
DataAccessor
,AbstractDataAccessor
,java.io.Serializable
public class AttributeFamilyProxyDataAccessor extends java.lang.Object implements DataAccessor
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.beam.sdk.values.PCollection<StreamElement>
createBatch(org.apache.beam.sdk.Pipeline pipeline, java.util.List<AttributeDescriptor<?>> attrs, long startStamp, long endStamp)
CreatePCollection
for given attribute family's batch updates storage.org.apache.beam.sdk.values.PCollection<StreamElement>
createStream(java.lang.String name, org.apache.beam.sdk.Pipeline pipeline, Position position, boolean stopAtCurrent, boolean eventTime, long limit)
CreatePCollection
for given attribute family's commit log.org.apache.beam.sdk.values.PCollection<StreamElement>
createStreamFromUpdates(org.apache.beam.sdk.Pipeline pipeline, java.util.List<AttributeDescriptor<?>> attrs, long startStamp, long endStamp, long limit)
CreatePCollection
for given attribute family's batchUpdates.java.net.URI
getUri()
Retrieve URI associated with thisAbstractDataAccessor
.static AttributeFamilyProxyDataAccessor
of(AttributeFamilyProxyDescriptor proxy, DataAccessor readAccessor, DataAccessor writeAccessor)
-
-
-
Method Detail
-
of
public static AttributeFamilyProxyDataAccessor of(AttributeFamilyProxyDescriptor proxy, DataAccessor readAccessor, DataAccessor writeAccessor)
-
getUri
public java.net.URI getUri()
Description copied from interface:AbstractDataAccessor
Retrieve URI associated with thisAbstractDataAccessor
.- Specified by:
getUri
in interfaceAbstractDataAccessor
- Returns:
- URI representing this accessor
-
createStream
public org.apache.beam.sdk.values.PCollection<StreamElement> createStream(java.lang.String name, org.apache.beam.sdk.Pipeline pipeline, Position position, boolean stopAtCurrent, boolean eventTime, long limit)
Description copied from interface:DataAccessor
CreatePCollection
for given attribute family's commit log.- Specified by:
createStream
in interfaceDataAccessor
- Parameters:
name
- name of the consumerpipeline
- pipeline to createPCollection
inposition
- to read fromstopAtCurrent
- stop reading at current dataeventTime
-true
to use event timelimit
- limit number of elements read. Note that the number of elements might be actually lower, because it is divided by number of partitions It is useful mostly for testing purposes- Returns:
PCollection
representing the commit log
-
createBatch
public org.apache.beam.sdk.values.PCollection<StreamElement> createBatch(org.apache.beam.sdk.Pipeline pipeline, java.util.List<AttributeDescriptor<?>> attrs, long startStamp, long endStamp)
Description copied from interface:DataAccessor
CreatePCollection
for given attribute family's batch updates storage.- Specified by:
createBatch
in interfaceDataAccessor
- Parameters:
pipeline
- pipeline to createPCollection
inattrs
- attributes to readstartStamp
- minimal update timestamp (inclusive)endStamp
- maximal update timestamp (exclusive)- Returns:
PCollection
representing the batch updates
-
createStreamFromUpdates
public org.apache.beam.sdk.values.PCollection<StreamElement> createStreamFromUpdates(org.apache.beam.sdk.Pipeline pipeline, java.util.List<AttributeDescriptor<?>> attrs, long startStamp, long endStamp, long limit)
Description copied from interface:DataAccessor
CreatePCollection
for given attribute family's batchUpdates. The created PCollection is purposefully treated as unbounded (although it is bounded, in fact), which gives better performance in cases when it is united with another unboundedPCollection
.- Specified by:
createStreamFromUpdates
in interfaceDataAccessor
- Parameters:
pipeline
- pipeline to createPCollection
inattrs
- attributes to read updates forstartStamp
- minimal update timestamp (inclusive)endStamp
- maximal update timestamp (exclusive)limit
- limit number of elements read. Note that the number of elements might be actually lower, because it is divided by number of partitions It is useful mostly for testing purposes- Returns:
PCollection
representing the commit log
-
-