diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java index e8eedd949e..af48cb6169 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java @@ -34,16 +34,16 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.test.GenericTestUtils; -import org.apache.sshd.SshServer; +import org.apache.sshd.server.SshServer; import org.apache.sshd.common.NamedFactory; import org.apache.sshd.server.Command; -import org.apache.sshd.server.PasswordAuthenticator; -import org.apache.sshd.server.UserAuth; -import org.apache.sshd.server.auth.UserAuthPassword; +import org.apache.sshd.server.auth.password.PasswordAuthenticator; +import org.apache.sshd.server.auth.UserAuth; +import org.apache.sshd.server.auth.password.UserAuthPasswordFactory; import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider; import org.apache.sshd.server.session.ServerSession; -import org.apache.sshd.server.sftp.SftpSubsystem; +import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Rule; @@ -76,7 +76,7 @@ private static void startSshdServer() throws IOException { List> userAuthFactories = new ArrayList>(); - userAuthFactories.add(new UserAuthPassword.Factory()); + userAuthFactories.add(new UserAuthPasswordFactory()); sshd.setUserAuthFactories(userAuthFactories); @@ -92,7 +92,7 @@ public boolean authenticate(String username, String password, }); sshd.setSubsystemFactories( - Arrays.>asList(new SftpSubsystem.Factory())); + Arrays.>asList(new SftpSubsystemFactory())); sshd.start(); port = sshd.getPort(); @@ -140,7 +140,7 @@ public static void tearDown() { if (sshd != null) { try { sshd.stop(true); - } catch (InterruptedException e) { + } catch (IOException e) { // ignore } } diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index a414fcd2a7..24c779c980 100755 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -824,12 +824,12 @@ org.apache.mina mina-core - 2.0.0-M5 + 2.0.16 org.apache.sshd sshd-core - 0.14.0 + 1.6.0 org.apache.ftpserver