Class CsiClientImpl

java.lang.Object
org.apache.hadoop.yarn.csi.client.CsiClientImpl
All Implemented Interfaces:
CsiClient

public class CsiClientImpl extends Object implements CsiClient
A CSI client implementation that communicates with a CSI driver via unix domain socket. It leverages gRPC blocking stubs to synchronize the call with CSI driver. CSI spec is designed as a set of synchronized APIs, in order to make the call idempotent for failure recovery, so the client does the same.
  • Constructor Details

    • CsiClientImpl

      public CsiClientImpl(String address)
  • Method Details

    • getPluginInfo

      public csi.v0.Csi.GetPluginInfoResponse getPluginInfo() throws IOException
      Description copied from interface: CsiClient
      Gets some basic info about the CSI plugin, including the driver name, version and optionally some manifest info.
      Specified by:
      getPluginInfo in interface CsiClient
      Returns:
      Csi.GetPluginInfoResponse
      Throws:
      IOException - when unable to get plugin info from the driver.
    • validateVolumeCapabilities

      public csi.v0.Csi.ValidateVolumeCapabilitiesResponse validateVolumeCapabilities(csi.v0.Csi.ValidateVolumeCapabilitiesRequest request) throws IOException
      Specified by:
      validateVolumeCapabilities in interface CsiClient
      Throws:
      IOException
    • nodePublishVolume

      public csi.v0.Csi.NodePublishVolumeResponse nodePublishVolume(csi.v0.Csi.NodePublishVolumeRequest request) throws IOException
      Specified by:
      nodePublishVolume in interface CsiClient
      Throws:
      IOException
    • nodeUnpublishVolume

      public csi.v0.Csi.NodeUnpublishVolumeResponse nodeUnpublishVolume(csi.v0.Csi.NodeUnpublishVolumeRequest request) throws IOException
      Specified by:
      nodeUnpublishVolume in interface CsiClient
      Throws:
      IOException