Java Code Examples for org.apache.beam.sdk.io.FileBasedSink#OutputFileHints
The following examples show how to use
org.apache.beam.sdk.io.FileBasedSink#OutputFileHints .
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: WriteOneFilePerWindow.java From incubator-nemo with Apache License 2.0 | 6 votes |
@Override public ResourceId windowedFilename( final int shardNumber, final int numShards, final BoundedWindow window, final PaneInfo paneInfo, final FileBasedSink.OutputFileHints outputFileHints) { System.out.println("Windowd file name: " + window); final IntervalWindow intervalWindow = (IntervalWindow) window; final String filename = String.format( "%s-%s-of-%s%s", filenamePrefixForWindow(intervalWindow), shardNumber, numShards, outputFileHints.getSuggestedFilenameSuffix()); return baseFilename .getCurrentDirectory() .resolve(filename, ResolveOptions.StandardResolveOptions.RESOLVE_FILE); }
Example 2
Source File: PTransformMatchersTest.java From beam with Apache License 2.0 | 5 votes |
@Override public ResourceId windowedFilename( int shardNumber, int numShards, BoundedWindow window, PaneInfo paneInfo, FileBasedSink.OutputFileHints outputFileHints) { throw new UnsupportedOperationException("should not be called"); }
Example 3
Source File: WriteWithShardingFactoryTest.java From beam with Apache License 2.0 | 5 votes |
@Override public ResourceId windowedFilename( int shardNumber, int numShards, BoundedWindow window, PaneInfo paneInfo, FileBasedSink.OutputFileHints outputFileHints) { throw new IllegalArgumentException("Should not be used"); }
Example 4
Source File: WriteOneFilePerWindow.java From incubator-nemo with Apache License 2.0 | 4 votes |
@Override public ResourceId unwindowedFilename( final int shardNumber, final int numShards, final FileBasedSink.OutputFileHints outputFileHints) { throw new UnsupportedOperationException("Unsupported."); }
Example 5
Source File: PTransformMatchersTest.java From beam with Apache License 2.0 | 4 votes |
@Nullable @Override public ResourceId unwindowedFilename( int shardNumber, int numShards, FileBasedSink.OutputFileHints outputFileHints) { throw new UnsupportedOperationException("should not be called"); }
Example 6
Source File: WriteWithShardingFactoryTest.java From beam with Apache License 2.0 | 4 votes |
@Nullable @Override public ResourceId unwindowedFilename( int shardNumber, int numShards, FileBasedSink.OutputFileHints outputFileHints) { throw new IllegalArgumentException("Should not be used"); }