@Test public void testGetConnectionStringForNullInputScheme() { HadoopVfsConnection hdfsConnection = new HadoopVfsConnection( getTestNamedCluster(), new Variables() ); assertEquals( EXPECTED_URL, hdfsConnection.getConnectionString( null ) ); }
public String getConnectionString( String schemeName ) { if ( Schemes.MAPRFS_SCHEME.equals( schemeName ) ) { return Schemes.MAPRFS_SCHEME.concat( ": } StringBuffer urlString = new StringBuffer( !Utils.isEmpty( schemeName ) ? schemeName : SCHEME_NAME ).append( ": if ( !Utils.isEmpty( getUsername() ) ) { urlString.append( getUsername() ).append( COLON ).append( getPassword() ).append( "@" ); } urlString.append( getHostname() ); if ( !Utils.isEmpty( getPort() ) ) { urlString.append( COLON ).append( getPort() ); } return urlString.toString(); }
HadoopVfsConnection { public String getConnectionString( String schemeName ) { if ( Schemes.MAPRFS_SCHEME.equals( schemeName ) ) { return Schemes.MAPRFS_SCHEME.concat( ": } StringBuffer urlString = new StringBuffer( !Utils.isEmpty( schemeName ) ? schemeName : SCHEME_NAME ).append( ": if ( !Utils.isEmpty( getUsername() ) ) { urlString.append( getUsername() ).append( COLON ).append( getPassword() ).append( "@" ); } urlString.append( getHostname() ); if ( !Utils.isEmpty( getPort() ) ) { urlString.append( COLON ).append( getPort() ); } return urlString.toString(); } }
HadoopVfsConnection { public String getConnectionString( String schemeName ) { if ( Schemes.MAPRFS_SCHEME.equals( schemeName ) ) { return Schemes.MAPRFS_SCHEME.concat( ": } StringBuffer urlString = new StringBuffer( !Utils.isEmpty( schemeName ) ? schemeName : SCHEME_NAME ).append( ": if ( !Utils.isEmpty( getUsername() ) ) { urlString.append( getUsername() ).append( COLON ).append( getPassword() ).append( "@" ); } urlString.append( getHostname() ); if ( !Utils.isEmpty( getPort() ) ) { urlString.append( COLON ).append( getPort() ); } return urlString.toString(); } HadoopVfsConnection( String ncHostname, String ncPort, String ncUsername, String ncPassword );  HadoopVfsConnection();  HadoopVfsConnection( NamedCluster nCluster, VariableSpace vs ); }
HadoopVfsConnection { public String getConnectionString( String schemeName ) { if ( Schemes.MAPRFS_SCHEME.equals( schemeName ) ) { return Schemes.MAPRFS_SCHEME.concat( ": } StringBuffer urlString = new StringBuffer( !Utils.isEmpty( schemeName ) ? schemeName : SCHEME_NAME ).append( ": if ( !Utils.isEmpty( getUsername() ) ) { urlString.append( getUsername() ).append( COLON ).append( getPassword() ).append( "@" ); } urlString.append( getHostname() ); if ( !Utils.isEmpty( getPort() ) ) { urlString.append( COLON ).append( getPort() ); } return urlString.toString(); } HadoopVfsConnection( String ncHostname, String ncPort, String ncUsername, String ncPassword );  HadoopVfsConnection();  HadoopVfsConnection( NamedCluster nCluster, VariableSpace vs ); String getConnectionString( String schemeName ); void setCustomParameters( Props pr ); String getHostname(); String getPort(); String getUsername(); String getPassword(); }
HadoopVfsConnection { public String getConnectionString( String schemeName ) { if ( Schemes.MAPRFS_SCHEME.equals( schemeName ) ) { return Schemes.MAPRFS_SCHEME.concat( ": } StringBuffer urlString = new StringBuffer( !Utils.isEmpty( schemeName ) ? schemeName : SCHEME_NAME ).append( ": if ( !Utils.isEmpty( getUsername() ) ) { urlString.append( getUsername() ).append( COLON ).append( getPassword() ).append( "@" ); } urlString.append( getHostname() ); if ( !Utils.isEmpty( getPort() ) ) { urlString.append( COLON ).append( getPort() ); } return urlString.toString(); } HadoopVfsConnection( String ncHostname, String ncPort, String ncUsername, String ncPassword );  HadoopVfsConnection();  HadoopVfsConnection( NamedCluster nCluster, VariableSpace vs ); String getConnectionString( String schemeName ); void setCustomParameters( Props pr ); String getHostname(); String getPort(); String getUsername(); String getPassword();  }