Class BlockHeartbeatReport


  • @ThreadSafe
    public final class BlockHeartbeatReport
    extends java.lang.Object
    Container for the delta information in each worker-to-master heartbeat.
    • Constructor Summary

      Constructors 
      Constructor Description
      BlockHeartbeatReport​(java.util.Map<BlockStoreLocation,​java.util.List<java.lang.Long>> addedBlocks, java.util.List<java.lang.Long> removedBlocks, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> lostStorage)
      Creates a new instance of BlockHeartbeatReport.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<BlockStoreLocation,​java.util.List<java.lang.Long>> getAddedBlocks()
      Gets the list of blocks added by the worker in the heartbeat this report represents.
      java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getLostStorage()
      Gets the storage paths which were lost in the heartbeat this report represents.
      java.util.List<java.lang.Long> getRemovedBlocks()
      Gets the list of blocks removed from this worker in the heartbeat this report represents.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BlockHeartbeatReport

        public BlockHeartbeatReport​(java.util.Map<BlockStoreLocation,​java.util.List<java.lang.Long>> addedBlocks,
                                    java.util.List<java.lang.Long> removedBlocks,
                                    java.util.Map<java.lang.String,​java.util.List<java.lang.String>> lostStorage)
        Creates a new instance of BlockHeartbeatReport.
        Parameters:
        addedBlocks - added blocks
        removedBlocks - remove blocks
        lostStorage - lost storage
    • Method Detail

      • getAddedBlocks

        public java.util.Map<BlockStoreLocation,​java.util.List<java.lang.Long>> getAddedBlocks()
        Gets the list of blocks added by the worker in the heartbeat this report represents.
        Returns:
        a map from storage location to lists of block ids added
      • getRemovedBlocks

        public java.util.List<java.lang.Long> getRemovedBlocks()
        Gets the list of blocks removed from this worker in the heartbeat this report represents.
        Returns:
        a list of block ids which have been removed
      • getLostStorage

        public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getLostStorage()
        Gets the storage paths which were lost in the heartbeat this report represents.
        Returns:
        a map from storage tier alias to lost storage paths