Package com.mapr.cli

Class VolumeCommands

java.lang.Object
com.mapr.cliframework.base.CLIBaseClass
com.mapr.cli.common.ListCommand
com.mapr.cli.VolumeCommands
All Implemented Interfaces:
ListIterator, com.mapr.cliframework.base.CLIInterface

public class VolumeCommands extends ListCommand implements com.mapr.cliframework.base.CLIInterface
  • Field Details

  • Constructor Details

    • VolumeCommands

      public VolumeCommands(com.mapr.cliframework.base.ProcessedInput input, com.mapr.cliframework.base.CLICommand cliCommand)
  • Method Details

    • executeRealCommand

      public com.mapr.cliframework.base.CommandOutput executeRealCommand() throws com.mapr.cliframework.base.CLIProcessingException
      Specified by:
      executeRealCommand in class com.mapr.cliframework.base.CLIBaseClass
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • validateInput

      public boolean validateInput() throws IllegalArgumentException
      Specified by:
      validateInput in interface com.mapr.cliframework.base.CLIInterface
      Overrides:
      validateInput in class com.mapr.cliframework.base.CLIBaseClass
      Throws:
      IllegalArgumentException
    • volumeUnmountByName

      public static int volumeUnmountByName(String volumeName, String cluster, String userId, com.mapr.fs.proto.Security.CredentialsMsg creds, boolean isServerCall) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • updateEcVolumeProperties

      public void updateEcVolumeProperties(int volumeId, String topology, String label, String cluster, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • sendVolumeMoveRequest

      public static com.mapr.fs.cldb.proto.CLDBProto.VolumeMoveResponse sendVolumeMoveRequest(String volumeName, String topology, String dataLabel, String ncLabel, String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • volumeLookup

      public static com.mapr.fs.cldb.proto.CLDBProto.VolumeLookupResponse volumeLookup(String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, String name, String path, boolean isServerCall) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • buildNextRequest

      public com.google.protobuf.MessageLite buildNextRequest(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Builds the next request object by inspecting the previous request and previous response.
      Specified by:
      buildNextRequest in interface ListIterator
      Specified by:
      buildNextRequest in class ListCommand
      Returns:
      - new request object
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • hasMore

      public boolean hasMore(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Inspect the last request and last response to see if there are more records to be fetched.
      Specified by:
      hasMore in interface ListIterator
      Specified by:
      hasMore in class ListCommand
      Returns:
      - true, if there are more records. false, if no more.
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • processResponse

      public void processResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Parse the response and populate the output hierarchy.
      Specified by:
      processResponse in interface ListIterator
      Specified by:
      processResponse in class ListCommand
      Parameters:
      out - - CommandOutput.OutputHierarchy
      response - - response object
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • sendRequest

      public com.google.protobuf.MessageLite sendRequest(com.google.protobuf.MessageLite req) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Send the request using RPC and fetch the response.
      Specified by:
      sendRequest in interface ListIterator
      Specified by:
      sendRequest in class ListCommand
      Parameters:
      req - - request object.
      Returns:
      - the response object.
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • getFilledVolAce

      public com.mapr.fs.proto.Common.VolumeAces getFilledVolAce(com.mapr.fs.proto.Common.VolumeAces volAce)
    • getVolActions

      public String getVolActions(com.mapr.fs.proto.Common.VolumeAceEntry aceEntry)
    • addVolumeTierProperties

      public void addVolumeTierProperties(com.mapr.fs.cldb.proto.CLDBProto.VolumeInfo volInfo, com.mapr.fs.cldb.proto.CLDBProto.VolumeProperties volProps, com.mapr.cliframework.base.CommandOutput.OutputHierarchy.OutputNode volumeInfo, boolean terse, BitSet columns)
    • addCacheVolInfo

      public void addCacheVolInfo(com.mapr.fs.cldb.proto.CLDBProto.VolumeProperties volProps, com.mapr.cliframework.base.CommandOutput.OutputHierarchy.OutputNode volumeInfo, boolean terse, BitSet columns)
    • addEcBackendVolInfo

      public void addEcBackendVolInfo(com.mapr.fs.cldb.proto.CLDBProto.VolumeInfo volInfo, com.mapr.cliframework.base.CommandOutput.OutputHierarchy.OutputNode volumeInfo, boolean terse, BitSet columns)
    • VolumeLookupById

      public com.mapr.fs.cldb.proto.CLDBProto.VolumeInfo VolumeLookupById(int volumeId)
    • volumePropetiesLookup

      public com.mapr.fs.cldb.proto.CLDBProto.VolumeProperties volumePropetiesLookup(String volumeName, boolean needsRootCid) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • getRwVolumeName

      public String getRwVolumeName() throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • buildVolumeAcesProtobuf

      public com.mapr.fs.proto.Common.VolumeAces buildVolumeAcesProtobuf(Map<String,com.mapr.fs.proto.Common.VolumeActions> volumeAceParameterMap, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) throws IOException, com.mapr.cliframework.base.CLIProcessingException
      Parameters:
      volumeAceParameterMap -
      Returns:
      Throws:
      IOException - If any of the volume aces argument is incorrectly specified
      com.mapr.cliframework.base.CLIProcessingException
    • buildVolumeCreateRequest

      public com.mapr.fs.cldb.proto.CLDBProto.VolumeCreateRequest.Builder buildVolumeCreateRequest(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException