Class TrustedChannelResolver
java.lang.Object
org.apache.hadoop.hdfs.protocol.datatransfer.TrustedChannelResolver
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
Class used to indicate whether a channel is trusted or not.
The default implementation is to return false indicating that
the channel is not trusted.
This class can be overridden to provide custom logic to determine
whether a channel is trusted or not.
The custom class can be specified via configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.conf.ConfigurationgetConf()static TrustedChannelResolvergetInstance(org.apache.hadoop.conf.Configuration conf) Returns an instance of TrustedChannelResolver.booleanReturn boolean value indicating whether a channel is trusted or not from a client's perspective.booleanisTrusted(InetAddress peerAddress) Identify boolean value indicating whether a channel is trusted or not.voidsetConf(org.apache.hadoop.conf.Configuration conf)
-
Constructor Details
-
TrustedChannelResolver
public TrustedChannelResolver()
-
-
Method Details
-
getInstance
Returns an instance of TrustedChannelResolver. Looks up the configuration to see if there is custom class specified.- Returns:
- TrustedChannelResolver
-
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf) - Specified by:
setConfin interfaceorg.apache.hadoop.conf.Configurable
-
getConf
public org.apache.hadoop.conf.Configuration getConf()- Specified by:
getConfin interfaceorg.apache.hadoop.conf.Configurable
-
isTrusted
public boolean isTrusted()Return boolean value indicating whether a channel is trusted or not from a client's perspective.- Returns:
- true if the channel is trusted and false otherwise.
-
isTrusted
Identify boolean value indicating whether a channel is trusted or not.- Parameters:
peerAddress- address of the peer- Returns:
- true if the channel is trusted and false otherwise.
-