diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4285bac3995..ace3a7e15b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,6 +153,7 @@ jobs: retention-days: 1 - name: Store source tarball for compilation uses: actions/upload-artifact@v4 + if: needs.build-info.outputs.needs-compile == 'true' with: name: ozone-src path: hadoop-ozone/dist/target/ozone-*-src.tar.gz @@ -407,6 +408,66 @@ jobs: name: ${{ github.job }} path: target/${{ github.job }} continue-on-error: true + repro: + needs: + - build-info + - build + runs-on: ubuntu-20.04 + timeout-minutes: 30 + steps: + - name: Checkout project + uses: actions/checkout@v4 + - name: Cache for maven dependencies + uses: actions/cache/restore@v4 + with: + path: | + ~/.m2/repository/*/*/* + !~/.m2/repository/org/apache/ozone + key: maven-repo-${{ hashFiles('**/pom.xml') }} + restore-keys: | + maven-repo- + - name: Download Ozone repo + id: download-ozone-repo + uses: actions/download-artifact@v4 + with: + name: ozone-repo + path: | + ~/.m2/repository/org/apache/ozone + - name: Download Ratis repo + if: ${{ inputs.ratis_args != '' }} + uses: actions/download-artifact@v4 + with: + name: ratis-jars + path: | + ~/.m2/repository/org/apache/ratis + - name: Setup java ${{ env.TEST_JAVA_VERSION }} + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: ${{ env.TEST_JAVA_VERSION }} + - name: Execute tests + run: | + hadoop-ozone/dev-support/checks/${{ github.job }}.sh -Pdist -Psrc -Dmaven.javadoc.skip=true ${{ inputs.ratis_args }} + continue-on-error: true + - name: Summary of failures + run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt + if: ${{ !cancelled() }} + - name: Install diffoscope + run: | + sudo apt update -q + sudo apt install -y diffoscope + if: ${{ failure() }} + - name: Check artifact differences + run: | + hadoop-ozone/dev-support/checks/_diffoscope.sh + if: ${{ failure() }} + - name: Archive build results + uses: actions/upload-artifact@v4 + if: always() + with: + name: ${{ github.job }} + path: target/${{ github.job }} + continue-on-error: true acceptance: needs: - build-info diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java index 602bc0d2632..12efcc9aa20 100644 --- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java @@ -94,7 +94,6 @@ public static Codec getCodec() { private String version; private long setupTime; private String revision; - private String buildDate; private volatile HddsProtos.NodeOperationalState persistedOpState; private volatile long persistedOpStateExpiryEpochSec; private int initialVersion; @@ -112,7 +111,6 @@ private DatanodeDetails(Builder b) { version = b.version; setupTime = b.setupTime; revision = b.revision; - buildDate = b.buildDate; persistedOpState = b.persistedOpState; persistedOpStateExpiryEpochSec = b.persistedOpStateExpiryEpochSec; initialVersion = b.initialVersion; @@ -141,7 +139,6 @@ public DatanodeDetails(DatanodeDetails datanodeDetails) { this.version = datanodeDetails.version; this.setupTime = datanodeDetails.setupTime; this.revision = datanodeDetails.revision; - this.buildDate = datanodeDetails.buildDate; this.persistedOpState = datanodeDetails.getPersistedOpState(); this.persistedOpStateExpiryEpochSec = datanodeDetails.getPersistedOpStateExpiryEpochSec(); @@ -433,9 +430,6 @@ public static DatanodeDetails getFromProtoBuf( if (extendedDetailsProto.hasRevision()) { builder.setRevision(extendedDetailsProto.getRevision()); } - if (extendedDetailsProto.hasBuildDate()) { - builder.setBuildDate(extendedDetailsProto.getBuildDate()); - } return builder.build(); } @@ -527,9 +521,6 @@ public ExtendedDatanodeDetailsProto getExtendedProtoBufMessage() { if (!Strings.isNullOrEmpty(getRevision())) { extendedBuilder.setRevision(getRevision()); } - if (!Strings.isNullOrEmpty(getBuildDate())) { - extendedBuilder.setBuildDate(getBuildDate()); - } return extendedBuilder.build(); } @@ -622,7 +613,6 @@ public static final class Builder { private String version; private long setupTime; private String revision; - private String buildDate; private HddsProtos.NodeOperationalState persistedOpState; private long persistedOpStateExpiryEpochSec = 0; private int initialVersion; @@ -654,7 +644,6 @@ public Builder setDatanodeDetails(DatanodeDetails details) { this.version = details.getVersion(); this.setupTime = details.getSetupTime(); this.revision = details.getRevision(); - this.buildDate = details.getBuildDate(); this.persistedOpState = details.getPersistedOpState(); this.persistedOpStateExpiryEpochSec = details.getPersistedOpStateExpiryEpochSec(); @@ -801,18 +790,6 @@ public Builder setRevision(String rev) { return this; } - /** - * Sets the DataNode build date. - * - * @param date the build date of DataNode. - * - * @return DatanodeDetails.Builder - */ - public Builder setBuildDate(String date) { - this.buildDate = date; - return this; - } - /** * Sets the DataNode setup time. * @@ -1054,24 +1031,6 @@ public void setRevision(String rev) { this.revision = rev; } - /** - * Returns the DataNode build date. - * - * @return DataNode build date - */ - public String getBuildDate() { - return buildDate; - } - - /** - * Set DataNode build date. - * - * @param date DataNode build date - */ - public void setBuildDate(String date) { - this.buildDate = date; - } - @Override public HddsProtos.NetworkNode toProtobuf( int clientVersion) { diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/HddsVersionInfo.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/HddsVersionInfo.java index b76a316c90b..386b1358b97 100644 --- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/HddsVersionInfo.java +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/HddsVersionInfo.java @@ -44,8 +44,6 @@ public static void main(String[] args) { System.out.println( "Source code repository " + HDDS_VERSION_INFO.getUrl() + " -r " + HDDS_VERSION_INFO.getRevision()); - System.out.println("Compiled by " + HDDS_VERSION_INFO.getUser() + " on " - + HDDS_VERSION_INFO.getDate()); System.out.println( "Compiled with protoc " + HDDS_VERSION_INFO.getHadoopProtoc2Version() + ", " + HDDS_VERSION_INFO.getGrpcProtocVersion() + diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/VersionInfo.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/VersionInfo.java index 349c0a86206..d3de20cd476 100644 --- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/VersionInfo.java +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/VersionInfo.java @@ -65,18 +65,6 @@ public String getRevision() { return info.getProperty("revision", "Unknown"); } - public String getBranch() { - return info.getProperty("branch", "Unknown"); - } - - public String getDate() { - return info.getProperty("date", "Unknown"); - } - - public String getUser() { - return info.getProperty("user", "Unknown"); - } - public String getUrl() { return info.getProperty("url", "Unknown"); } @@ -108,7 +96,6 @@ public String getCompilePlatform() { public String getBuildVersion() { return getVersion() + " from " + getRevision() + - " by " + getUser() + " source checksum " + getSrcChecksum(); } } diff --git a/hadoop-hdds/common/src/main/resources/hdds-version-info.properties b/hadoop-hdds/common/src/main/resources/hdds-version-info.properties index bf887021c5b..3ba2c2cbfa2 100644 --- a/hadoop-hdds/common/src/main/resources/hdds-version-info.properties +++ b/hadoop-hdds/common/src/main/resources/hdds-version-info.properties @@ -18,9 +18,6 @@ version=${declared.hdds.version} revision=${version-info.scm.commit} -branch=${version-info.scm.branch} -user=${user.name} -date=${version-info.build.time} url=${version-info.scm.uri} srcChecksum=${version-info.source.md5} hadoopProtoc2Version=${proto2.hadooprpc.protobuf.version} diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java index 6b32b74dc7c..5f45f954fa8 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java @@ -228,7 +228,6 @@ public void start() { datanodeDetails.setSetupTime(Time.now()); datanodeDetails.setRevision( HddsVersionInfo.HDDS_VERSION_INFO.getRevision()); - datanodeDetails.setBuildDate(HddsVersionInfo.HDDS_VERSION_INFO.getDate()); TracingUtil.initTracing( "HddsDatanodeService." + datanodeDetails.getUuidString() .substring(0, 8), conf); diff --git a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfo.java b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfo.java index bcd75f3f215..3783613f3e3 100644 --- a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfo.java +++ b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfo.java @@ -47,13 +47,6 @@ public interface ServiceRuntimeInfo { */ String getSoftwareVersion(); - /** - * Get the compilation information which contains date, user and branch. - * - * @return the compilation information, as a JSON string. - */ - String getCompileInfo(); - /** * Gets the NN start time in milliseconds. * diff --git a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfoImpl.java b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfoImpl.java index 987f4aee031..74ba3c5b629 100644 --- a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfoImpl.java +++ b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfoImpl.java @@ -42,12 +42,6 @@ public String getSoftwareVersion() { return versionInfo.getVersion(); } - @Override - public String getCompileInfo() { - return versionInfo.getDate() + " by " + versionInfo.getUser() + " from " - + versionInfo.getBranch(); - } - @Override public long getStartedTimeInMillis() { return startedTimeInMillis; diff --git a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java index 94e9dceb6a7..d80b6b3a272 100644 --- a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java +++ b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java @@ -742,9 +742,7 @@ public static String createStartupShutdownMessage(VersionInfo versionInfo, " version = " + versionInfo.getVersion(), " classpath = " + System.getProperty("java.class.path"), " build = " + versionInfo.getUrl() + "/" - + versionInfo.getRevision() - + " ; compiled by '" + versionInfo.getUser() - + "' on " + versionInfo.getDate(), + + versionInfo.getRevision(), " java = " + System.getProperty("java.version"), " conf = " + conf); } diff --git a/hadoop-hdds/interface-client/src/main/proto/hdds.proto b/hadoop-hdds/interface-client/src/main/proto/hdds.proto index a47fa8ac3df..1fc5884e24f 100644 --- a/hadoop-hdds/interface-client/src/main/proto/hdds.proto +++ b/hadoop-hdds/interface-client/src/main/proto/hdds.proto @@ -61,7 +61,7 @@ message ExtendedDatanodeDetailsProto { optional string version = 2; optional int64 setupTime = 3; optional string revision = 4; - optional string buildDate = 5; + optional string buildDate = 5; // unused, reserved for compatibility } message MoveDataNodePairProto { diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/util/OzoneVersionInfo.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/util/OzoneVersionInfo.java index b5a15db39cd..289fc42b4ed 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/util/OzoneVersionInfo.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/util/OzoneVersionInfo.java @@ -69,8 +69,6 @@ public static void main(String[] args) { System.out.println( "Source code repository " + OZONE_VERSION_INFO.getUrl() + " -r " + OZONE_VERSION_INFO.getRevision()); - System.out.println("Compiled by " + OZONE_VERSION_INFO.getUser() + " on " - + OZONE_VERSION_INFO.getDate()); System.out.println( "Compiled with protoc " + OZONE_VERSION_INFO.getHadoopProtoc2Version() + ", " + OZONE_VERSION_INFO.getGrpcProtocVersion() + diff --git a/hadoop-ozone/common/src/main/resources/ozone-version-info.properties b/hadoop-ozone/common/src/main/resources/ozone-version-info.properties index 1a6e3b61519..73f02760d6f 100644 --- a/hadoop-ozone/common/src/main/resources/ozone-version-info.properties +++ b/hadoop-ozone/common/src/main/resources/ozone-version-info.properties @@ -19,9 +19,6 @@ version=${declared.ozone.version} release=${ozone.release} revision=${version-info.scm.commit} -branch=${version-info.scm.branch} -user=${user.name} -date=${version-info.build.time} url=${version-info.scm.uri} srcChecksum=${version-info.source.md5} hadoopProtoc2Version=${proto2.hadooprpc.protobuf.version} diff --git a/hadoop-ozone/dev-support/checks/_build.sh b/hadoop-ozone/dev-support/checks/_build.sh new file mode 100755 index 00000000000..b1f23a9ba8a --- /dev/null +++ b/hadoop-ozone/dev-support/checks/_build.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$DIR/../../.." || exit 1 + +: ${OZONE_WITH_COVERAGE:="false"} + +MAVEN_OPTIONS='-V -B -DskipTests -DskipDocs --no-transfer-progress' + +if [[ "${OZONE_WITH_COVERAGE}" == "true" ]]; then + MAVEN_OPTIONS="${MAVEN_OPTIONS} -Pcoverage" +else + MAVEN_OPTIONS="${MAVEN_OPTIONS} -Djacoco.skip" +fi + +export MAVEN_OPTS="-Xmx4096m ${MAVEN_OPTS:-}" +mvn ${MAVEN_OPTIONS} clean "$@" +rc=$? diff --git a/hadoop-ozone/dev-support/checks/_diffoscope.sh b/hadoop-ozone/dev-support/checks/_diffoscope.sh new file mode 100755 index 00000000000..cc7cc700c82 --- /dev/null +++ b/hadoop-ozone/dev-support/checks/_diffoscope.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Helper script to compare jars reported by maven-artifact-plugin + +set -e -u -o pipefail + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$DIR/../../.." || exit 1 + +BASE_DIR="$(pwd -P)" +: ${OUTPUT_LOG:="${BASE_DIR}/target/repro/output.log"} + +for jar in $(grep -o "investigate with diffoscope [^ ]*\.jar [^ ]*\.jar" "${OUTPUT_LOG}" | awk '{ print $NF }'); do + jarname=$(basename "$jar") + if [[ ! -e "$jar" ]]; then + echo "$jar does not exist" + continue + fi + + ref=$(find target/reference -name "$jarname") + if [[ -z "$ref" ]]; then + ref=$(find ~/.m2/repository -name "$jarname") + fi + + if [[ ! -e "$ref" ]]; then + echo "Reference not found for: $jarname" + continue + fi + + diffoscope "$ref" "$jar" +done diff --git a/hadoop-ozone/dev-support/checks/build.sh b/hadoop-ozone/dev-support/checks/build.sh index 5ff1bdc9a05..7e9a9d5cbf2 100755 --- a/hadoop-ozone/dev-support/checks/build.sh +++ b/hadoop-ozone/dev-support/checks/build.sh @@ -13,20 +13,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -cd "$DIR/../../.." || exit 1 - -: ${OZONE_WITH_COVERAGE:="false"} - -MAVEN_OPTIONS='-V -B -DskipTests -DskipDocs --no-transfer-progress' -if [[ "${OZONE_WITH_COVERAGE}" == "true" ]]; then - MAVEN_OPTIONS="${MAVEN_OPTIONS} -Pcoverage" -else - MAVEN_OPTIONS="${MAVEN_OPTIONS} -Djacoco.skip" -fi - -export MAVEN_OPTS="-Xmx4096m ${MAVEN_OPTS:-}" -echo "${MAVEN_OPTIONS}" -mvn ${MAVEN_OPTIONS} clean install "$@" -exit $? +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source "${DIR}"/_build.sh install "$@" diff --git a/hadoop-ozone/dev-support/checks/repro.sh b/hadoop-ozone/dev-support/checks/repro.sh new file mode 100755 index 00000000000..1b74ec11337 --- /dev/null +++ b/hadoop-ozone/dev-support/checks/repro.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This check verifies build reproducibility. + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$DIR/../../.." || exit 1 + +BASE_DIR="$(pwd -P)" +REPORT_DIR=${OUTPUT_DIR:-"${BASE_DIR}/target/repro"} + +rc=0 +source "${DIR}"/_build.sh verify artifact:compare "$@" | tee output.log + +mkdir -p "$REPORT_DIR" +mv output.log "$REPORT_DIR"/ + +REPORT_FILE="$REPORT_DIR/summary.txt" +grep 'ERROR.*mismatch' "${REPORT_DIR}/output.log" > "${REPORT_FILE}" + +wc -l "${REPORT_FILE}" | awk '{ print $1 }' > "${REPORT_DIR}/failures" + +if [[ -s "${REPORT_FILE}" ]]; then + exit 1 +fi + +exit $rc # result of mvn diff --git a/hadoop-ozone/httpfsgateway/src/main/resources/httpfs.properties b/hadoop-ozone/httpfsgateway/src/main/resources/httpfs.properties index 164896e1f05..16d13de384a 100644 --- a/hadoop-ozone/httpfsgateway/src/main/resources/httpfs.properties +++ b/hadoop-ozone/httpfsgateway/src/main/resources/httpfs.properties @@ -16,6 +16,3 @@ httpfs.version=${project.version} httpfs.source.repository=${httpfs.source.repository} httpfs.source.revision=${httpfs.source.revision} - -httpfs.build.username=${user.name} -httpfs.build.timestamp=${httpfs.build.timestamp} diff --git a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/NodeEndpoint.java b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/NodeEndpoint.java index 7f0efe97dd9..717a9d74f74 100644 --- a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/NodeEndpoint.java +++ b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/NodeEndpoint.java @@ -171,7 +171,6 @@ public Response getDatanodes() { .withVersion(nodeManager.getVersion(datanode)) .withSetupTime(nodeManager.getSetupTime(datanode)) .withRevision(nodeManager.getRevision(datanode)) - .withBuildDate(nodeManager.getBuildDate(datanode)) .withLayoutVersion( dnInfo.getLastKnownLayoutVersion().getMetadataLayoutVersion()) .withNetworkLocation(datanode.getNetworkLocation()) diff --git a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/DatanodeMetadata.java b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/DatanodeMetadata.java index 06c20a963a2..ec7ab6cf8ee 100644 --- a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/DatanodeMetadata.java +++ b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/DatanodeMetadata.java @@ -84,10 +84,6 @@ public final class DatanodeMetadata { @JsonInclude(JsonInclude.Include.NON_NULL) private String revision; - @XmlElement(name = "buildDate") - @JsonInclude(JsonInclude.Include.NON_NULL) - private String buildDate; - @XmlElement(name = "layoutVersion") @JsonInclude(JsonInclude.Include.NON_DEFAULT) private int layoutVersion; @@ -110,7 +106,6 @@ private DatanodeMetadata(Builder builder) { this.version = builder.version; this.setupTime = builder.setupTime; this.revision = builder.revision; - this.buildDate = builder.buildDate; this.layoutVersion = builder.layoutVersion; this.networkLocation = builder.networkLocation; } @@ -167,10 +162,6 @@ public String getRevision() { return revision; } - public String getBuildDate() { - return buildDate; - } - public int getLayoutVersion() { return layoutVersion; } @@ -206,7 +197,6 @@ public static final class Builder { private String version; private long setupTime; private String revision; - private String buildDate; private int layoutVersion; private String networkLocation; @@ -282,11 +272,6 @@ public Builder withRevision(String revision) { return this; } - public Builder withBuildDate(String buildDate) { - this.buildDate = buildDate; - return this; - } - public Builder withLayoutVersion(int layoutVersion) { this.layoutVersion = layoutVersion; return this; diff --git a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconNodeManager.java b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconNodeManager.java index 65a9530c5ca..2ebeafcccb9 100644 --- a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconNodeManager.java +++ b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconNodeManager.java @@ -205,17 +205,6 @@ public String getRevision(DatanodeDetails datanodeDetails) { EMPTY_DATANODE_DETAILS).getRevision(); } - /** - * Returns the build date of the given node. - * - * @param datanodeDetails DatanodeDetails - * @return buildDate - */ - public String getBuildDate(DatanodeDetails datanodeDetails) { - return inMemDatanodeDetails.getOrDefault(datanodeDetails.getUuid(), - EMPTY_DATANODE_DETAILS).getBuildDate(); - } - @Override public void onMessage(CommandForDatanode commandForDatanode, EventPublisher ignored) { diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx index d7fdf2b9eb8..4a3c11c11b0 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx @@ -66,7 +66,6 @@ interface IDatanodeResponse { version: string; setupTime: number; revision: string; - buildDate: string; networkLocation: string; } @@ -92,7 +91,6 @@ interface IDatanode { version: string; setupTime: number; revision: string; - buildDate: string; networkLocation: string; } @@ -331,15 +329,6 @@ const COLUMNS = [ sorter: (a: IDatanode, b: IDatanode) => a.revision.localeCompare(b.revision), defaultSortOrder: 'ascend' as const }, - { - title: 'Build Date', - dataIndex: 'buildDate', - key: 'buildDate', - isVisible: true, - isSearchable: true, - sorter: (a: IDatanode, b: IDatanode) => a.buildDate.localeCompare(b.buildDate), - defaultSortOrder: 'ascend' as const - }, { title: 'Network Location', dataIndex: 'networkLocation', @@ -446,7 +435,6 @@ export class Datanodes extends React.Component, IDatanode version: datanode.version, setupTime: datanode.setupTime, revision: datanode.revision, - buildDate: datanode.buildDate, networkLocation: datanode.networkLocation }; }); diff --git a/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestEndpoints.java b/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestEndpoints.java index c3d2fd484a5..f1dafa2c75b 100644 --- a/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestEndpoints.java +++ b/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestEndpoints.java @@ -378,7 +378,6 @@ public void setUp() throws Exception { .setDatanodeDetails(datanodeDetailsProto) .setVersion("0.6.0") .setSetupTime(1596347628802L) - .setBuildDate("2020-08-01T08:50Z") .setRevision("3346f493fa1690358add7bb9f3e5b52545993f36") .build(); StorageReportProto storageReportProto1 = @@ -409,7 +408,6 @@ public void setUp() throws Exception { .setDatanodeDetails(datanodeDetailsProto2) .setVersion("0.6.0") .setSetupTime(1596347636802L) - .setBuildDate("2020-08-01T08:50Z") .setRevision("3346f493fa1690358add7bb9f3e5b52545993f36") .build(); StorageReportProto storageReportProto3 = @@ -441,7 +439,6 @@ public void setUp() throws Exception { .setDatanodeDetails(datanodeDetailsProto3) .setVersion("0.6.0") .setSetupTime(1596347628802L) - .setBuildDate("2020-08-01T08:50Z") .setRevision("3346f493fa1690358add7bb9f3e5b52545993f36") .build(); StorageReportProto storageReportProto5 = diff --git a/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOpenContainerCount.java b/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOpenContainerCount.java index f64d93707a2..e320c19069e 100644 --- a/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOpenContainerCount.java +++ b/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOpenContainerCount.java @@ -300,7 +300,6 @@ public void setUp() throws Exception { .setDatanodeDetails(datanodeDetailsProto) .setVersion("0.6.0") .setSetupTime(1596347628802L) - .setBuildDate("2020-08-01T08:50Z") .setRevision("3346f493fa1690358add7bb9f3e5b52545993f36") .build(); diff --git a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/DatanodeSimulator.java b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/DatanodeSimulator.java index 2b178ac0aec..2b4faeac923 100644 --- a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/DatanodeSimulator.java +++ b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/DatanodeSimulator.java @@ -469,7 +469,6 @@ private DatanodeDetails randomDatanodeDetails(ConfigurationSource config) details.setVersion(HDDS_VERSION_INFO.getVersion()); details.setSetupTime(Time.now()); details.setRevision(HDDS_VERSION_INFO.getRevision()); - details.setBuildDate(HDDS_VERSION_INFO.getDate()); details.setCurrentVersion(DatanodeVersion.CURRENT_VERSION); return details; } diff --git a/pom.xml b/pom.xml index f1349f31761..7ee0f410828 100644 --- a/pom.xml +++ b/pom.xml @@ -63,6 +63,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs + + 2023-01-01T00:00:00Z + 2.10.2 3.3.6 @@ -1428,6 +1431,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs ${maven-javadoc-plugin.version} none + true