Package com.mapr.cli

Class TierCommands

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

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

  • Constructor Details

    • TierCommands

      public TierCommands(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
    • generateTierNameForAutoCreate

      public static String generateTierNameForAutoCreate(String ecVolumeName)
    • tierLookup

      public static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponse tierLookup(String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, int tierId) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • tierLookup

      public static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponse tierLookup(String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, String tierName) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • tierLookup

      public static com.mapr.fs.cldb.proto.CLDBProto.TierLookupResponse tierLookup(String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, String tierName, int tierId) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • EcTierCreate

      public static com.mapr.fs.cldb.proto.CLDBProto.TierCreateResponse EcTierCreate(String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, String userLoginId, String tierName) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • tierRemove

      public static int tierRemove(String tierName, 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
    • deleteTierFromCLDB

      public static com.mapr.fs.cldb.proto.CLDBProto.TierRemoveResponse deleteTierFromCLDB(String tierName, com.mapr.fs.proto.Security.CredentialsMsg creds, String cluster) throws Exception
      Throws:
      Exception
    • buildNextRequest

      public com.mapr.fs.cldb.proto.CLDBProto.TierListRequest 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
    • getMetaVolumeTopology

      public String getMetaVolumeTopology(String metaVolumeName)
    • 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.mapr.fs.cldb.proto.CLDBProto.TierListResponse sendRequest(com.google.protobuf.MessageLite request) 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:
      request - - request object.
      Returns:
      - the response object.
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • getObjectTypeString

      public String getObjectTypeString(com.mapr.fs.cldb.proto.CLDBProto.ObjectStoreType objStore)
    • getObjectStoreType

      public com.mapr.fs.cldb.proto.CLDBProto.ObjectStoreType getObjectStoreType(String objectStoreType)