Class KvStoreClient

java.lang.Object
com.mapr.kvstore.KvStoreClient
All Implemented Interfaces:
KvClientInterface

public class KvStoreClient extends Object implements KvClientInterface
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    long
     
    static final org.apache.commons.logging.Log
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    KvStoreClient(String clusterName, int rootCid, com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.IpAddr fsHost, int fsPort, boolean doNotTimeout, com.mapr.fs.proto.Security.CredentialsMsg creds)
     
    KvStoreClient(String clusterName, int rootCid, com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.IpAddr fsHost, int fsPort, boolean doNotTimeout, com.mapr.fs.proto.Security.CredentialsMsg creds, int numRpcThreads, int cldbPort, String coreSiteXmlPath)
     
    KvStoreClient(String clusterName, int rootCid, com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.IpAddr fsHost, List<Integer> kvPorts, boolean doNotTimeout, com.mapr.fs.proto.Security.CredentialsMsg creds, int numRpcThreads, int cldbPort, String coreSiteXmlPath)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    int
    create(String name, int mode, int keytype)
     
    int
    createdirs(String name, int mode)
     
    long
     
    long
     
    com.mapr.fs.proto.Common.FileType
    getfiletype(com.mapr.fs.proto.Common.FidMsg fid)
     
    com.mapr.fs.proto.Common.FSKeyType
    gettype(com.mapr.fs.proto.Common.FidMsg fid)
     
    com.mapr.fs.proto.Common.FidMsg
    lookup(String name)
     
    int
    Probe KvStore to check state of rootCid
    int
    remove(String name)
     
    int
    rename(String oldname, String newname)
     
    static final void
    setLogLevel(String logLevel)
     
    void
    setNoDelete(int cid, boolean setNoDelete)
    Use this to tell MapRClient to avoid invalidating container from its cid cache

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • binding

      public long binding
    • LOG

      public static final org.apache.commons.logging.Log LOG
  • Constructor Details

    • KvStoreClient

      public KvStoreClient(String clusterName, int rootCid, com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.IpAddr fsHost, int fsPort, boolean doNotTimeout, com.mapr.fs.proto.Security.CredentialsMsg creds) throws IOException
      Throws:
      IOException
    • KvStoreClient

      public KvStoreClient(String clusterName, int rootCid, com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.IpAddr fsHost, int fsPort, boolean doNotTimeout, com.mapr.fs.proto.Security.CredentialsMsg creds, int numRpcThreads, int cldbPort, String coreSiteXmlPath) throws IOException
      Throws:
      IOException
    • KvStoreClient

      public KvStoreClient(String clusterName, int rootCid, com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.IpAddr fsHost, List<Integer> kvPorts, boolean doNotTimeout, com.mapr.fs.proto.Security.CredentialsMsg creds, int numRpcThreads, int cldbPort, String coreSiteXmlPath) throws IOException
      Throws:
      IOException
  • Method Details

    • setLogLevel

      public static final void setLogLevel(String logLevel)
    • getBinding

      public long getBinding()
    • getBinding

      public long getBinding(KvStoreClient.BindingType bType)
    • setNoDelete

      public void setNoDelete(int cid, boolean setNoDelete)
      Use this to tell MapRClient to avoid invalidating container from its cid cache
      Parameters:
      cid -
      setNoDelete -
    • probe

      public int probe()
      Probe KvStore to check state of rootCid
      Specified by:
      probe in interface KvClientInterface
      Returns:
    • close

      public void close()
      Specified by:
      close in interface KvClientInterface
    • create

      public int create(String name, int mode, int keytype)
      Specified by:
      create in interface KvClientInterface
    • createdirs

      public int createdirs(String name, int mode)
      Specified by:
      createdirs in interface KvClientInterface
    • lookup

      public com.mapr.fs.proto.Common.FidMsg lookup(String name)
      Specified by:
      lookup in interface KvClientInterface
    • gettype

      public com.mapr.fs.proto.Common.FSKeyType gettype(com.mapr.fs.proto.Common.FidMsg fid)
      Specified by:
      gettype in interface KvClientInterface
    • getfiletype

      public com.mapr.fs.proto.Common.FileType getfiletype(com.mapr.fs.proto.Common.FidMsg fid)
      Specified by:
      getfiletype in interface KvClientInterface
    • remove

      public int remove(String name)
      Specified by:
      remove in interface KvClientInterface
    • rename

      public int rename(String oldname, String newname)
      Specified by:
      rename in interface KvClientInterface