Java Code Examples for org.apache.beam.sdk.io.fs.MatchResult.Metadata#sizeBytes()
The following examples show how to use
org.apache.beam.sdk.io.fs.MatchResult.Metadata#sizeBytes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FileBasedSource.java From beam with Apache License 2.0 | 5 votes |
@Override public final long getMaxEndOffset(PipelineOptions options) throws IOException { checkArgument( mode != Mode.FILEPATTERN, "Cannot determine the exact end offset of a file pattern"); Metadata metadata = getSingleFileMetadata(); return metadata.sizeBytes(); }
Example 2
Source File: AvroSource.java From beam with Apache License 2.0 | 5 votes |
public static AvroSource<GenericRecord> from(Metadata metadata) { return new AvroSource<>( metadata, DEFAULT_MIN_BUNDLE_SIZE, 0, metadata.sizeBytes(), readGenericRecordsWithSchema(null /* will need to be specified in withSchema */, null)); }