public class ProtoMessageReader<T extends com.google.protobuf.MessageLite> extends Object implements Closeable
| Constructor and Description |
|---|
ProtoMessageReader(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path filePath,
com.google.protobuf.Parser<T> parser) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.hadoop.fs.Path |
getFilePath() |
long |
getOffset() |
T |
readEvent() |
void |
setOffset(long offset) |
public ProtoMessageReader(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path filePath,
com.google.protobuf.Parser<T> parser)
throws IOException
IOExceptionpublic org.apache.hadoop.fs.Path getFilePath()
public void setOffset(long offset)
throws IOException
IOExceptionpublic long getOffset()
throws IOException
IOExceptionpublic T readEvent() throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2020 Apache Software Foundation. All rights reserved.