org.apache.hadoop.hdfs.protocol.datatransfer

## 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 Summary

    Constructors
    Constructor and Description
    `TrustedChannelResolver()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.hadoop.conf.Configuration` | `getConf()`
    `static TrustedChannelResolver` | `getInstance(org.apache.hadoop.conf.Configuration conf)` Returns an instance of TrustedChannelResolver.
    `boolean` | `isTrusted()` Return boolean value indicating whether a channel is trusted or not from a client's perspective.
    `boolean` | `isTrusted(InetAddress peerAddress)` Identify boolean value indicating whether a channel is trusted or not.
    `void` | `setConf(org.apache.hadoop.conf.Configuration conf)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TrustedChannelResolver

          public TrustedChannelResolver()

  - ### Method Detail

    - #### 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.

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.