public class TFRecordIO
extends java.lang.Object
PTransforms for reading and writing TensorFlow TFRecord files.
 For reading files, use read().
 
For simple cases of writing files, use write(). For more complex cases (such as ability
 to write windowed data or writing to multiple destinations) use sink() in combination with
 FileIO.write() or FileIO.writeDynamic().
| Modifier and Type | Class and Description | 
|---|---|
| static class  | TFRecordIO.CompressionTypeDeprecated. 
 Use  Compression. | 
| static class  | TFRecordIO.ReadImplementation of  read(). | 
| static class  | TFRecordIO.ReadFilesImplementation of  readFiles(). | 
| static class  | TFRecordIO.Sink | 
| static class  | TFRecordIO.WriteImplementation of  write(). | 
| Modifier and Type | Field and Description | 
|---|---|
| static Coder<byte[]> | DEFAULT_BYTE_ARRAY_CODERThe default coder, which returns each record of the input file as a byte array. | 
| Modifier and Type | Method and Description | 
|---|---|
| static TFRecordIO.Read | read()A  PTransformthat reads from a TFRecord file (or multiple TFRecord files matching a
 pattern) and returns aPCollectioncontaining the decoding of each of the records of
 the TFRecord file(s) as a byte array. | 
| static TFRecordIO.ReadFiles | readFiles()Like  read(), but reads each file in aPCollectionofFileIO.ReadableFile, returned byFileIO.readMatches(). | 
| static TFRecordIO.Sink | sink() | 
| static TFRecordIO.Write | write()A  PTransformthat writes aPCollectionto TFRecord file (or multiple TFRecord
 files matching a sharding pattern), with each element of the input collection encoded into its
 own record. | 
public static final Coder<byte[]> DEFAULT_BYTE_ARRAY_CODER
public static TFRecordIO.Read read()
PTransform that reads from a TFRecord file (or multiple TFRecord files matching a
 pattern) and returns a PCollection containing the decoding of each of the records of
 the TFRecord file(s) as a byte array.public static TFRecordIO.ReadFiles readFiles()
read(), but reads each file in a PCollection of FileIO.ReadableFile, returned by FileIO.readMatches().public static TFRecordIO.Write write()
PTransform that writes a PCollection to TFRecord file (or multiple TFRecord
 files matching a sharding pattern), with each element of the input collection encoded into its
 own record.public static TFRecordIO.Sink sink()