[
https://issues.apache.org/jira/browse/HADOOP-15142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mario Molina updated HADOOP-15142:
----------------------------------
Comment: was deleted
(was: diff --git
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPFileSystem.java
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPFileSystem.java
index 43eb7833390..b50af5e10d4 100644
---
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPFileSystem.java
+++
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPFileSystem.java
@@ -87,7 +87,7 @@
/**
* Set configuration from UI.
*
- * @param uri
+ * @param uriInfo
* @param conf
* @throws IOException
*/
@@ -155,7 +155,7 @@ private ChannelSftp connect() throws IOException {
/**
* Logout and disconnect the given channel.
*
- * @param client
+ * @param channel
* @throws IOException
*/
private void disconnect(ChannelSftp channel) throws IOException {
@@ -495,6 +495,17 @@ public void initialize(URI uriInfo, Configuration conf)
throws IOException {
this.uri = uriInfo;
}
+ /**
+ * Return the protocol scheme for the FileSystem.
+ * <p/>
+ *
+ * @return <code>sftp</code>
+ */
+ @Override
+ public String getScheme() {
+ return "sftp";
+ }
+
@Override
public URI getUri() {
return uri;
diff --git
hadoop-common-project/hadoop-common/src/main/resources/META-INF/services/org.apache.hadoop.fs.FileSystem
hadoop-common-project/hadoop-common/src/main/resources/META-INF/services/org.apache.hadoop.fs.FileSystem
index 907ad3b0472..40d884538be 100644
---
hadoop-common-project/hadoop-common/src/main/resources/META-INF/services/org.apache.hadoop.fs.FileSystem
+++
hadoop-common-project/hadoop-common/src/main/resources/META-INF/services/org.apache.hadoop.fs.FileSystem
@@ -18,3 +18,5 @@ org.apache.hadoop.fs.viewfs.ViewFileSystem
org.apache.hadoop.fs.HarFileSystem
org.apache.hadoop.fs.http.HttpFileSystem
org.apache.hadoop.fs.http.HttpsFileSystem
+org.apache.hadoop.fs.ftp.FTPFileSystem
+org.apache.hadoop.fs.sftp.SFTPFileSystem
diff --git
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java
index af48cb6169b..d4432f80366 100644
---
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java
+++
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java
@@ -106,7 +106,6 @@ public static void setUp() throws Exception {
startSshdServer();
Configuration conf = new Configuration();
- conf.setClass("fs.sftp.impl", SFTPFileSystem.class, FileSystem.class);
conf.setInt("fs.sftp.host.port", port);
conf.setBoolean("fs.sftp.impl.disable.cache", true);
)
> Register FTP and SFTP as FS services
> ------------------------------------
>
> Key: HADOOP-15142
> URL: https://issues.apache.org/jira/browse/HADOOP-15142
> Project: Hadoop Common
> Issue Type: New Feature
> Components: common
> Affects Versions: 3.0.0
> Reporter: Mario Molina
> Priority: Minor
> Fix For: 3.0.1
>
> Attachments: HADOOP-15142.001.patch
>
>
> SFTPFileSystem and FTPFileSystem are not registered as a FS services.
> When calling the 'get' or 'newInstance' methods of the FileSystem class, the
> FS instance cannot be created due to the schema is not registered as a
> service FS.
> Also, the SFTPFileSystem class doesn't have the getScheme method implemented.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]