HBASE-30459 Add an option to account compaction throughput control by actual output (post-compression) bytes by eomiks · Pull Request #8740 · apache/hbase · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,17 @@ public static boolean shouldEnableHistoricalCompactionFiles(Configuration conf)
return false;
}

/**
* Returns the number of bytes written so far to the output(s) of this writer, including the
* historical file writer when historical compaction files are enabled. Used for output based
* compaction throughput control, which should account every byte actually written to disk.
*/
public long getPos() throws IOException {
return liveFileWriter.getPos();
long pos = liveFileWriter.getPos();
if (historicalFileWriter != null) {
pos += historicalFileWriter.getPos();
}
return pos;
}

/**
Expand Down
Loading
Loading