public class HdfsSystemAdmin
extends java.lang.Object
implements org.apache.samza.system.SystemAdmin
HdfsSystemConsumer and
HdfsSystemProducer
A high level overview of the HDFS producer/consumer architecture:
┌──────────────────────────────────────────────────────────────────────────────┐
│ │
┌─────────────────┤ HDFS │
│ Obtain │ │
│ Partition └──────┬──────────────────────▲──────┬─────────────────────────────────▲───────┘
│ Descriptors │ │ │ │
│ │ │ │ │
│ ┌─────────────▼───────┐ │ │ Filtering/ │
│ │ │ │ └───┐ Grouping └─────┐
│ │ HDFSAvroFileReader │ │ │ │
│ │ │ Persist │ │ │
│ └─────────┬───────────┘ Partition │ │ │
│ │ Descriptors │ ┌──────▼──────────────┐ ┌──────────┴──────────┐
│ │ │ │ │ │ │
│ ┌─────────┴───────────┐ │ │Directory Partitioner│ │ HDFSAvroWriter │
│ │ IFileReader │ │ │ │ │ │
│ │ │ │ └──────┬──────────────┘ └──────────┬──────────┘
│ └─────────┬───────────┘ │ │ │
│ │ │ │ │
│ │ │ │ │
│ ┌─────────┴───────────┐ ┌─┴──────────┴────────┐ ┌──────────┴──────────┐
│ │ │ │ │ │ │
│ │ HDFSSystemConsumer │ │ HDFSSystemAdmin │ │ HDFSSystemProducer │
└──────────▶ │ │ │ │ │
└─────────┬───────────┘ └───────────┬─────────┘ └──────────┬──────────┘
│ │ │
└────────────────────────────────────┼────────────────────────────────────┘
│
┌───────────────────────────────────────┴──────────────────────────────────────┐
│ │
│ HDFSSystemFactory │
│ │
└──────────────────────────────────────────────────────────────────────────────┘| Constructor and Description |
|---|
HdfsSystemAdmin(java.lang.String systemName,
org.apache.samza.config.Config config) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<org.apache.samza.system.SystemStreamPartition,java.lang.String> |
getOffsetsAfter(java.util.Map<org.apache.samza.system.SystemStreamPartition,java.lang.String> offsets) |
java.util.Map<java.lang.String,org.apache.samza.system.SystemStreamMetadata> |
getSystemStreamMetadata(java.util.Set<java.lang.String> streamNames)
Fetch metadata from hdfs system for a set of streams.
|
java.lang.Integer |
offsetComparator(java.lang.String offset1,
java.lang.String offset2)
Compare two multi-file style offset.
|
public HdfsSystemAdmin(java.lang.String systemName,
org.apache.samza.config.Config config)
public java.util.Map<org.apache.samza.system.SystemStreamPartition,java.lang.String> getOffsetsAfter(java.util.Map<org.apache.samza.system.SystemStreamPartition,java.lang.String> offsets)
getOffsetsAfter in interface org.apache.samza.system.SystemAdminpublic java.util.Map<java.lang.String,org.apache.samza.system.SystemStreamMetadata> getSystemStreamMetadata(java.util.Set<java.lang.String> streamNames)
HdfsConfiggetSystemStreamMetadata in interface org.apache.samza.system.SystemAdminstreamNames - The streams to to fetch metadata for.public java.lang.Integer offsetComparator(java.lang.String offset1,
java.lang.String offset2)
SingleFileHdfsReader itself.offsetComparator in interface org.apache.samza.system.SystemAdminoffset1 - First offset for comparison.offset2 - Second offset for comparison.