@InterfaceAudience.Private @InterfaceStability.Evolving public final class S3xLoginHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
S3xLoginHelper.Login
Simple tuple of login details.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
LOGIN_WARNING |
| Modifier and Type | Method and Description |
|---|---|
static URI |
buildFSURI(URI uri)
Build the filesystem URI.
|
static URI |
canonicalizeUri(URI uri,
int defaultPort)
Canonicalize the given URI.
|
static void |
checkPath(org.apache.hadoop.conf.Configuration conf,
URI fsUri,
org.apache.hadoop.fs.Path path,
int defaultPort)
Check the path, ignoring authentication details.
|
static void |
rejectSecretsInURIs(URI name)
Extract the login details from a URI, raising an exception if
the URI contains them.
|
static String |
toString(URI pathUri)
Create a stripped down string value for error messages.
|
public static final String LOGIN_WARNING
public static URI buildFSURI(URI uri)
uri - filesystem uriIllegalArgumentException - if the URI is in some way invalid.public static String toString(URI pathUri)
pathUri - URIpublic static void rejectSecretsInURIs(URI name)
name - URI of the filesystem, can be nullIllegalArgumentException - if there is a secret in the URI.public static URI canonicalizeUri(URI uri, int defaultPort)
uri - the URI to canonicalizedefaultPort - default port to use in canonicalized URI if the input
URI has no port and this value is greater than 0public static void checkPath(org.apache.hadoop.conf.Configuration conf,
URI fsUri,
org.apache.hadoop.fs.Path path,
int defaultPort)
FileSystem.checkPath(Path) for the operation of this.
Essentially
URI.getHost() over URI.getAuthority(). Some of that
code looks a relic of the code anti-pattern of using "hdfs:file.txt"
to define the path without declaring the hostname. It's retained
for compatibility.conf - FS configurationfsUri - the FS URIpath - path to checkdefaultPort - default port of FSCopyright © 2008–2024 Apache Software Foundation. All rights reserved.