Skip to content
Open
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
6 changes: 6 additions & 0 deletions hadoop-hdds/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
</dependency>

<!-- Test dependencies -->
<dependency>
<!-- until HDDS-12460 is soft-reverted -->
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-common</artifactId>
Expand Down
17 changes: 7 additions & 10 deletions hadoop-hdds/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
Expand Down Expand Up @@ -160,10 +156,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ratis</groupId>
<artifactId>ratis-metrics-dropwizard3</artifactId>
Expand All @@ -180,14 +172,19 @@
<artifactId>slf4j-reload4j</artifactId>
<scope>runtime</scope>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-config</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-test-utils</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,4 @@ Node getLeaf(int leafIndex, List<String> excludedScopes,

@Override
int hashCode();

static InnerNode fromProtobuf(
HddsProtos.InnerNode innerNode) {
return InnerNodeImpl.fromProtobuf(innerNode);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.hadoop.hdds.scm.net;

import org.apache.hadoop.hdds.protocol.DatanodeDetails;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;

/**
Expand Down Expand Up @@ -134,16 +133,4 @@ default HddsProtos.NetworkNode toProtobuf(
int clientVersion) {
return null;
}

static Node fromProtobuf(
HddsProtos.NetworkNode networkNode) {
if (networkNode.hasDatanodeDetails()) {
return DatanodeDetails.getFromProtoBuf(
networkNode.getDatanodeDetails());
} else if (networkNode.hasInnerNode()) {
return InnerNode.fromProtobuf(networkNode.getInnerNode());
} else {
return null;
}
}
}
4 changes: 4 additions & 0 deletions hadoop-hdds/framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public Builder setChildrenMap(
String networkName = childrenMapProto.hasNetworkName() ?
childrenMapProto.getNetworkName() : null;
Node node = childrenMapProto.hasNetworkNode() ?
Node.fromProtobuf(childrenMapProto.getNetworkNode()) : null;
NodeSchemaManager.fromProtobuf(childrenMapProto.getNetworkNode()) : null;
newChildrenMap.put(networkName, node);
}
this.childrenMap = newChildrenMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import java.util.Arrays;
import java.util.List;
import org.apache.hadoop.hdds.conf.ConfigurationSource;
import org.apache.hadoop.hdds.protocol.DatanodeDetails;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
import org.apache.hadoop.hdds.scm.ScmConfigKeys;
import org.apache.hadoop.hdds.scm.net.NodeSchemaLoader.NodeSchemaLoadResult;
import org.slf4j.Logger;
Expand Down Expand Up @@ -138,4 +140,14 @@ public String complete(String path) {
}
return null;
}

static Node fromProtobuf(HddsProtos.NetworkNode networkNode) {
if (networkNode.hasDatanodeDetails()) {
return DatanodeDetails.getFromProtoBuf(networkNode.getDatanodeDetails());
} else if (networkNode.hasInnerNode()) {
return InnerNodeImpl.fromProtobuf(networkNode.getInnerNode());
} else {
return null;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* 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.
*/

/**
* The network topology supported by Ozone.
*/
package org.apache.hadoop.hdds.scm.net;
6 changes: 6 additions & 0 deletions hadoop-ozone/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@
<scope>runtime</scope>
</dependency>
<!-- Test dependencies -->
<dependency>
<!-- until HDDS-12460 is soft-reverted -->
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-inprocess</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions hadoop-ozone/dist/dev-support/bin/dist-layout-stitching
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ run cp "${ROOT}/hadoop-ozone/dist/src/shell/conf/scm-audit-log4j2.properties" "e
run cp "${ROOT}/hadoop-ozone/dist/src/shell/conf/s3g-audit-log4j2.properties" "etc/hadoop"
run cp "${ROOT}/hadoop-ozone/dist/src/shell/conf/ozone-site.xml" "etc/hadoop"
run cp -f "${ROOT}/hadoop-ozone/dist/src/shell/conf/log4j.properties" "etc/hadoop"
run cp "${ROOT}/hadoop-hdds/common/src/main/resources/network-topology-default.xml" "etc/hadoop"
run cp "${ROOT}/hadoop-hdds/common/src/main/resources/network-topology-nodegroup.xml" "etc/hadoop"
run cp "${ROOT}/hadoop-hdds/framework/src/main/resources/network-topology-default.xml" "etc/hadoop"
run cp "${ROOT}/hadoop-hdds/framework/src/main/resources/network-topology-nodegroup.xml" "etc/hadoop"

run cp -r "${ROOT}/hadoop-ozone/dist/src/main/dockerlibexec/." "libexec/"

Expand Down