Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b8218b2
HDDS-9738. Display pipeline and container counts for decommissioning DN
Jan 18, 2024
a682f92
Merge branch 'apache:master' into HDDS-9738
Tejaskriya Jan 18, 2024
6bb7333
Test class NPE fix
Jan 19, 2024
5ecc245
Fix TestDecommissionStatusSubCommand test cases
Jan 24, 2024
b699f17
HDDS-10157. Download zlib fails with 403 Forbidden in CI (#6029)
adoroszlai Jan 18, 2024
ad9af72
HDDS-3849. Add tests for show rule status of scm safemode (#6027)
sadanand48 Jan 18, 2024
ea387fc
HDDS-10155. Use getOzoneKey when calculating the paths for keys (#6023)
kerneltime Jan 18, 2024
6d7817f
HDDS-10134. Avoid false positive ManagedObject leak report (#6013)
adoroszlai Jan 19, 2024
c0ecebf
HDDS-7558. Translate "Topology awareness" doc into Mandarin Chinese (…
david1859168 Jan 19, 2024
2a4d89e
HDDS-9506. Remove JUnit4 dependency (#6028)
adoroszlai Jan 19, 2024
0735482
HDDS-10139. Support to get hosts from stdin when DN is decommissionin…
YuanbenWang Jan 19, 2024
245e4dd
HDDS-10138. NPE for SstFilteringService in OMDBCheckpointServlet.Lock…
ivandika3 Jan 19, 2024
4e923af
HDDS-10159. Add test for putting key with ECReplicationConfig by shel…
YuanbenWang Jan 19, 2024
d5c1bc4
HDDS-9648. Create API to fetch info about a single datanode (#5856)
Tejaskriya Jan 19, 2024
e77a047
HDDS-9944. NSSummary commands should close OzoneClient. (#6018)
devmadhuu Jan 19, 2024
740a9a1
HDDS-10126. Remove maxFlushedTransactionsInOneIteration from OzoneMan…
szetszwo Jan 19, 2024
b493cdb
HDDS-10154. isKeyPresentInTable should use iterator constructor with …
kerneltime Jan 19, 2024
7550a9c
HDDS-9968. Avoid using Files.createTempDirectory in AbstractReconSqlD…
devmadhuu Jan 20, 2024
0eadbfd
HDDS-10162. Fix metric names in OMPerformanceMetrics (#6035)
whbing Jan 20, 2024
05c7329
HDDS-10171. Fix checkstyle:parameternumber in OzoneManagerDoubleBuffe…
szetszwo Jan 20, 2024
88afd8f
HDDS-9051. Change level of log in NetworkTopologyImpl when no nodes a…
Tejaskriya Jan 20, 2024
c75e24a
HDDS-10168. Add Ozone 1.4.0 to compatibility acceptance tests (#6040)
adoroszlai Jan 21, 2024
d160eaa
HDDS-10151. Replace single-use Random objects with RandomUtils in tes…
will-sh Jan 21, 2024
a72cd72
HDDS-10014. Fixed internal error on generating S3 secret via HTTP (#5…
myskov Jan 21, 2024
69c4629
HDDS-10080. Let junit.sh fail if no tests were matched in repeated ru…
adoroszlai Jan 22, 2024
ed2488c
HDDS-9988. Show used storage percent in SCM UI (#5882)
jianghuazhu Jan 22, 2024
3bd5e36
HDDS-10178. Shaded Jar build failure in case-insensitive filesystem (…
adoroszlai Jan 22, 2024
c3be4e9
HDDS-6796. Extract method for building OMRequest in TrashOzoneFileSys…
will-sh Jan 22, 2024
227b64b
HDDS-9345. Add CapacityPipelineChoosePolicy considering datanode stor…
whbing Jan 22, 2024
0c75610
Revert "HDDS-9426. Calculate Exclusive size for deep cleaned snapshot…
adoroszlai Jan 22, 2024
7bb17c7
HDDS-9288. Intermittent failure in TestSnapshotDeletingService#testMu…
hemantk-12 Jan 22, 2024
51d1754
HDDS-9998. Add static import for assertions and mocks in remaining oz…
raju-balpande Jan 22, 2024
fab5107
HDDS-9181. Provide documentation for Decommissioning in Ozone in Mand…
david1859168 Jan 23, 2024
d7146e8
HDDS-7557. Translate "Merge Container RocksDB in DN" doc into Mandari…
david1859168 Jan 23, 2024
06c8546
HDDS-10186. Add static import for assertions and mocks (#6067)
adoroszlai Jan 23, 2024
759f68f
HDDS-10193. Bump maven-checkstyle-plugin to 3.3.1 (#6066)
dependabot[bot] Jan 23, 2024
8cc876d
HDDS-8005. Fixed intermittent failure in TestOmSnapshot.testSnapDiffW…
hemantk-12 Jan 23, 2024
ce96203
HDDS-8649. Remove duplicate helper methods getDBMultipartOpenKey() (#…
ceekay47 Jan 23, 2024
fb28d4d
HDDS-10175. Pre-build Ozone in flaky-test-check (#6043)
adoroszlai Jan 24, 2024
a322aaf
HDDS-10042. Show IDs of under-replicated and unclosed containers for …
Tejaskriya Jan 24, 2024
5b80ce6
HDDS-10142. Add hidden command to set bucket encryption key to fix HD…
tanvipenumudy Jan 24, 2024
e2a8c14
HDDS-9738. Display pipeline and container counts for decommissioning DN
Jan 18, 2024
f864494
Fix TestDecommissionStatusSubCommand test cases
Jan 24, 2024
cfc84ff
Fix merge issues
Jan 24, 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
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,17 @@ jobs:
- build-info
- build
- basic
runs-on: ubuntu-20.04
timeout-minutes: 30
if: needs.build-info.outputs.needs-compile == 'true'
strategy:
matrix:
java: [ 11, 17, 21 ]
include:
- os: ubuntu-20.04
- java: 8
os: macos-12
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Download Ozone source tarball
uses: actions/download-artifact@v3
Expand Down
63 changes: 51 additions & 12 deletions .github/workflows/intermittent-test-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,41 @@ jobs:
printf -v x "%s," "${splits[@]}"
split_matrix="[${x%,}]"
echo "matrix=$split_matrix" >> $GITHUB_OUTPUT
build:
needs:
- prepare-job
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Cache for maven dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
!~/.m2/repository/org/apache/ozone
key: maven-repo-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-repo-
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Build (most) of Ozone
run: hadoop-ozone/dev-support/checks/build.sh -Dskip.npx -Dskip.installnpx -DskipShade
- name: Store Maven repo for tests
uses: actions/upload-artifact@v3
with:
name: ozone-repo
path: |
~/.m2/repository/org/apache/ozone
retention-days: 1
run-test:
needs: prepare-job
needs:
- prepare-job
- build
name: Run-Split
runs-on: ubuntu-20.04
strategy:
Expand All @@ -105,21 +138,33 @@ jobs:
with:
ref: ${{ github.event.inputs.ref }}
- name: Cache for maven dependencies
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: ~/.m2/repository
key: maven-repo-${{ hashFiles('**/pom.xml') }}-8-single
path: |
~/.m2/repository
!~/.m2/repository/org/apache/ozone
key: maven-repo-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-repo-${{ hashFiles('**/pom.xml') }}-8
maven-repo-${{ hashFiles('**/pom.xml') }}
maven-repo-
- name: Download Ozone repo
id: download-ozone-repo
uses: actions/download-artifact@v3
with:
name: ozone-repo
path: |
~/.m2/repository/org/apache/ozone
continue-on-error: true
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Execute tests
run: |
if [[ -e "${{ steps.download-ozone-repo.outputs.download-path }}" ]]; then
export OZONE_REPO_CACHED=true
fi

test_type=${{ needs.prepare-job.outputs.test_type }}
args="-DexcludedGroups=unhealthy"
if [ "$test_type" = "integration" ]; then
Expand All @@ -145,12 +190,6 @@ jobs:
with:
name: result-${{ env.TEST_CLASS }}-split-${{ matrix.split }}
path: target/${{ needs.prepare-job.outputs.test_type }}
- name: Delete temporary build artifacts before caching
run: |
#Never cache local artifacts
rm -rf ~/.m2/repository/org/apache/ozone/hdds*
rm -rf ~/.m2/repository/org/apache/ozone/ozone*
if: always()
count-failures:
if: ${{ always() }}
needs: run-test
Expand Down
1 change: 0 additions & 1 deletion hadoop-hdds/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
<packaging>jar</packaging>

<properties>
<allow.junit4>false</allow.junit4>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.hadoop.hdds.scm.storage;

import com.google.common.primitives.Bytes;
import org.apache.commons.lang3.RandomUtils;
import org.apache.hadoop.hdds.client.BlockID;
import org.apache.hadoop.hdds.client.ContainerBlockID;
import org.apache.hadoop.hdds.protocol.DatanodeDetails;
Expand Down Expand Up @@ -50,7 +51,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicBoolean;
Expand Down Expand Up @@ -186,9 +186,8 @@ public void testSeek() throws Exception {
assertThrows(EOFException.class, () -> seekAndVerify(finalPos));

// Seek to random positions between 0 and the block size.
Random random = new Random();
for (int i = 0; i < 10; i++) {
pos = random.nextInt(blockSize);
pos = RandomUtils.nextInt(0, blockSize);
seekAndVerify(pos);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.hadoop.ozone.client.io;

import com.google.common.collect.ImmutableSet;
import org.apache.commons.lang3.RandomUtils;
import org.apache.hadoop.hdds.client.ECReplicationConfig;
import org.apache.hadoop.hdds.protocol.DatanodeDetails;
import org.apache.hadoop.hdds.protocol.MockDatanodeDetails;
Expand All @@ -41,7 +42,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.SplittableRandom;
import java.util.concurrent.ExecutorService;
Expand Down Expand Up @@ -645,7 +645,7 @@ public void testSeekToPartialOffsetFails() {
}

private Integer getRandomStreamIndex(Set<Integer> set) {
return set.stream().skip(new Random().nextInt(set.size()))
return set.stream().skip(RandomUtils.nextInt(0, set.size()))
.findFirst().orElse(null);
}

Expand Down
1 change: 0 additions & 1 deletion hadoop-hdds/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
<packaging>jar</packaging>

<properties>
<allow.junit4>false</allow.junit4>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,17 @@ public class ScmConfig extends ReconfigurableConfig {
+ "org.apache.hadoop.hdds.scm.PipelineChoosePolicy. "
+ "The class decides which pipeline will be used to find or "
+ "allocate Ratis containers. If not set, "
+ "org.apache.hadoop.hdds.scm.pipeline.choose.algorithms. "
+ "RandomPipelineChoosePolicy will be used as default value."
+ "org.apache.hadoop.hdds.scm.pipeline.choose.algorithms."
+ "RandomPipelineChoosePolicy will be used as default value. "
+ "The following values can be used, "
+ "(1) org.apache.hadoop.hdds.scm.pipeline.choose.algorithms."
+ "RandomPipelineChoosePolicy : random choose one pipeline. "
+ "(2) org.apache.hadoop.hdds.scm.pipeline.choose.algorithms."
+ "HealthyPipelineChoosePolicy : random choose one healthy pipeline. "
+ "(3) org.apache.hadoop.hdds.scm.pipeline.choose.algorithms."
+ "CapacityPipelineChoosePolicy : choose the pipeline with lower "
+ "utilization from the two pipelines. Note that random choose "
+ "method will be executed twice in this policy."
)
private String pipelineChoosePolicyName;

Expand All @@ -85,11 +94,20 @@ public class ScmConfig extends ReconfigurableConfig {
tags = { ConfigTag.SCM, ConfigTag.PIPELINE },
description =
"The full name of class which implements "
+ "org.apache.hadoop.hdds.scm.PipelineChoosePolicy. "
+ "The class decides which pipeline will be used when "
+ "selecting an EC Pipeline. If not set, "
+ "org.apache.hadoop.hdds.scm.pipeline.choose.algorithms. "
+ "RandomPipelineChoosePolicy will be used as default value."
+ "org.apache.hadoop.hdds.scm.PipelineChoosePolicy. "
+ "The class decides which pipeline will be used when "
+ "selecting an EC Pipeline. If not set, "
+ "org.apache.hadoop.hdds.scm.pipeline.choose.algorithms."
+ "RandomPipelineChoosePolicy will be used as default value. "
+ "The following values can be used, "
+ "(1) org.apache.hadoop.hdds.scm.pipeline.choose.algorithms."
+ "RandomPipelineChoosePolicy : random choose one pipeline. "
+ "(2) org.apache.hadoop.hdds.scm.pipeline.choose.algorithms."
+ "HealthyPipelineChoosePolicy : random choose one healthy pipeline. "
+ "(3) org.apache.hadoop.hdds.scm.pipeline.choose.algorithms."
+ "CapacityPipelineChoosePolicy : choose the pipeline with lower "
+ "utilization from the two pipelines. Note that random choose "
+ "method will be executed twice in this policy."
)
private String ecPipelineChoosePolicyName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
import org.apache.commons.lang3.tuple.Pair;
import org.apache.hadoop.hdds.annotation.InterfaceStability;
import org.apache.hadoop.hdds.client.ReplicationConfig;
import org.apache.hadoop.hdds.protocol.DatanodeDetails;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos.DeletedBlocksTransactionInfo;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DecommissionScmResponseProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartContainerBalancerResponseProto;
import org.apache.hadoop.hdds.scm.DatanodeAdminError;
import org.apache.hadoop.hdds.scm.container.ContainerID;
import org.apache.hadoop.hdds.scm.container.ContainerReplicaInfo;
import org.apache.hadoop.hdds.scm.container.ReplicationManagerReport;
import org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline;
Expand All @@ -39,6 +41,7 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;

/**
* The interface to call into underlying container layer.
Expand Down Expand Up @@ -178,6 +181,14 @@ ContainerWithPipeline createContainer(HddsProtos.ReplicationType type,
HddsProtos.ReplicationFactor replicationFactor,
String owner) throws IOException;

/**
* Gets the list of underReplicated and unClosed containers on a decommissioning node.
*
* @param dn - Datanode detail
* @return Lists of underReplicated and Unclosed containers
*/
Map<String, List<ContainerID>> getContainersOnDecomNode(DatanodeDetails dn) throws IOException;

/**
* Returns a set of Nodes that meet a query criteria. Passing null for opState
* or nodeState acts like a wild card, returning all nodes in that state.
Expand All @@ -194,6 +205,14 @@ List<HddsProtos.Node> queryNode(HddsProtos.NodeOperationalState opState,
HddsProtos.NodeState nodeState, HddsProtos.QueryScope queryScope,
String poolName) throws IOException;

/**
* Returns a node with the given UUID.
* @param uuid - datanode uuid string
* @return A nodes that matches the requested UUID.
* @throws IOException
*/
HddsProtos.Node queryNode(UUID uuid) throws IOException;

/**
* Allows a list of hosts to be decommissioned. The hosts are identified
* by their hostname and optionally port in the format foo.com:port.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ private Node chooseNodeInternal(String scope, int leafIndex,
ancestorGen);

if (availableNodes <= 0) {
LOG.warn("No available node in (scope=\"{}\" excludedScope=\"{}\" " +
LOG.info("No available node in (scope=\"{}\" excludedScope=\"{}\" " +
"excludedNodes=\"{}\" ancestorGen=\"{}\").",
scopeNode.getNetworkFullPath(), excludedScopes, excludedNodes,
ancestorGen);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import org.apache.commons.lang3.tuple.Pair;
import org.apache.hadoop.hdds.client.ReplicationConfig;
import org.apache.hadoop.hdds.protocol.DatanodeDetails;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos.DeletedBlocksTransactionInfo;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DecommissionScmResponseProto;
Expand All @@ -44,6 +45,7 @@
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.UUID;

/**
* ContainerLocationProtocol is used by an HDFS node to find the set of nodes
Expand Down Expand Up @@ -219,6 +221,14 @@ List<ContainerInfo> listContainer(long startContainerID,
*/
void deleteContainer(long containerID) throws IOException;

/**
* Gets the list of underReplicated and unClosed containers on a decommissioning node.
*
* @param dn - Datanode detail
* @return Lists of underReplicated and unClosed containers
*/
Map<String, List<ContainerID>> getContainersOnDecomNode(DatanodeDetails dn) throws IOException;

/**
* Queries a list of Node Statuses. Passing a null for either opState or
* state acts like a wildcard returning all nodes in that state.
Expand All @@ -232,6 +242,8 @@ List<HddsProtos.Node> queryNode(HddsProtos.NodeOperationalState opState,
HddsProtos.NodeState state, HddsProtos.QueryScope queryScope,
String poolName, int clientVersion) throws IOException;

HddsProtos.Node queryNode(UUID uuid) throws IOException;

List<DatanodeAdminError> decommissionNodes(List<String> nodes)
throws IOException;

Expand Down
19 changes: 0 additions & 19 deletions hadoop-hdds/common/src/main/resources/ozone-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3600,25 +3600,6 @@
</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 @@ -22,7 +22,7 @@
import org.junit.jupiter.api.Test;

import java.nio.charset.StandardCharsets;
import java.util.Random;
import org.apache.commons.lang3.RandomUtils;
import java.util.zip.Checksum;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down Expand Up @@ -59,11 +59,9 @@ void testCorrectness() {

checkBytes("hello world!".getBytes(StandardCharsets.UTF_8));

final Random random = new Random();
final byte[] bytes = new byte[1 << 10];
final int len = 1 << 10;
for (int i = 0; i < 1000; i++) {
random.nextBytes(bytes);
checkBytes(bytes, random.nextInt(bytes.length));
checkBytes(RandomUtils.nextBytes(len), RandomUtils.nextInt(0, len));
}
}

Expand Down
1 change: 0 additions & 1 deletion hadoop-hdds/config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
<packaging>jar</packaging>

<properties>
<allow.junit4>false</allow.junit4>
</properties>

<dependencies>
Expand Down
1 change: 0 additions & 1 deletion hadoop-hdds/container-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
<name>Apache Ozone HDDS Container Service</name>
<packaging>jar</packaging>
<properties>
<allow.junit4>false</allow.junit4>
</properties>
<dependencies>
<dependency>
Expand Down
Loading