Interface ClientDatanodeProtocol

All Known Implementing Classes:
ClientDatanodeProtocolTranslatorPB

@Private @Evolving public interface ClientDatanodeProtocol
An client-datanode protocol for block recovery
  • Field Details

    • versionID

      static final long versionID
      Until version 9, this class ClientDatanodeProtocol served as both the client interface to the DN AND the RPC protocol used to communicate with the NN. This class is used by both the DFSClient and the DN server side to insulate from the protocol serialization. If you are adding/changing DN's interface then you need to change both this class and ALSO related protocol buffer wire protocol definition in ClientDatanodeProtocol.proto. For more details on protocol buffer wire protocol, please see .../org/apache/hadoop/hdfs/protocolPB/overview.html The log of historical changes can be retrieved from the svn). 9: Added deleteBlockPool method 9 is the last version id when this class was used for protocols serialization. DO not update this version any further.
      See Also:
  • Method Details

    • getReplicaVisibleLength

      long getReplicaVisibleLength(ExtendedBlock b) throws IOException
      Return the visible length of a replica.
      Throws:
      IOException
    • refreshNamenodes

      void refreshNamenodes() throws IOException
      Refresh the list of federated namenodes from updated configuration Adds new namenodes and stops the deleted namenodes.
      Throws:
      IOException - on error
    • deleteBlockPool

      void deleteBlockPool(String bpid, boolean force) throws IOException
      Delete the block pool directory. If force is false it is deleted only if it is empty, otherwise it is deleted along with its contents.
      Parameters:
      bpid - Blockpool id to be deleted.
      force - If false blockpool directory is deleted only if it is empty i.e. if it doesn't contain any block files, otherwise it is deleted along with its contents.
      Throws:
      IOException
    • getBlockLocalPathInfo

      BlockLocalPathInfo getBlockLocalPathInfo(ExtendedBlock block, org.apache.hadoop.security.token.Token<BlockTokenIdentifier> token) throws IOException
      Retrieves the path names of the block file and metadata file stored on the local file system. In order for this method to work, one of the following should be satisfied:
      • The client user must be configured at the datanode to be able to use this method.
      • When security is enabled, kerberos authentication must be used to connect to the datanode.
      Parameters:
      block - the specified block on the local datanode
      token - the block access token.
      Returns:
      the BlockLocalPathInfo of a block
      Throws:
      IOException - on error
    • shutdownDatanode

      void shutdownDatanode(boolean forUpgrade) throws IOException
      Shuts down a datanode.
      Parameters:
      forUpgrade - If true, data node does extra prep work before shutting down. The work includes advising clients to wait and saving certain states for quick restart. This should only be used when the stored data will remain the same during upgrade/restart.
      Throws:
      IOException
    • evictWriters

      void evictWriters() throws IOException
      Evict clients that are writing to a datanode.
      Throws:
      IOException
    • getDatanodeInfo

      DatanodeLocalInfo getDatanodeInfo() throws IOException
      Obtains datanode info
      Returns:
      software/config version and uptime of the datanode
      Throws:
      IOException
    • startReconfiguration

      void startReconfiguration() throws IOException
      Asynchronously reload configuration on disk and apply changes.
      Throws:
      IOException
    • getReconfigurationStatus

      org.apache.hadoop.conf.ReconfigurationTaskStatus getReconfigurationStatus() throws IOException
      Get the status of the previously issued reconfig task.
      Throws:
      IOException
      See Also:
      • ReconfigurationTaskStatus
    • listReconfigurableProperties

      List<String> listReconfigurableProperties() throws IOException
      Get a list of allowed properties for reconfiguration.
      Throws:
      IOException
    • triggerBlockReport

      void triggerBlockReport(BlockReportOptions options) throws IOException
      Trigger a new block report.
      Throws:
      IOException
    • getBalancerBandwidth

      long getBalancerBandwidth() throws IOException
      Get current value of the balancer bandwidth in bytes per second.
      Returns:
      balancer bandwidth
      Throws:
      IOException
    • getVolumeReport

      List<DatanodeVolumeInfo> getVolumeReport() throws IOException
      Get volume report of datanode.
      Throws:
      IOException
    • submitDiskBalancerPlan

      void submitDiskBalancerPlan(String planID, long planVersion, String planFile, String planData, boolean skipDateCheck) throws IOException
      Submit a disk balancer plan for execution.
      Throws:
      IOException
    • cancelDiskBalancePlan

      void cancelDiskBalancePlan(String planID) throws IOException
      Cancel an executing plan.
      Parameters:
      planID - - A SHA-1 hash of the plan string.
      Throws:
      IOException
    • queryDiskBalancerPlan

      DiskBalancerWorkStatus queryDiskBalancerPlan() throws IOException
      Gets the status of an executing diskbalancer Plan.
      Throws:
      IOException
    • getDiskBalancerSetting

      String getDiskBalancerSetting(String key) throws IOException
      Gets a run-time configuration value from running diskbalancer instance. For example : Disk Balancer bandwidth of a running instance.
      Parameters:
      key - runtime configuration key
      Returns:
      value of the key as a string.
      Throws:
      IOException - - Throws if there is no such key