diff options
author | 2017-04-07 14:25:27 +0000 | |
---|---|---|
committer | 2017-04-07 16:44:52 +0200 | |
commit | ee3e19202ab9aaf3ed6ff13af029a7f643af7f3a (patch) | |
tree | a6971718cfc642ece74520a057fe8fed88c7fbd5 /src/main/java/com/google/devtools/build/lib/buildeventstream/transports/FileTransport.java | |
parent | 90349cace2d7e883616c62f15cb9a19d625f0515 (diff) |
BEP: Extend infrastructure to allow reporting artifacts only once
Extend the functionality of the BuildEventStreamer to report those parts
of NestedSets of Artifacts not reported earlier. In this way, duplicate
reporting can be avoided, without the events themselves having to know
which artifacts are known already.
Change-Id: Ia959c28c440301860eac57ea5d9a712c0d49ebdf
PiperOrigin-RevId: 152497672
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/buildeventstream/transports/FileTransport.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventstream/transports/FileTransport.java | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/transports/FileTransport.java b/src/main/java/com/google/devtools/build/lib/buildeventstream/transports/FileTransport.java index e691df1819..6744df3ef6 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventstream/transports/FileTransport.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/transports/FileTransport.java @@ -20,9 +20,7 @@ import static com.google.common.base.Preconditions.checkState; import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.SettableFuture; import com.google.devtools.build.lib.buildeventstream.BuildEvent; -import com.google.devtools.build.lib.buildeventstream.BuildEventConverters; import com.google.devtools.build.lib.buildeventstream.BuildEventTransport; -import com.google.devtools.build.lib.buildeventstream.PathConverter; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.AsynchronousFileChannel; @@ -55,7 +53,6 @@ abstract class FileTransport implements BuildEventTransport { @VisibleForTesting final AsynchronousFileChannel ch; private final WriteCompletionHandler completionHandler = new WriteCompletionHandler(); - protected final BuildEventConverters converters; // The offset in the file to begin the next write at. private long writeOffset; // Number of writes that haven't completed yet. @@ -63,19 +60,13 @@ abstract class FileTransport implements BuildEventTransport { // The future returned by close() private SettableFuture<Void> closeFuture; - FileTransport(String path, final PathConverter pathConverter) { + FileTransport(String path) { try { ch = AsynchronousFileChannel.open(Paths.get(path), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.WRITE); } catch (IOException e) { throw new RuntimeException(e); } - this.converters = new BuildEventConverters() { - @Override - public PathConverter pathConverter() { - return pathConverter; - } - }; } synchronized void writeData(byte[] data) { |