TFRecordIO { public static Write write() { return new AutoValue_TFRecordIO_Write.Builder() .setShardTemplate(null) .setFilenameSuffix(null) .setNumShards(0) .setCompression(Compression.UNCOMPRESSED) .setNoSpilling(false) .build(); } private  TFRecordIO(); static Read read(); static ReadFiles readFiles(); static Write write(); static Sink sink(); static final Coder<byte[]> DEFAULT_BYTE_ARRAY_CODER; }
@Test public void testWriteDisplayData() { assumeFalse(SystemUtils.IS_OS_WINDOWS); TFRecordIO.Write write = TFRecordIO.write() .to("/foo") .withSuffix("bar") .withShardNameTemplate("-SS-of-NN-") .withNumShards(100) .withCompression(GZIP); DisplayData displayData = DisplayData.from(write); assertThat(displayData, hasDisplayItem("filePrefix", "/foo")); assertThat(displayData, hasDisplayItem("fileSuffix", "bar")); assertThat(displayData, hasDisplayItem("shardNameTemplate", "-SS-of-NN-")); assertThat(displayData, hasDisplayItem("numShards", 100)); assertThat(displayData, hasDisplayItem("compressionType", GZIP.toString())); }
@Test public void testWriteDisplayData() { TFRecordIO.Write write = TFRecordIO.write() .to("/foo") .withSuffix("bar") .withShardNameTemplate("-SS-of-NN-") .withNumShards(100) .withCompression(GZIP); DisplayData displayData = DisplayData.from(write); assertThat(displayData, hasDisplayItem("filePrefix", "/foo")); assertThat(displayData, hasDisplayItem("fileSuffix", "bar")); assertThat(displayData, hasDisplayItem("shardNameTemplate", "-SS-of-NN-")); assertThat(displayData, hasDisplayItem("numShards", 100)); assertThat(displayData, hasDisplayItem("compressionType", GZIP.toString())); }