java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.containermanager.volume.csi.ContainerVolumePublisher

public class ContainerVolumePublisher extends Object
Publish/un-publish CSI volumes on node manager.
  • Constructor Details

  • Method Details

    • publishVolumes

      public Map<String,String> publishVolumes() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      It first discovers the volume info from container resource; then negotiates with CSI driver adaptor to publish the volume on this node manager, on a specific directory under container's work dir; and then map the local mounted directory to volume target mount in the docker container. CSI volume publish is a two phase work, by reaching up here we can assume the 1st phase is done on the RM side, which means YARN is already called the controller service of csi-driver to publish the volume; here we only need to call the node service of csi-driver to publish the volume on this local node manager.
      Returns:
      a map where each key is the local mounted path on current node, and value is the remote mount path on the container.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • unpublishVolumes

      public void unpublishVolumes() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException