Class TrustedChannelResolver

java.lang.Object
org.apache.hadoop.hdfs.protocol.datatransfer.TrustedChannelResolver
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable

public class TrustedChannelResolver extends Object implements 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 Details

    • TrustedChannelResolver

      public TrustedChannelResolver()
  • Method Details

    • getInstance

      public static TrustedChannelResolver getInstance(org.apache.hadoop.conf.Configuration conf)
      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:
      setConf in interface org.apache.hadoop.conf.Configurable
    • getConf

      public org.apache.hadoop.conf.Configuration getConf()
      Specified by:
      getConf in interface org.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

      public boolean isTrusted(InetAddress peerAddress)
      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.