Skip to content
Closed
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 @@ -75,8 +75,6 @@ public final class OzoneConsts {
"/serviceList";
public static final String OZONE_DB_CHECKPOINT_HTTP_ENDPOINT =
"/dbCheckpoint";
public static final String OZONE_DB_CHECKPOINT_HTTP_ENDPOINT_V2 =
"/v2/dbCheckpoint";

// Ozone File System scheme
public static final String OZONE_URI_SCHEME = "o3fs";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static org.apache.hadoop.hdds.utils.HddsServerUtil.writeDBCheckpointToStream;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_REQUEST_FLUSH;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_REQUEST_TO_EXCLUDE_SST;
import static org.apache.hadoop.ozone.OzoneConsts.ROCKSDB_SST_SUFFIX;

import com.google.common.annotations.VisibleForTesting;
import java.io.File;
Expand Down Expand Up @@ -278,18 +277,7 @@ public void processMetadataSnapshotRequest(HttpServletRequest request, HttpServl
}
}

protected static Set<String> extractSstFilesToExclude(String[] filesInExclusionParam) {
Set<String> sstFilesToExclude = new HashSet<>();
if (filesInExclusionParam != null) {
sstFilesToExclude.addAll(
Arrays.stream(filesInExclusionParam).filter(s -> s.endsWith(ROCKSDB_SST_SUFFIX))
.distinct().collect(Collectors.toList()));
logSstFileList(sstFilesToExclude, "Received list of {} SST files to be excluded{}: {}", 5);
}
return sstFilesToExclude;
}

protected static Set<String> extractFilesToExclude(String[] sstParam) {
protected static Set<String> extractSstFilesToExclude(String[] sstParam) {
Set<String> receivedSstFiles = new HashSet<>();
if (sstParam != null) {
receivedSstFiles.addAll(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.hadoop.ozone.om.helpers;

import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_HTTP_ENDPOINT_V2;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_HTTP_ENDPOINT;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_INCLUDE_SNAPSHOT_DATA;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_REQUEST_FLUSH;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_ADDRESS_KEY;
Expand Down Expand Up @@ -189,7 +189,7 @@ public URL getOMDBCheckpointEndpointUrl(boolean isHttp, boolean flush)
URIBuilder urlBuilder = new URIBuilder().
setScheme(isHttp ? "http" : "https").
setHost(isHttp ? getHttpAddress() : getHttpsAddress()).
setPath(OZONE_DB_CHECKPOINT_HTTP_ENDPOINT_V2).
setPath(OZONE_DB_CHECKPOINT_HTTP_ENDPOINT).
addParameter(OZONE_DB_CHECKPOINT_INCLUDE_SNAPSHOT_DATA, "true").
addParameter(OZONE_DB_CHECKPOINT_REQUEST_FLUSH,
flush ? "true" : "false");
Expand Down
38 changes: 0 additions & 38 deletions hadoop-ozone/dist/src/main/compose/xcompat/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@ _read() {
compatibility/read.robot
}

_test_checkpoint_compatibility() {
_kinit
execute_robot_test ${container} -N "xcompat-cluster-${cluster_version}-client-${client_version}-checkpoint" \
-v CLIENT_VERSION:${client_version} \
-v CLUSTER_VERSION:${cluster_version} \
-v TEST_DATA_DIR:/testdata \
compatibility/checkpoint.robot
}

test_cross_compatibility() {
echo "Starting ${cluster_version} cluster with COMPOSE_FILE=${COMPOSE_FILE}"

Expand Down Expand Up @@ -116,35 +107,6 @@ test_cross_compatibility() {
done
done

# Add checkpoint compatibility tests (only for clusters that support checkpoint endpoints)
# Skip checkpoint tests for very old clusters that don't have the endpoints
if [[ "${cluster_version}" < "2.0.0" ]]; then
echo "Skipping checkpoint compatibility tests for cluster ${cluster_version} (checkpoint endpoints not available)"
else
echo ""
echo "=========================================="
echo "Running checkpoint compatibility tests"
echo "=========================================="

# Test 2.0.0 client (if available)
for client_version in "$@"; do
if [[ "${client_version}" == "2.0.0" ]]; then
echo "Testing 2.0.0 client against ${cluster_version} cluster"
client _test_checkpoint_compatibility
break # Only test 2.0 once
fi
done

# Test current client (if different from 2.0.0 and available)
for client_version in "$@"; do
if [[ "${client_version}" == "${current_version}" ]]; then
echo "Testing ${current_version} client against ${cluster_version} cluster"
client _test_checkpoint_compatibility
break # Only test current version once
fi
done
fi

KEEP_RUNNING=false stop_docker_env
}

Expand Down
110 changes: 0 additions & 110 deletions hadoop-ozone/dist/src/main/smoketest/compatibility/checkpoint.robot

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.hadoop.ozone.recon;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_HTTP_ENDPOINT_V2;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_HTTP_ENDPOINT;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand Down Expand Up @@ -119,7 +119,7 @@ public void testReconGetsSnapshotFromLeader() throws Exception {
String expectedUrl = "http://" +
(hostname.equals("0.0.0.0") ? "localhost" : hostname) + ":" +
ozoneManager.get().getHttpServer().getHttpAddress().getPort() +
OZONE_DB_CHECKPOINT_HTTP_ENDPOINT_V2;
OZONE_DB_CHECKPOINT_HTTP_ENDPOINT;
String snapshotUrl = impl.getOzoneManagerSnapshotUrl();
assertEquals(expectedUrl, snapshotUrl);
// Write some data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void processMetadataSnapshotRequest(HttpServletRequest request, HttpServl
String[] sstParam = isFormData ?
parseFormDataParameters(request) : request.getParameterValues(
OZONE_DB_CHECKPOINT_REQUEST_TO_EXCLUDE_SST);
Set<String> receivedSstFiles = extractFilesToExclude(sstParam);
Set<String> receivedSstFiles = extractSstFilesToExclude(sstParam);
Path tmpdir = null;
try (BootstrapStateHandler.Lock lock = getBootstrapStateLock().lock()) {
tmpdir = Files.createTempDirectory(getBootstrapTempData().toPath(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.apache.hadoop.ozone.om;

import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_HTTP_ENDPOINT;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_HTTP_ENDPOINT_V2;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_OM_SERVICE_LIST_HTTP_ENDPOINT;

import java.io.IOException;
Expand All @@ -37,8 +36,6 @@ public OzoneManagerHttpServer(MutableConfigurationSource conf,
addServlet("serviceList", OZONE_OM_SERVICE_LIST_HTTP_ENDPOINT,
ServiceListJSONServlet.class);
addServlet("dbCheckpoint", OZONE_DB_CHECKPOINT_HTTP_ENDPOINT,
OMDBCheckpointServlet.class);
addServlet("dbCheckpointv2", OZONE_DB_CHECKPOINT_HTTP_ENDPOINT_V2,
OMDBCheckpointServletInodeBasedXfer.class);
getWebAppContext().setAttribute(OzoneConsts.OM_CONTEXT_ATTRIBUTE, om);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.hadoop.ozone.recon.spi.impl;

import static org.apache.hadoop.hdds.recon.ReconConfigKeys.OZONE_RECON_DB_DIRS_PERMISSIONS_DEFAULT;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_HTTP_ENDPOINT_V2;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_HTTP_ENDPOINT;
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_REQUEST_FLUSH;
import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OM_HTTP_AUTH_TYPE;
import static org.apache.hadoop.ozone.recon.ReconConstants.RECON_OM_SNAPSHOT_DB;
Expand Down Expand Up @@ -197,11 +197,11 @@ public OzoneManagerServiceProviderImpl(
HttpConfig.Policy policy = HttpConfig.getHttpPolicy(configuration);

omDBSnapshotUrl = "http://" + ozoneManagerHttpAddress +
OZONE_DB_CHECKPOINT_HTTP_ENDPOINT_V2;
OZONE_DB_CHECKPOINT_HTTP_ENDPOINT;

if (policy.isHttpsEnabled()) {
omDBSnapshotUrl = "https://" + ozoneManagerHttpsAddress +
OZONE_DB_CHECKPOINT_HTTP_ENDPOINT_V2;
OZONE_DB_CHECKPOINT_HTTP_ENDPOINT;
}

boolean flushParam = configuration.getBoolean(
Expand Down Expand Up @@ -414,7 +414,7 @@ public String getOzoneManagerSnapshotUrl() throws IOException {
omLeaderUrl = (policy.isHttpsEnabled() ?
"https://" + info.getServiceAddress(Type.HTTPS) :
"http://" + info.getServiceAddress(Type.HTTP)) +
OZONE_DB_CHECKPOINT_HTTP_ENDPOINT_V2;
OZONE_DB_CHECKPOINT_HTTP_ENDPOINT;
}
}
}
Expand Down