Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Backport some fixes from master to ozone-1.4 #6553

Merged
merged 17 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a9e7ab9
HDDS-10496. Fetch dependencies for cache using actual build (#6359)
adoroszlai Mar 15, 2024
2f5db3a
HDDS-9802. Tool to fix corrupted snapshot chain (#6386)
hemantk-12 Mar 19, 2024
6a31ccd
HDDS-10552. Downgrade Surefire to 3.0.0-M4 (#6406)
adoroszlai Mar 20, 2024
fe73d70
HDDS-10477. Make Rocksdb tools native lib compatible with all chipset…
swamirishi Mar 21, 2024
2f002cd
HDDS-9426. Calculate Exclusive size for deep cleaned snapshot's delet…
aswinshakil Jan 27, 2024
190dcde
HDDS-10590. [Snapshot] Synchronized snapshot purge, set snapshot prop…
hemantk-12 Apr 3, 2024
7c78759
HDDS-9200. [Snapshot] Added logs and metrics for snapshot purge and s…
hemantk-12 Apr 3, 2024
2219833
HDDS-10669. Bump axios to 0.28.0 (#6242)
dependabot[bot] Apr 9, 2024
542adc7
HDDS-10672. Bump express to 4.19.2 (#6442)
dependabot[bot] Apr 10, 2024
70abad0
HDDS-10673. Bump es5-ext to 0.10.64 (#6284)
dependabot[bot] Apr 10, 2024
4e78ea8
HDDS-10674. Bump ip to 1.1.9 (#6243)
dependabot[bot] Apr 10, 2024
bd72ade
HDDS-10676. Bump browserify-sign to 4.2.3 (#6509)
dependabot[bot] Apr 10, 2024
487d40f
HDDS-10677. Bump plotly.js to 2.25.2 (#5915)
dependabot[bot] Apr 10, 2024
727ef2c
HDDS-10630. Add missing parent directories deleted between initiate a…
SaketaChalamchala Apr 12, 2024
966fe53
HDDS-10692. ozone s3 getsecret prints some internal details (#6531)
adoroszlai Apr 17, 2024
78cfb9a
HDDS-10680. Duplicate delete key blocks sent to SCM (#6513)
ChenSammi Apr 17, 2024
c6f9084
HDDS-10717. nodeFailureTimeoutMs should be initialized before syncTim…
ivandika3 Apr 19, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/populate-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Fetch dependencies
if: steps.restore-cache.outputs.cache-hit != 'true'
run: mvn --batch-mode --fail-never --no-transfer-progress --show-version dependency:go-offline
run: mvn --batch-mode --fail-never --no-transfer-progress --show-version -Pgo-offline -Pdist clean verify

- name: Delete Ozone jars from repo
if: steps.restore-cache.outputs.cache-hit != 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static void close(Logger logger, AutoCloseable... closeables) {
* Close each argument, catching exceptions and logging them as error.
*/
public static void close(Logger logger,
Collection<AutoCloseable> closeables) {
Collection<? extends AutoCloseable> closeables) {
if (closeables == null) {
return;
}
Expand All @@ -95,7 +95,7 @@ public static void closeQuietly(AutoCloseable... closeables) {
/**
* Close each argument, swallowing exceptions.
*/
public static void closeQuietly(Collection<AutoCloseable> closeables) {
public static void closeQuietly(Collection<? extends AutoCloseable> closeables) {
close(null, closeables);
}
}
19 changes: 19 additions & 0 deletions hadoop-hdds/common/src/main/resources/ozone-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3532,6 +3532,25 @@
</description>
</property>

<property>
<name>ozone.snapshot.directory.service.timeout</name>
<value>300s</value>
<tag>OZONE, PERFORMANCE, OM</tag>
<description>
Timeout value for SnapshotDirectoryCleaningService.
</description>
</property>

<property>
<name>ozone.snapshot.directory.service.interval</name>
<value>24h</value>
<tag>OZONE, PERFORMANCE, OM</tag>
<description>
The time interval between successive SnapshotDirectoryCleaningService
thread run.
</description>
</property>

<property>
<name>ozone.scm.event.ContainerReport.thread.pool.size</name>
<value>10</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ private XceiverServerRatis(DatanodeDetails dd,
this.streamEnable = conf.getBoolean(
OzoneConfigKeys.DFS_CONTAINER_RATIS_DATASTREAM_ENABLED,
OzoneConfigKeys.DFS_CONTAINER_RATIS_DATASTREAM_ENABLED_DEFAULT);
RaftProperties serverProperties = newRaftProperties();
this.context = context;
this.dispatcher = dispatcher;
this.containerController = containerController;
Expand All @@ -184,6 +183,7 @@ private XceiverServerRatis(DatanodeDetails dd,
shouldDeleteRatisLogDirectory =
ratisServerConfig.shouldDeleteRatisLogDirectory();

RaftProperties serverProperties = newRaftProperties();
this.server =
RaftServer.newBuilder().setServerId(raftPeerId)
.setProperties(serverProperties)
Expand Down
3 changes: 2 additions & 1 deletion hadoop-hdds/rocks-native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@
<arg line="${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}"/>
</exec>
<exec executable="make" dir="${project.build.directory}/rocksdb/rocksdb-${rocksdb.version}" failonerror="true">
<arg line="DEBUG_LEVEL=0"/>
<arg line="PORTABLE=1"/>
<arg line="DEBUG_LEVEL=0"/>
<arg line="EXTRA_CXXFLAGS='-fPIC -I${project.build.directory}/snappy/lib -I${project.build.directory}/snappy/snappy-${snappy.version} -I${project.build.directory}/lz4/lz4-${lz4.version}/lib -I${project.build.directory}/zstd/zstd-${zstd.version}/lib -I${project.build.directory}/zstd/zstd-${zstd.version}/lib/dictBuilder -I${project.build.directory}/bzip2/bzip2-${bzip2.version} -I${project.build.directory}/zlib/zlib-${zlib.version}'"/>
<arg line="EXTRA_LDFLAGS='-L${project.build.directory}/snappy/lib -L${project.build.directory}/lz4/lz4-${lz4.version}/lib -L${project.build.directory}/zstd/zstd-${zstd.version}/lib -L${project.build.directory}/bzip2/bzip2-${bzip2.version} -L${project.build.directory}/zlib/zlib-${zlib.version}'"/>
<arg line="-j${system.numCores}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,18 @@ private OMConfigKeys() {
public static final String OZONE_DIR_DELETING_SERVICE_INTERVAL_DEFAULT
= "60s";

/**
* Configuration properties for Snapshot Directory Service.
*/
public static final String OZONE_SNAPSHOT_DIRECTORY_SERVICE_INTERVAL =
"ozone.snapshot.directory.service.interval";
public static final String OZONE_SNAPSHOT_DIRECTORY_SERVICE_INTERVAL_DEFAULT
= "24h";
public static final String OZONE_SNAPSHOT_DIRECTORY_SERVICE_TIMEOUT =
"ozone.snapshot.directory.service.timeout";
public static final String
OZONE_SNAPSHOT_DIRECTORY_SERVICE_TIMEOUT_DEFAULT = "300s";

public static final String OZONE_PATH_DELETING_LIMIT_PER_TASK =
"ozone.path.deleting.limit.per.task";
// default is 6000 taking account of 32MB buffer size, and assuming
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ public S3Secret getProtobuf() {

@Override
public String toString() {
return "awsAccessKey=" + kerberosID + "\nawsSecret=" + awsSecret +
"\nisDeleted=" + isDeleted + "\ntransactionLogIndex=" +
transactionLogIndex;
return "awsAccessKey=" + kerberosID + "\nawsSecret=" + awsSecret;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
* This class is used for storing info related to Snapshots.
*
* Each snapshot created has an associated SnapshotInfo entry
* containing the snapshotid, snapshot path,
* snapshot checkpoint directory, previous snapshotid
* containing the snapshotId, snapshot path,
* snapshot checkpoint directory, previous snapshotId
* for the snapshot path & global amongst other necessary fields.
*/
public final class SnapshotInfo implements Auditable, CopyObject<SnapshotInfo> {
Expand Down Expand Up @@ -123,6 +123,7 @@ public static SnapshotStatus valueOf(SnapshotStatusProto status) {
private long referencedReplicatedSize;
private long exclusiveSize;
private long exclusiveReplicatedSize;
private boolean deepCleanedDeletedDir;
hemantk-12 marked this conversation as resolved.
Show resolved Hide resolved

/**
* Private constructor, constructed via builder.
Expand Down Expand Up @@ -162,7 +163,8 @@ private SnapshotInfo(UUID snapshotId,
long referencedSize,
long referencedReplicatedSize,
long exclusiveSize,
long exclusiveReplicatedSize) {
long exclusiveReplicatedSize,
boolean deepCleanedDeletedDir) {
this.snapshotId = snapshotId;
this.name = name;
this.volumeName = volumeName;
Expand All @@ -181,6 +183,7 @@ private SnapshotInfo(UUID snapshotId,
this.referencedReplicatedSize = referencedReplicatedSize;
this.exclusiveSize = exclusiveSize;
this.exclusiveReplicatedSize = exclusiveReplicatedSize;
this.deepCleanedDeletedDir = deepCleanedDeletedDir;
}

public void setName(String name) {
Expand Down Expand Up @@ -285,7 +288,7 @@ public void setSstFiltered(boolean sstFiltered) {
}

public SnapshotInfo.Builder toBuilder() {
return new SnapshotInfo.Builder()
return new Builder()
.setSnapshotId(snapshotId)
.setName(name)
.setVolumeName(volumeName)
Expand All @@ -302,7 +305,8 @@ public SnapshotInfo.Builder toBuilder() {
.setReferencedSize(referencedSize)
.setReferencedReplicatedSize(referencedReplicatedSize)
.setExclusiveSize(exclusiveSize)
.setExclusiveReplicatedSize(exclusiveReplicatedSize);
.setExclusiveReplicatedSize(exclusiveReplicatedSize)
.setDeepCleanedDeletedDir(deepCleanedDeletedDir);
}

/**
Expand All @@ -327,6 +331,7 @@ public static class Builder {
private long referencedReplicatedSize;
private long exclusiveSize;
private long exclusiveReplicatedSize;
private boolean deepCleanedDeletedDir;

public Builder() {
// default values
Expand Down Expand Up @@ -423,6 +428,11 @@ public Builder setExclusiveReplicatedSize(long exclusiveReplicatedSize) {
return this;
}

public Builder setDeepCleanedDeletedDir(boolean deepCleanedDeletedDir) {
this.deepCleanedDeletedDir = deepCleanedDeletedDir;
return this;
}

public SnapshotInfo build() {
Preconditions.checkNotNull(name);
return new SnapshotInfo(
Expand All @@ -443,7 +453,8 @@ public SnapshotInfo build() {
referencedSize,
referencedReplicatedSize,
exclusiveSize,
exclusiveReplicatedSize
exclusiveReplicatedSize,
deepCleanedDeletedDir
);
}
}
Expand All @@ -465,7 +476,8 @@ public OzoneManagerProtocolProtos.SnapshotInfo getProtobuf() {
.setReferencedSize(referencedSize)
.setReferencedReplicatedSize(referencedReplicatedSize)
.setExclusiveSize(exclusiveSize)
.setExclusiveReplicatedSize(exclusiveReplicatedSize);
.setExclusiveReplicatedSize(exclusiveReplicatedSize)
.setDeepCleanedDeletedDir(deepCleanedDeletedDir);

if (pathPreviousSnapshotId != null) {
sib.setPathPreviousSnapshotID(toProtobuf(pathPreviousSnapshotId));
Expand Down Expand Up @@ -538,6 +550,11 @@ public static SnapshotInfo getFromProtobuf(
snapshotInfoProto.getExclusiveReplicatedSize());
}

if (snapshotInfoProto.hasDeepCleanedDeletedDir()) {
osib.setDeepCleanedDeletedDir(
snapshotInfoProto.getDeepCleanedDeletedDir());
}

osib.setSnapshotPath(snapshotInfoProto.getSnapshotPath())
.setCheckpointDir(snapshotInfoProto.getCheckpointDir())
.setDbTxSequenceNumber(snapshotInfoProto.getDbTxSequenceNumber());
Expand Down Expand Up @@ -622,6 +639,14 @@ public long getExclusiveReplicatedSize() {
return exclusiveReplicatedSize;
}

public boolean getDeepCleanedDeletedDir() {
return deepCleanedDeletedDir;
}

public void setDeepCleanedDeletedDir(boolean deepCleanedDeletedDir) {
this.deepCleanedDeletedDir = deepCleanedDeletedDir;
}

/**
* Generate default name of snapshot, (used if user doesn't provide one).
*/
Expand Down Expand Up @@ -655,7 +680,8 @@ public static SnapshotInfo newInstance(String volumeName,
.setSnapshotPath(volumeName + OM_KEY_PREFIX + bucketName)
.setVolumeName(volumeName)
.setBucketName(bucketName)
.setDeepClean(true);
.setDeepClean(false)
.setDeepCleanedDeletedDir(false);

if (snapshotId != null) {
builder.setCheckpointDir(getCheckpointDirName(snapshotId));
Expand Down Expand Up @@ -688,7 +714,8 @@ public boolean equals(Object o) {
referencedSize == that.referencedSize &&
referencedReplicatedSize == that.referencedReplicatedSize &&
exclusiveSize == that.exclusiveSize &&
exclusiveReplicatedSize == that.exclusiveReplicatedSize;
exclusiveReplicatedSize == that.exclusiveReplicatedSize &&
deepCleanedDeletedDir == that.deepCleanedDeletedDir;
}

@Override
Expand All @@ -699,7 +726,7 @@ public int hashCode() {
globalPreviousSnapshotId, snapshotPath, checkpointDir,
deepClean, sstFiltered,
referencedSize, referencedReplicatedSize,
exclusiveSize, exclusiveReplicatedSize);
exclusiveSize, exclusiveReplicatedSize, deepCleanedDeletedDir);
}

/**
Expand All @@ -726,14 +753,15 @@ public SnapshotInfo copyObject() {
.setReferencedReplicatedSize(referencedReplicatedSize)
.setExclusiveSize(exclusiveSize)
.setExclusiveReplicatedSize(exclusiveReplicatedSize)
.setDeepCleanedDeletedDir(deepCleanedDeletedDir)
.build();
}

@Override
public String toString() {
return "SnapshotInfo{" +
"snapshotId: '" + snapshotId + '\'' +
", name: '" + name + "'," +
", name: '" + name + '\'' +
", volumeName: '" + volumeName + '\'' +
", bucketName: '" + bucketName + '\'' +
", snapshotStatus: '" + snapshotStatus + '\'' +
Expand All @@ -750,6 +778,7 @@ public String toString() {
", referencedReplicatedSize: '" + referencedReplicatedSize + '\'' +
", exclusiveSize: '" + exclusiveSize + '\'' +
", exclusiveReplicatedSize: '" + exclusiveReplicatedSize + '\'' +
", deepCleanedDeletedDir: '" + deepCleanedDeletedDir + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ private SnapshotInfo createSnapshotInfo() {
.setSnapshotPath(SNAPSHOT_PATH)
.setCheckpointDir(CHECKPOINT_DIR)
.setDbTxSequenceNumber(DB_TX_SEQUENCE_NUMBER)
.setDeepClean(true)
.setDeepClean(false)
.setSstFiltered(false)
.setReferencedSize(2000L)
.setReferencedReplicatedSize(6000L)
.setExclusiveSize(1000L)
.setExclusiveReplicatedSize(3000L)
.setDeepCleanedDeletedDir(false)
.build();
}

Expand All @@ -89,12 +90,13 @@ private OzoneManagerProtocolProtos.SnapshotInfo createSnapshotInfoProto() {
.setSnapshotPath(SNAPSHOT_PATH)
.setCheckpointDir(CHECKPOINT_DIR)
.setDbTxSequenceNumber(DB_TX_SEQUENCE_NUMBER)
.setDeepClean(true)
.setDeepClean(false)
.setSstFiltered(false)
.setReferencedSize(2000L)
.setReferencedReplicatedSize(6000L)
.setExclusiveSize(1000L)
.setExclusiveReplicatedSize(3000L)
.setDeepCleanedDeletedDir(false)
.build();
}

Expand Down Expand Up @@ -140,6 +142,9 @@ public void testSnapshotInfoToProto() {
Assertions.assertEquals(
snapshotInfoEntryExpected.getExclusiveReplicatedSize(),
snapshotInfoEntryActual.getExclusiveReplicatedSize());
Assertions.assertEquals(
snapshotInfoEntryExpected.getDeepCleanedDeletedDir(),
snapshotInfoEntryActual.getDeepCleanedDeletedDir());

Assertions.assertEquals(snapshotInfoEntryExpected, snapshotInfoEntryActual);
}
Expand Down Expand Up @@ -176,6 +181,8 @@ public void testSnapshotInfoProtoToSnapshotInfo() {
snapshotInfoActual.getExclusiveSize());
Assertions.assertEquals(snapshotInfoExpected.getExclusiveReplicatedSize(),
snapshotInfoActual.getExclusiveReplicatedSize());
Assertions.assertEquals(snapshotInfoExpected.getDeepCleanedDeletedDir(),
snapshotInfoActual.getDeepCleanedDeletedDir());

Assertions.assertEquals(snapshotInfoExpected, snapshotInfoActual);
}
Expand Down
2 changes: 2 additions & 0 deletions hadoop-ozone/dist/src/main/smoketest/security/S3-secret.robot
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ GetSecret success
${output}= Execute ozone s3 getsecret -u testuser2
Should contain ${output} awsAccessKey
Should contain ${output} awsSecret
Should not contain ${output} isDeleted
Should not contain ${output} transactionLogIndex

GetSecret failure
${output2}= Execute and Ignore Error ozone s3 getsecret -u testuser2
Expand Down
6 changes: 6 additions & 0 deletions hadoop-ozone/dist/src/shell/ozone/ozone
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function ozone_usage
ozone_add_subcommand "dtutil" client "operations related to delegation tokens"
ozone_add_subcommand "admin" client "Ozone admin tool"
ozone_add_subcommand "debug" client "Ozone debug tool"
ozone_add_subcommand "repair" client "Ozone repair tool"
ozone_add_subcommand "checknative" client "checks if native libraries are loaded"

ozone_generate_usage "${OZONE_SHELL_EXECNAME}" false
Expand Down Expand Up @@ -236,6 +237,11 @@ function ozonecmd_case
OZONE_DEBUG_OPTS="${OZONE_DEBUG_OPTS} ${OZONE_MODULE_ACCESS_ARGS}"
OZONE_RUN_ARTIFACT_NAME="ozone-tools"
;;
repair)
OZONE_CLASSNAME=org.apache.hadoop.ozone.repair.OzoneRepair
OZONE_DEBUG_OPTS="${OZONE_DEBUG_OPTS} ${OZONE_MODULE_ACCESS_ARGS}"
OZONE_RUN_ARTIFACT_NAME="ozone-tools"
;;
checknative)
OZONE_CLASSNAME=org.apache.hadoop.ozone.shell.checknative.CheckNative
OZONE_RUN_ARTIFACT_NAME="ozone-tools"
Expand Down
5 changes: 0 additions & 5 deletions hadoop-ozone/fault-injection-test/mini-chaos-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<artifactId>junit-jupiter-migrationsupport</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions hadoop-ozone/integration-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
<artifactId>junit-jupiter-migrationsupport</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
Expand Down
Loading
Loading