Package com.mapr.fs
Class MapRHTable
java.lang.Object
com.mapr.fs.MapRHTable
- All Implemented Interfaces:
com.mapr.fs.jni.MapRConstants,Closeable,AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mapr.fs.jni.MapRConstants
com.mapr.fs.jni.MapRConstants.ErrorValue, com.mapr.fs.jni.MapRConstants.JniUsername, com.mapr.fs.jni.MapRConstants.PutConstants, com.mapr.fs.jni.MapRConstants.RowConstants -
Field Summary
Fields inherited from interface com.mapr.fs.jni.MapRConstants
AtimeBit, AuditBit, ChunkSizeBit, ClusterConfDefault, CompressBit, CompressorTypeBit, DEFAULT_USER_IDENTIFIER, DEFAULT_USER_IDENTIFIER_ESCAPED, DefaultChunkSize, DefaultCLDBIp, DefaultCLDBPort, DiskFlushBit, EMPTY_BYTE_ARRAY, EMPTY_END_ROW, EMPTY_START_ROW, FidNameBit, GlobalClusterConfDefault, GroupBit, HADOOP_MAX_BLOCKSIZE, HADOOP_SECURITY_SPOOFED_GID, HADOOP_SECURITY_SPOOFED_GROUP, HADOOP_SECURITY_SPOOFED_UID, HADOOP_SECURITY_SPOOFED_USER, HOSTNAME_IP_SEPARATOR, IP_PORT_SEPARATOR, IPV6_ADDR_ENDER, IPV6_ADDR_STARTER, IPv6DefaultCLDBIp, LAST_ROW, LATEST_TIMESTAMP, MAPR_ENV_VAR, MAPR_PROPERTY_HOME, MapRClusterDir, MapRClusterDirPattern, MapRClusterDirSlash, MAPRFS_PREFIX, MAPRFS_SCHEME, MapRHomeDefault, MAX_CLUSTERS_CROSSED, MAX_PATH_LENGTH, MAX_PORT_NUMBER, MAX_RA_THREADS, MIN_RA_THREADS, MinChunkSize, ModeBit, MtimeBit, MULTI_ADDR_SEPARATOR, NUM_CONTAINERS_PER_RPC, OLDEST_TIMESTAMP, RA_THREADS_PER_STREAM, ReplBit, SSL_TRUSTSTORE, UserBit, UTF8_ENCODING, WireSecureBit -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddScanner(MapRResultScanner scanner) voidappend(com.mapr.fs.jni.MapRPut mput) voidappend(com.mapr.fs.jni.MapRPut mput, boolean needResult) voidappend(com.mapr.fs.jni.MapRPut mput, boolean needResult, boolean shouldFlush) voidasyncDelete(com.mapr.fs.jni.MapRPut mput) voidasyncDelete(com.mapr.fs.jni.MapRPut[] mputs) voidbooleanasyncToCheckAndMutate(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput, boolean shouldFlush) voidbulkLoaderAppend(long bulkLoaderId, com.mapr.fs.jni.MapRPut mput) voidbulkLoaderAppend(long bulkLoaderId, com.mapr.fs.jni.MapRPut[] mput) voidbulkLoaderAppendEncoded(long bulkLoaderId, com.mapr.fs.jni.MapRJSONPut mput) voidbulkLoaderAppendEncoded(long bulkLoaderId, com.mapr.fs.jni.MapRJSONPut[] mput) voidbulkLoaderClose(long bulkLoaderId) booleancheckAndDelete(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput) booleancheckAndDelete(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput, boolean shouldFlush) booleancheckAndMutate(byte[] row, boolean useCf, boolean checkForNonExist, com.mapr.fs.jni.MapRRowConstraint checkConstraint, com.mapr.fs.proto.Dbfilters.FilterMsg filterMsg, com.mapr.fs.jni.MapRPut[] mputs, boolean shouldFlush) voidcheckAndMutate(ByteBuffer key, ByteBuffer[] serRecordMutations, int[] mutationsFamilyIds, byte[] serReadConstraint, ByteBuffer serCondition, boolean shouldFlush, com.mapr.fs.jni.MapRUpdateAndGet muag) booleancheckAndMutateToCheckAndPut(byte[] row, boolean useCf, boolean checkForNonExist, com.mapr.fs.jni.MapRRowConstraint checkConstraint, com.mapr.fs.proto.Dbfilters.FilterMsg filterMsg, com.mapr.fs.jni.MapRPut[] mputs, boolean shouldFlush) booleancheckAndPut(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput) booleancheckAndPut(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput, boolean shouldFlush) voidcheckAndReplaceOrDelete(ByteBuffer key, ByteBuffer[] serRecords, int[] recordFamilyIds, byte[] serReadConstraint, ByteBuffer condition, boolean shouldFlush, boolean isDelete, com.mapr.fs.jni.MapRUpdateAndGet muag) booleanvoidclose()voidvoidcloseScanner(long scannerId) voiddelete(com.mapr.fs.jni.MapRPut mput) voiddelete(com.mapr.fs.jni.MapRPut[] mputs) static longflip(long a) voidvoidfreeArena(long arenaAddr) com.mapr.fs.jni.MapRResultget(com.mapr.fs.jni.MapRGet mget) com.mapr.fs.jni.MapRResult[]get(com.mapr.fs.jni.MapRGet[] mgets) com.mapr.fs.jni.MapRResult[]get(com.mapr.fs.jni.MapRGet[] mgets, boolean shouldFlush) com.mapr.fs.jni.MapRResultget(com.mapr.fs.jni.MapRGet mget, boolean shouldFlush) longlonggetBulkLoader(byte[] tableUuid) org.apache.hadoop.conf.ConfigurationgetConf()intgetFamilyId(String name) getFamilyName(int id) getInode()voidgetJson(com.mapr.fs.jni.MapRGet mget) voidgetJson(com.mapr.fs.jni.MapRGet[] mgets) voidgetMultiTabletJson(com.mapr.fs.jni.MapRGet[] mgets) byte[]getName()longgetScanner(com.mapr.fs.jni.MapRScan scan) com.mapr.fs.proto.Dbserver.TableBasicStatsgetScanRangeStats(byte[] stKey, byte[] endKey) getSecurityPolicyID(String policyName) This method fetches the security policy ID for the given security policy name from the locally-cached securityPolicyNameToIdMap_.getSecurityPolicyName(Integer policyID) This method fetches the security policy name for the given security policy ID from the locally-cached securityPolicyIdToNameMap_.getServerForCid(int cid) org.apache.hadoop.fs.PathgetTabletScanner(boolean needSpaceUsage, boolean prefetchTabletMap) getTabletScanner(byte[] row) getTabletScanner(byte[] startKey, byte[] endKey, boolean spaceUsage, boolean prefetchTabletMap) voidincrement(com.mapr.fs.jni.MapRIncrement incr) voidincrement(com.mapr.fs.jni.MapRIncrement incr, boolean shouldFlush) voidinit(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path tablePath) voidinit(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path priTablePath, String indexName, String indexFid) booleanisJson()longvoidput(com.mapr.fs.jni.MapRPut mput) voidput(com.mapr.fs.jni.MapRPut[] mputs) voidremoveScanner(MapRResultScanner scanner) voidscanNext(long scannerId, int nbRows, com.mapr.fs.jni.MapRResult[] res) voidsyncPut(com.mapr.fs.jni.MapRPut mput) voidsyncPut(com.mapr.fs.jni.MapRPut[] mputs) voidsyncPut(com.mapr.fs.jni.MapRPut[] mputs, boolean shouldBlock) voidsyncPut(com.mapr.fs.jni.MapRPut[] mputs, boolean shouldBlock, boolean rowMut) voidsyncPut(com.mapr.fs.jni.MapRPut mput, boolean shouldBlock) voidtryClose(boolean doFlush) voidtryClose(boolean doFlush, boolean closeMFS) The closeMFS parameter has been passed in to this method so that we don't try to call close() method in the synchronized block.static booleanunsignedLessThan(long a, long b) voidupdateRecord(ByteBuffer key, ByteBuffer[] serRecordMutations, int[] mutationsFamilyIds, byte[] serReadConstraint, boolean shouldFlush, com.mapr.fs.jni.MapRUpdateAndGet muag)
-
Constructor Details
-
MapRHTable
public MapRHTable() -
MapRHTable
-
-
Method Details
-
unsignedLessThan
public static boolean unsignedLessThan(long a, long b) -
flip
public static long flip(long a) -
init
public void init(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path tablePath) throws IOException - Throws:
IOException
-
init
public void init(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path priTablePath, String indexName, String indexFid) throws IOException - Throws:
IOException
-
put
- Throws:
IOException
-
put
- Throws:
IOException
-
syncPut
- Throws:
IOException
-
syncPut
- Throws:
IOException
-
syncPut
- Throws:
IOException
-
syncPut
- Throws:
IOException
-
syncPut
public void syncPut(com.mapr.fs.jni.MapRPut[] mputs, boolean shouldBlock, boolean rowMut) throws IOException - Throws:
IOException
-
getBulkLoader
- Throws:
IOException
-
bulkLoaderClose
- Throws:
IOException
-
bulkLoaderAppend
- Throws:
IOException
-
bulkLoaderAppend
- Throws:
IOException
-
bulkLoaderAppendEncoded
public void bulkLoaderAppendEncoded(long bulkLoaderId, com.mapr.fs.jni.MapRJSONPut mput) throws IOException - Throws:
IOException
-
bulkLoaderAppendEncoded
public void bulkLoaderAppendEncoded(long bulkLoaderId, com.mapr.fs.jni.MapRJSONPut[] mput) throws IOException - Throws:
IOException
-
getName
public byte[] getName() -
getTablePath
public org.apache.hadoop.fs.Path getTablePath() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
closeNoFlush
- Throws:
IOException
-
tryClose
- Throws:
IOException
-
tryClose
The closeMFS parameter has been passed in to this method so that we don't try to call close() method in the synchronized block. The tryClose() method is also called from close(), and closeNoFlush() methods within the synchronized block, and we want to avoid close()ing MFS to avoid a deadlock.- Throws:
IOException
-
lastUpdateTime
public long lastUpdateTime() -
flushCommits
- Throws:
IOException
-
getJson
- Throws:
IOException
-
getJson
- Throws:
IOException
-
getMultiTabletJson
- Throws:
IOException
-
get
- Throws:
IOException
-
get
- Throws:
IOException
-
get
public com.mapr.fs.jni.MapRResult get(com.mapr.fs.jni.MapRGet mget, boolean shouldFlush) throws IOException - Throws:
IOException
-
get
public com.mapr.fs.jni.MapRResult[] get(com.mapr.fs.jni.MapRGet[] mgets, boolean shouldFlush) throws IOException - Throws:
IOException
-
freeArena
public void freeArena(long arenaAddr) -
addScanner
-
removeScanner
-
increment
- Throws:
IOException
-
increment
- Throws:
IOException
-
checkAndPut
public boolean checkAndPut(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput) throws IOException - Throws:
IOException
-
checkAndPut
public boolean checkAndPut(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput, boolean shouldFlush) throws IOException - Throws:
IOException
-
delete
- Throws:
IOException
-
delete
- Throws:
IOException
-
asyncDelete
- Throws:
IOException
-
asyncDelete
- Throws:
IOException
-
checkAndDelete
public boolean checkAndDelete(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput) throws IOException - Throws:
IOException
-
checkAndDelete
public boolean checkAndDelete(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput, boolean shouldFlush) throws IOException - Throws:
IOException
-
checkUseUpdateAndGet
public boolean checkUseUpdateAndGet() -
checkAndMutate
public boolean checkAndMutate(byte[] row, boolean useCf, boolean checkForNonExist, com.mapr.fs.jni.MapRRowConstraint checkConstraint, com.mapr.fs.proto.Dbfilters.FilterMsg filterMsg, com.mapr.fs.jni.MapRPut[] mputs, boolean shouldFlush) throws IOException - Throws:
IOException
-
checkAndMutateToCheckAndPut
public boolean checkAndMutateToCheckAndPut(byte[] row, boolean useCf, boolean checkForNonExist, com.mapr.fs.jni.MapRRowConstraint checkConstraint, com.mapr.fs.proto.Dbfilters.FilterMsg filterMsg, com.mapr.fs.jni.MapRPut[] mputs, boolean shouldFlush) throws IOException - Throws:
IOException
-
asyncToCheckAndMutate
public boolean asyncToCheckAndMutate(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput, boolean shouldFlush) throws IOException - Throws:
IOException
-
append
- Throws:
IOException
-
append
- Throws:
IOException
-
append
public void append(com.mapr.fs.jni.MapRPut mput, boolean needResult, boolean shouldFlush) throws IOException - Throws:
IOException
-
getFamilyName
- Throws:
IOException
-
getFamilyId
- Throws:
IOException
-
getAverageRowSize
- Throws:
IOException
-
getScanRangeStats
public com.mapr.fs.proto.Dbserver.TableBasicStats getScanRangeStats(byte[] stKey, byte[] endKey) throws IOException - Throws:
IOException
-
getTabletScanner
- Throws:
IOException
-
getTabletScanner
- Throws:
IOException
-
getTabletScanner
public MapRTabletScanner getTabletScanner(boolean needSpaceUsage, boolean prefetchTabletMap) throws IOException - Throws:
IOException
-
getTabletScanner
public MapRTabletScanner getTabletScanner(byte[] startKey, byte[] endKey, boolean spaceUsage, boolean prefetchTabletMap) throws IOException - Throws:
IOException
-
getServerForCid
- Throws:
IOException
-
asyncFlush
- Throws:
IOException
-
getScanner
- Throws:
IOException
-
scanNext
public void scanNext(long scannerId, int nbRows, com.mapr.fs.jni.MapRResult[] res) throws IOException - Throws:
IOException
-
closeScanner
- Throws:
IOException
-
getMapRFS
-
getInode
-
getConf
public org.apache.hadoop.conf.Configuration getConf() -
isJson
- Throws:
IOException
-
checkAndReplaceOrDelete
public void checkAndReplaceOrDelete(ByteBuffer key, ByteBuffer[] serRecords, int[] recordFamilyIds, byte[] serReadConstraint, ByteBuffer condition, boolean shouldFlush, boolean isDelete, com.mapr.fs.jni.MapRUpdateAndGet muag) throws IOException - Throws:
IOException
-
checkAndMutate
public void checkAndMutate(ByteBuffer key, ByteBuffer[] serRecordMutations, int[] mutationsFamilyIds, byte[] serReadConstraint, ByteBuffer serCondition, boolean shouldFlush, com.mapr.fs.jni.MapRUpdateAndGet muag) throws IOException - Throws:
IOException
-
updateRecord
public void updateRecord(ByteBuffer key, ByteBuffer[] serRecordMutations, int[] mutationsFamilyIds, byte[] serReadConstraint, boolean shouldFlush, com.mapr.fs.jni.MapRUpdateAndGet muag) throws IOException - Throws:
IOException
-
getSecurityPolicyID
This method fetches the security policy ID for the given security policy name from the locally-cached securityPolicyNameToIdMap_. If not found in the map, it fetchees it from the JNI MapClient cache. If no valid policy ID is returned by this method, it is safe to assume that the policy has not been created in the policy domain.- Parameters:
policyName- Security Policy name tag for which ID is required- Returns:
- Security Policy ID
- Throws:
IOException
-
getSecurityPolicyName
This method fetches the security policy name for the given security policy ID from the locally-cached securityPolicyIdToNameMap_. If not found in the map, it fetchees it from the JNI MapClient cache. If no valid policy name is returned by this method, it is safe to assume that the policy has not been created in the policy domain.- Parameters:
policyID- Security Policy ID tag for which nmae is required- Returns:
- Security Policy Name
- Throws:
IOException
-