Skip to content

Commit 8a1967e

Browse files
authored
HDDS-11719. Remove dependency on server components from ozonefs-common (apache#7438)
1 parent 9fcecc1 commit 8a1967e

3 files changed

Lines changed: 5 additions & 34 deletions

File tree

hadoop-hdds/hadoop-dependency-client/pom.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
5959
<groupId>com.google.guava</groupId>
6060
<artifactId>guava</artifactId>
6161
</exclusion>
62-
<exclusion>
63-
<groupId>commons-cli</groupId>
64-
<artifactId>commons-cli</artifactId>
65-
</exclusion>
62+
<!-- commons-cli is required by OzoneFsShell -->
6663
<exclusion>
6764
<groupId>org.apache.commons</groupId>
6865
<artifactId>commons-math3</artifactId>

hadoop-ozone/ozonefs-common/pom.xml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -112,35 +112,10 @@
112112
</dependency>
113113

114114
<!-- Test dependencies -->
115-
<dependency>
116-
<groupId>org.apache.ozone</groupId>
117-
<artifactId>hdds-container-service</artifactId>
118-
<scope>test</scope>
119-
</dependency>
120115
<dependency>
121116
<groupId>org.apache.ozone</groupId>
122117
<artifactId>hdds-hadoop-dependency-test</artifactId>
123118
<scope>test</scope>
124119
</dependency>
125-
<dependency>
126-
<groupId>org.apache.ozone</groupId>
127-
<artifactId>hdds-server-framework</artifactId>
128-
<scope>test</scope>
129-
</dependency>
130-
<dependency>
131-
<groupId>org.apache.ozone</groupId>
132-
<artifactId>hdds-server-scm</artifactId>
133-
<scope>test</scope>
134-
</dependency>
135-
<dependency>
136-
<groupId>org.apache.ozone</groupId>
137-
<artifactId>hdds-test-utils</artifactId>
138-
<scope>test</scope>
139-
</dependency>
140-
<dependency>
141-
<groupId>org.apache.ozone</groupId>
142-
<artifactId>ozone-manager</artifactId>
143-
<scope>test</scope>
144-
</dependency>
145120
</dependencies>
146121
</project>

hadoop-ozone/ozonefs-common/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsShell.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import org.apache.hadoop.util.ToolRunner;
2323

2424
import java.io.ByteArrayOutputStream;
25-
import java.io.IOException;
2625
import java.io.PrintStream;
2726
import java.util.Arrays;
2827

@@ -32,15 +31,14 @@
3231

3332
import org.junit.jupiter.api.Test;
3433

35-
3634
/**
3735
* Tests the behavior of OzoneFsShell.
3836
*/
3937
public class TestOzoneFsShell {
4038

4139
// tests command handler for FsShell bound to OzoneDelete class
4240
@Test
43-
public void testOzoneFsShellRegisterDeleteCmd() throws IOException {
41+
public void testOzoneFsShellRegisterDeleteCmd() throws Exception {
4442
final String rmCmdName = "rm";
4543
final String rmCmd = "-" + rmCmdName;
4644
final String arg = "arg1";
@@ -52,16 +50,17 @@ public void testOzoneFsShellRegisterDeleteCmd() throws IOException {
5250
System.setErr(bytesPrintStream);
5351
try {
5452
ToolRunner.run(shell, argv);
55-
} catch (Exception e) {
56-
} finally {
53+
5754
// test command bindings for "rm" command handled by OzoneDelete class
5855
CommandFactory factory = shell.getCommandFactory();
56+
assertNotNull(factory);
5957
assertEquals(1, Arrays.stream(factory.getNames())
6058
.filter(c -> c.equals(rmCmd)).count());
6159
Command instance = factory.getInstance(rmCmd);
6260
assertNotNull(instance);
6361
assertEquals(OzoneFsDelete.Rm.class, instance.getClass());
6462
assertEquals(rmCmdName, instance.getCommandName());
63+
} finally {
6564
shell.close();
6665
System.setErr(oldErr);
6766
}

0 commit comments

Comments
 (0)