@Test(timeout = 1000 * 60) @Ignore("Flaky test") public void flush() throws Exception { long blockSize = CHUNK_SIZE * 1024 + CHUNK_SIZE / 3; try (DataWriter writer = create(blockSize, CHUNK_SIZE)) { Future<WriteSummary> expected; expected = writeData(writer, CHUNK_SIZE); expected.get(); writer.flush(); assertEquals(CHUNK_SIZE, mBuffer.position()); } }
@Override public void flush() throws IOException { if (mIsWritingToLocal) { mLocalFileDataWriter.flush(); } else { mGrpcDataWriter.flush(); } }
UfsFallbackLocalFileDataWriter implements DataWriter { @Override public void flush() throws IOException { if (mIsWritingToLocal) { mLocalFileDataWriter.flush(); } else { mGrpcDataWriter.flush(); } } }
UfsFallbackLocalFileDataWriter implements DataWriter { @Override public void flush() throws IOException { if (mIsWritingToLocal) { mLocalFileDataWriter.flush(); } else { mGrpcDataWriter.flush(); } } UfsFallbackLocalFileDataWriter(DataWriter localFileDataWriter,
      GrpcDataWriter grpcDataWriter, FileSystemContext context,
      final WorkerNetAddress address, long blockId, long blockSize, OutStreamOptions options); }
UfsFallbackLocalFileDataWriter implements DataWriter { @Override public void flush() throws IOException { if (mIsWritingToLocal) { mLocalFileDataWriter.flush(); } else { mGrpcDataWriter.flush(); } } UfsFallbackLocalFileDataWriter(DataWriter localFileDataWriter,
      GrpcDataWriter grpcDataWriter, FileSystemContext context,
      final WorkerNetAddress address, long blockId, long blockSize, OutStreamOptions options); static UfsFallbackLocalFileDataWriter create(FileSystemContext context,
      WorkerNetAddress address, long blockId, long blockSize, OutStreamOptions options); @Override void writeChunk(ByteBuf chunk); @Override void flush(); @Override int chunkSize(); @Override long pos(); @Override void cancel(); @Override void close(); }
UfsFallbackLocalFileDataWriter implements DataWriter { @Override public void flush() throws IOException { if (mIsWritingToLocal) { mLocalFileDataWriter.flush(); } else { mGrpcDataWriter.flush(); } } UfsFallbackLocalFileDataWriter(DataWriter localFileDataWriter,
      GrpcDataWriter grpcDataWriter, FileSystemContext context,
      final WorkerNetAddress address, long blockId, long blockSize, OutStreamOptions options); static UfsFallbackLocalFileDataWriter create(FileSystemContext context,
      WorkerNetAddress address, long blockId, long blockSize, OutStreamOptions options); @Override void writeChunk(ByteBuf chunk); @Override void flush(); @Override int chunkSize(); @Override long pos(); @Override void cancel(); @Override void close();  }