Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a383c2b
HDDS-12501. Remove OMKeyInfo from SST files in backup directory.
Apr 2, 2025
37edeeb
HDDS-12501. Added Read/Write SSt File lock.
Apr 7, 2025
73e0d2a
HDDS-12501. Used BlockingQueue to prune backup SST files on compactio…
Apr 18, 2025
d311255
HDDS-12501. Added Test cases. Addressed comments.
Apr 29, 2025
2922ba6
Merge branch 'master' into HDDS-12501
SaketaChalamchala Apr 29, 2025
53c6185
HDDS-12501. Findbugs and pmd fix.
Apr 30, 2025
7cfbb1d
HDDS-12501. More findbugs fixes. Fixed exception handling.
Apr 30, 2025
17d24c1
HDDS-12501. Removed locks and native library loader optimization.
May 1, 2025
cb90a23
HDDS-12501. Fixed integration(snapshot) test.
May 1, 2025
453111f
Merge branch 'master' into HDDS-12501
SaketaChalamchala May 1, 2025
d833f8a
HDDS-12501. Simplified Exception handling.
May 7, 2025
fe4ee50
Merge branch 'master' into HDDS-12501
SaketaChalamchala May 7, 2025
e2f8821
HDDS-12501. Fixed findbugs and compilation issue.
May 7, 2025
b11fe0a
HDDS-12501. Fixed unit test.
May 7, 2025
dbea358
HDDS-12501. findbugs fixes.
May 7, 2025
2272837
HDDS-12501. Addressed comments.
May 9, 2025
13e6465
HDDS-12501. Moved pruning to a separate function. Added CompactionLog…
May 12, 2025
97ac54f
Apply suggestions from code review
SaketaChalamchala May 12, 2025
e1487b6
Update toBuilder()
SaketaChalamchala May 12, 2025
1a774a5
HDDS-12501. Fixed checkstyle and build issue.
May 12, 2025
6aa7525
Delete hadoop-ozone/integration-test/audit.log
SaketaChalamchala May 12, 2025
1bddeef
Merge branch 'apache:master' into HDDS-12501
SaketaChalamchala May 13, 2025
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 @@ -639,6 +639,17 @@ public final class OzoneConfigKeys {
OZONE_OM_SNAPSHOT_PRUNE_COMPACTION_DAG_DAEMON_RUN_INTERVAL_DEFAULT =
TimeUnit.HOURS.toMillis(1);

public static final String
OZONE_OM_SNAPSHOT_PRUNE_COMPACTION_BACKUP_BATCH_SIZE =
"ozone.om.snapshot.prune.compaction.backup.batch.size";

public static final int
OZONE_OM_SNAPSHOT_PRUNE_COMPACTION_BACKUP_BATCH_SIZE_DEFAULT = 2000;

public static final String OZONE_OM_SNAPSHOT_LOAD_NATIVE_LIB =
"ozone.om.snapshot.load.native.lib";
public static final boolean OZONE_OM_SNAPSHOT_LOAD_NATIVE_LIB_DEFAULT = true;

public static final String OZONE_OM_DELTA_UPDATE_DATA_SIZE_MAX_LIMIT =
"ozone.om.delta.update.data.size.max.limit";
public static final String
Expand Down
10 changes: 10 additions & 0 deletions hadoop-hdds/common/src/main/resources/ozone-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4335,6 +4335,16 @@
</description>
</property>

<property>
<name>ozone.om.snapshot.prune.compaction.backup.batch.size</name>
<value>2000</value>
<tag>OZONE, OM</tag>
<description>
Prune SST files in Compaction backup directory in batches every
ozone.om.snapshot.compaction.dag.prune.daemon.run.interval.
</description>
</property>

<property>
<name>ozone.om.snapshot.compaction.dag.prune.daemon.run.interval</name>
<value>3600s</value>
Expand Down
1 change: 1 addition & 0 deletions hadoop-hdds/interface-client/src/main/proto/hdds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ message CompactionFileInfoProto {
optional string startKey = 2;
optional string endKey = 3;
optional string columnFamily = 4;
optional bool pruned = 5;
}

message CompactionLogEntryProto {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,26 @@ public final class CompactionFileInfo {
private final String startKey;
private final String endKey;
private final String columnFamily;
private boolean pruned;

@VisibleForTesting
public CompactionFileInfo(String fileName,
String startRange,
String endRange,
String columnFamily) {
this(fileName, startRange, endRange, columnFamily, false);
}

public CompactionFileInfo(String fileName,
String startRange,
String endRange,
String columnFamily,
boolean pruned) {
this.fileName = fileName;
this.startKey = startRange;
this.endKey = endRange;
this.columnFamily = columnFamily;
this.pruned = pruned;
}

public String getFileName() {
Expand All @@ -60,10 +70,19 @@ public String getColumnFamily() {
return columnFamily;
}

public boolean isPruned() {
return pruned;
}

public void setPruned() {
this.pruned = true;
}

public HddsProtos.CompactionFileInfoProto getProtobuf() {
HddsProtos.CompactionFileInfoProto.Builder builder =
HddsProtos.CompactionFileInfoProto.newBuilder()
.setFileName(fileName);
.setFileName(fileName)
.setPruned(pruned);
if (startKey != null) {
builder = builder.setStartKey(startKey);
}
Expand All @@ -89,14 +108,17 @@ public static CompactionFileInfo getFromProtobuf(
if (proto.hasColumnFamily()) {
builder.setColumnFamily(proto.getColumnFamily());
}
if (proto.hasPruned() && proto.getPruned()) {
builder.setPruned();
}

return builder.build();
}

@Override
public String toString() {
return String.format("fileName: '%s', startKey: '%s', endKey: '%s'," +
" columnFamily: '%s'", fileName, startKey, endKey, columnFamily);
" columnFamily: '%s', isPruned: '%b'", fileName, startKey, endKey, columnFamily, pruned);
}

/**
Expand All @@ -107,6 +129,7 @@ public static class Builder {
private String startRange;
private String endRange;
private String columnFamily;
private boolean pruned = false;

public Builder(String fileName) {
Preconditions.checkNotNull(fileName, "FileName is required parameter.");
Expand Down Expand Up @@ -138,6 +161,11 @@ public Builder setValues(LiveFileMetaData fileMetaData) {
return this;
}

public Builder setPruned() {
this.pruned = true;
return this;
}

public CompactionFileInfo build() {
if ((startRange != null || endRange != null || columnFamily != null) &&
(startRange == null || endRange == null || columnFamily == null)) {
Expand All @@ -149,7 +177,7 @@ public CompactionFileInfo build() {
}

return new CompactionFileInfo(fileName, startRange, endRange,
columnFamily);
columnFamily, pruned);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,23 @@ public String toString() {
inputFileInfoList, outputFileInfoList, compactionReason);
}

public Builder toBuilder() {
Builder builder = new Builder(this.getDbSequenceNumber(), this.getCompactionTime(),
this.getInputFileInfoList(), this.getOutputFileInfoList());
String reason = this.getCompactionReason();
if (this.getCompactionReason() != null) {
builder.setCompactionReason(reason);
}
return builder;
}

/**
* Builder of CompactionLogEntry.
*/
public static class Builder {
private final long dbSequenceNumber;
private final long compactionTime;
private final List<CompactionFileInfo> inputFileInfoList;
private List<CompactionFileInfo> inputFileInfoList;
private final List<CompactionFileInfo> outputFileInfoList;
private String compactionReason;

Expand All @@ -157,6 +167,11 @@ public Builder setCompactionReason(String compactionReason) {
return this;
}

public Builder updateInputFileInfoList(List<CompactionFileInfo> fileInfoList) {
this.inputFileInfoList = fileInfoList;
return this;
}

public CompactionLogEntry build() {
return new CompactionLogEntry(dbSequenceNumber, compactionTime,
inputFileInfoList, outputFileInfoList, compactionReason);
Expand Down
Loading