protected FTPClient createClient(final GenericFileName rootName, final UserAuthenticationData authData) throws FileSystemException { return FtpClientFactory.createConnection( rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.getData( authData, UserAuthenticationData.USERNAME, null), UserAuthenticatorUtils.getData( authData, UserAuthenticationData.PASSWORD, null), rootName.getPath(), getFileSystemOptions()); }
@Override protected FTPClient createClient(final GenericFileName rootName, final UserAuthenticationData authData) throws FileSystemException { return FtpsClientFactory.createConnection( rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.getData( authData, UserAuthenticationData.USERNAME, null), UserAuthenticatorUtils.getData( authData, UserAuthenticationData.PASSWORD, null), rootName.getPath(), getFileSystemOptions()); } }
@Override protected FileSystem doCreateFileSystem( FileName name, FileSystemOptions fileSystemOptions ) throws FileSystemException { GenericFileName genericFileName = (GenericFileName) name.getRoot(); String clusterName = genericFileName.getHostName(); String path = genericFileName.getPath(); NamedCluster namedCluster = getNamedClusterByName( clusterName, fileSystemOptions ); try { if ( namedCluster == null ) { namedCluster = namedClusterService.getClusterTemplate(); } String generatedUrl = namedCluster .processURLsubstitution( path == null ? "" : path, getMetastore( clusterName, fileSystemOptions ), new Variables() ); URI uri = URI.create( generatedUrl ); return new NamedClusterFileSystem( name, uri, fileSystemOptions, hadoopFileSystemLocator.getHadoopFilesystem( namedCluster, uri ) ); } catch ( ClusterInitializationException e ) { throw new FileSystemException( e ); } }
@Override protected FTPClient createClient(final GenericFileName rootName, final UserAuthenticationData authData) throws FileSystemException { return FtpsClientFactory.createConnection(rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName())), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword())), rootName.getPath(), getFileSystemOptions()); } }
protected FTPClient createClient(final GenericFileName rootName, final UserAuthenticationData authData) throws FileSystemException { return FtpClientFactory.createConnection(rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName())), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword())), rootName.getPath(), getFileSystemOptions()); }
@Override protected FTPClient createClient(final GenericFileName rootName, final UserAuthenticationData authData) throws FileSystemException { return FtpsClientFactory.createConnection(rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName())), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword())), rootName.getPath(), getFileSystemOptions()); } }
protected FTPClient createClient(final GenericFileName rootName, final UserAuthenticationData authData) throws FileSystemException { return FtpClientFactory.createConnection(rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName())), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword())), rootName.getPath(), getFileSystemOptions()); }
protected FTPClient createClient(final GenericFileName rootName, final UserAuthenticationData authData) throws FileSystemException { return FtpClientFactory.createConnection(rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName())), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword())), rootName.getPath(), getFileSystemOptions()); }
@Override protected FTPClient createClient(final GenericFileName rootName, final UserAuthenticationData authData) throws FileSystemException { return FtpsClientFactory.createConnection(rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName())), UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword())), rootName.getPath(), getFileSystemOptions()); } }
assertEquals(21, name.getPort()); assertEquals(name.getDefaultPort(), name.getPort()); assertEquals("/file", name.getPath()); assertEquals("ftp://hostname/", name.getRootURI()); assertEquals("ftp://hostname/file", name.getURI()); assertEquals("hostname", name.getHostName()); assertEquals(9090, name.getPort()); assertEquals("/file", name.getPath()); assertEquals("ftp://hostname:9090/", name.getRootURI()); assertEquals("ftp://hostname:9090/file", name.getURI()); assertEquals("hostname", name.getHostName()); assertEquals(21, name.getPort()); assertEquals("/", name.getPath()); assertEquals("ftp://hostname/", name.getRootURI()); assertEquals("ftp://hostname/", name.getURI());
assertEquals(21, name.getPort()); assertEquals(name.getDefaultPort(), name.getPort()); assertEquals("/file", name.getPath()); assertEquals("ftp://hostname/", name.getRootURI()); assertEquals("ftp://hostname/file", name.getURI()); assertEquals("hostname", name.getHostName()); assertEquals(9090, name.getPort()); assertEquals("/file", name.getPath()); assertEquals("ftp://hostname:9090/", name.getRootURI()); assertEquals("ftp://hostname:9090/file", name.getURI()); assertEquals("hostname", name.getHostName()); assertEquals(21, name.getPort()); assertEquals("/", name.getPath()); assertEquals("ftp://hostname/", name.getRootURI()); assertEquals("ftp://hostname/", name.getURI()); assertEquals("hostname", name.getHostName()); assertEquals(21, name.getPort()); assertEquals("/file", name.getPath()); assertEquals("ftp://user@hostname/", name.getRootURI()); assertEquals("ftp://user@hostname/file", name.getURI()); assertEquals("hostname", name.getHostName()); assertEquals(21, name.getPort()); assertEquals("/file", name.getPath()); assertEquals("ftp://user:password@hostname/", name.getRootURI()); assertEquals("ftp://user:password@hostname/file", name.getURI());
assertEquals(21, name.getPort()); assertEquals(name.getDefaultPort(), name.getPort()); assertEquals("/file", name.getPath()); assertEquals("ftp://hostname/", name.getRootURI()); assertEquals("ftp://hostname/file", name.getURI()); assertEquals("hostname", name.getHostName()); assertEquals(9090, name.getPort()); assertEquals("/file", name.getPath()); assertEquals("ftp://hostname:9090/", name.getRootURI()); assertEquals("ftp://hostname:9090/file", name.getURI()); assertEquals("hostname", name.getHostName()); assertEquals(21, name.getPort()); assertEquals("/", name.getPath()); assertEquals("ftp://hostname/", name.getRootURI()); assertEquals("ftp://hostname/", name.getURI()); assertEquals("hostname", name.getHostName()); assertEquals(21, name.getPort()); assertEquals("/file", name.getPath()); assertEquals("ftp://user@hostname/", name.getRootURI()); assertEquals("ftp://user@hostname/file", name.getURI()); assertEquals("hostname", name.getHostName()); assertEquals(21, name.getPort()); assertEquals("/file", name.getPath()); assertEquals("ftp://user:password@hostname/", name.getRootURI()); assertEquals("ftp://user:password@hostname/file", name.getURI());