Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
abstractdog committed Apr 2, 2024
1 parent f50490d commit c260286
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ class SplitSerializer {
private int vertexId;
private Path appStagingPath;
// metrics
private AtomicInteger timeSpentWithSplitWriteMs = new AtomicInteger(0);
private AtomicInteger splitsWritten = new AtomicInteger(0);
private AtomicInteger timeSpentWithSplitWriteMs;
private AtomicInteger splitsWritten;
// lazy initialized filesystem and executor
private FileSystem fs;
private ExecutorService executor;
Expand All @@ -197,6 +197,9 @@ private void lazyInit() throws IOException {
vertexId = getContext().getVertexId();
appStagingPath = TezCommonUtils.getTezSystemStagingPath(conf, getContext().getApplicationId().toString());

timeSpentWithSplitWriteMs = new AtomicInteger(0);
splitsWritten = new AtomicInteger(0);

fs = appStagingPath.getFileSystem(jobConf);
executor = Executors.newFixedThreadPool(8,
new ThreadFactoryBuilder().setDaemon(true)
Expand All @@ -215,7 +218,6 @@ private InputDataInformationEvent write(int count, MRSplitProto mrSplit) throws
long now = Time.monotonicNow();
try (FSDataOutputStream out = fs.create(filePath, false)) {
mrSplit.writeTo(out);
out.close();
}
splitsWritten.getAndIncrement();
long elapsed = Time.monotonicNow() - now;
Expand Down

0 comments on commit c260286

Please sign in to comment.