Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-11719. Remove dependency on server components from ozonefs-common #7438

Merged
merged 3 commits into from
Dec 4, 2024
Merged
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
5 changes: 1 addition & 4 deletions hadoop-hdds/hadoop-dependency-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</exclusion>
<!-- commons-cli is required by OzoneFsShell -->
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
Expand Down
25 changes: 0 additions & 25 deletions hadoop-ozone/ozonefs-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,35 +112,10 @@
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-container-service</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-hadoop-dependency-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-server-framework</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-server-scm</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-test-utils</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>ozone-manager</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.apache.hadoop.util.ToolRunner;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;

Expand All @@ -32,15 +31,14 @@

import org.junit.jupiter.api.Test;


/**
* Tests the behavior of OzoneFsShell.
*/
public class TestOzoneFsShell {

// tests command handler for FsShell bound to OzoneDelete class
@Test
public void testOzoneFsShellRegisterDeleteCmd() throws IOException {
public void testOzoneFsShellRegisterDeleteCmd() throws Exception {
final String rmCmdName = "rm";
final String rmCmd = "-" + rmCmdName;
final String arg = "arg1";
Expand All @@ -52,16 +50,17 @@ public void testOzoneFsShellRegisterDeleteCmd() throws IOException {
System.setErr(bytesPrintStream);
try {
ToolRunner.run(shell, argv);
} catch (Exception e) {
} finally {

// test command bindings for "rm" command handled by OzoneDelete class
CommandFactory factory = shell.getCommandFactory();
assertNotNull(factory);
assertEquals(1, Arrays.stream(factory.getNames())
.filter(c -> c.equals(rmCmd)).count());
Command instance = factory.getInstance(rmCmd);
assertNotNull(instance);
assertEquals(OzoneFsDelete.Rm.class, instance.getClass());
assertEquals(rmCmdName, instance.getCommandName());
} finally {
shell.close();
System.setErr(oldErr);
}
Expand Down
Loading