kadirozde commented on code in PR #5545:
URL: https://github.com/apache/hbase/pull/5545#discussion_r1545470519
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileWriter.java:
##########
@@ -256,156 +234,571 @@ public void appendMobMetadata(SetMultimap<TableName,
String> mobRefSet) throws I
public void appendTrackedTimestampsToMetadata() throws IOException {
// TODO: The StoreFileReader always converts the byte[] to TimeRange
// via TimeRangeTracker, so we should write the serialization data of
TimeRange directly.
- appendFileInfo(TIMERANGE_KEY,
TimeRangeTracker.toByteArray(timeRangeTracker));
- appendFileInfo(EARLIEST_PUT_TS, Bytes.toBytes(earliestPutTs));
+ liveFileWriter.appendTrackedTimestampsToMetadata();
+ if (historicalFileWriter != null) {
+ historicalFileWriter.appendTrackedTimestampsToMetadata();
+ }
}
/**
* Record the earlest Put timestamp. If the timeRangeTracker is not set,
update TimeRangeTracker
* to include the timestamp of this key
*/
public void trackTimestamps(final Cell cell) {
- if (KeyValue.Type.Put.getCode() == cell.getTypeByte()) {
- earliestPutTs = Math.min(earliestPutTs, cell.getTimestamp());
+ liveFileWriter.trackTimestamps(cell);
+ if (historicalFileWriter != null) {
+ historicalFileWriter.trackTimestamps(cell);
}
- timeRangeTracker.includeTimestamp(cell);
}
- private void appendGeneralBloomfilter(final Cell cell) throws IOException {
- if (this.generalBloomFilterWriter != null) {
- /*
- *
http://2.bp.blogspot.com/_Cib_A77V54U/StZMrzaKufI/AAAAAAAAADo/ZhK7bGoJdMQ/s400/KeyValue.png
- * Key = RowLen + Row + FamilyLen + Column [Family + Qualifier] +
Timestamp 3 Types of
- * Filtering: 1. Row = Row 2. RowCol = Row + Qualifier 3.
RowPrefixFixedLength = Fixed Length
- * Row Prefix
- */
- bloomContext.writeBloom(cell);
+ @Override
+ public void beforeShipped() throws IOException {
+ liveFileWriter.beforeShipped();
+ if (historicalFileWriter != null) {
+ historicalFileWriter.beforeShipped();
}
}
- private void appendDeleteFamilyBloomFilter(final Cell cell) throws
IOException {
- if (!PrivateCellUtil.isDeleteFamily(cell) &&
!PrivateCellUtil.isDeleteFamilyVersion(cell)) {
- return;
- }
+ public Path getPath() {
+ return liveFileWriter.getPath();
Review Comment:
I had to introduce another method called getPaths to get the list of paths,
that is , up to two paths, one for the live file and the other for the
historical file. getPath is currently called by the compactions that do not
support dual file writing yet.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]