Package com.mapr.fs
Class Inode
- java.lang.Object
-
- com.mapr.fs.Inode
-
public final class Inode extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classInode.ScanCacheElem
-
Field Summary
Fields Modifier and Type Field Description static com.mapr.fs.Inode.List<java.io.Closeable>allInStreamsstatic com.mapr.fs.Inode.List<java.io.Closeable>allOutStreamsstatic com.mapr.fs.Inode.List<MapRHTable>allTablesstatic byte[]EMPTY_BYTE_ARRAY
-
Constructor Summary
Constructors Constructor Description Inode(long clusterPtr, long filePtr, java.lang.String filename, MapRFsInStream inStream, com.mapr.fs.jni.InodeAttributes attr, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo)Inode(long clusterPtr, long filePtr, java.lang.String filename, MapRFsInStream inStream, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo)Inode(long clusterPtr, long filePtr, java.lang.String filename, MapRFsOutStream outStream, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo)Inode(long clusterPtr, long filePtr, java.lang.String filename, MapRHTable htable, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToScanCache(long scannerId, com.mapr.fs.jni.MapRResult[] res, int numSkip, int numGet)voidadviseFile(int type, long offset, long count)com.mapr.fs.jni.PageallocatePage(long startPos)com.mapr.fs.jni.Page[]allocateReadaheadPages(long startPos, int bytes)static voidallocWriteBuffers(int numPages)voidappend(com.mapr.fs.jni.MapRPut mput, boolean needResult, boolean shouldFlush)voidasyncDelete(com.mapr.fs.jni.MapRPut[] mputs)com.mapr.fs.jni.InodeAttributesattrs()voidbeginCommitContext()voidbeginCommitContext(com.mapr.fs.proto.Dbserver.CommitContext ctx)voidbulkLoaderAppend(long bulkLoaderId, com.mapr.fs.jni.MapRPut[] mputs)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, 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(java.nio.ByteBuffer key, java.nio.ByteBuffer[] serRecordMutations, int[] mutationsFamilyIds, byte[] serReadConstraint, java.nio.ByteBuffer serCondition, boolean shouldFlush, com.mapr.fs.jni.MapRUpdateAndGet muag)booleancheckAndPut(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput, boolean shouldFlush)voidcheckAndReplaceOrDelete(java.nio.ByteBuffer key, java.nio.ByteBuffer[] serRecords, int[] mutationsFamilyIds, byte[] serReadConstraint, java.nio.ByteBuffer condition, boolean shouldFlush, boolean isDelete, com.mapr.fs.jni.MapRUpdateAndGet muag)voidcleanupAfterRead(com.mapr.fs.jni.Page[] pagesToFill, int bytesRecd)voidclearCommitContext()voidclose(boolean doFlush)static voidcloseAll()voidcloseScanner(long scannerId)com.mapr.fs.proto.Dbserver.CommitContextcommitAndGetContext()com.mapr.fs.jni.IndexSyncStateTrackercreateIndexSyncStateTracker()com.mapr.fs.jni.IndexSyncStateTrackercreateIndexSyncStateTracker(com.mapr.fs.proto.Dbserver.CommitContext ctx)voiddelete(com.mapr.fs.jni.MapRPut[] mputs)voiddiscardPage(com.mapr.fs.jni.Page p)longeof()java.lang.Stringfilename()voidfillPages(com.mapr.fs.jni.Page[] pagesToFill, com.mapr.fs.jni.SFid sfid, org.apache.hadoop.fs.PathId pfid, java.lang.String file, long intendReadTillOffset)voidflush()voidflushPuts()voidfreeArena(long arenaAddr)voidget(com.mapr.fs.jni.MapRGet[] mgets, boolean shouldFlush)longgetBulkLoader(byte[] tableUuidForPuts)longgetChunkSize()com.mapr.fs.jni.PagegetDataIntoCache(long startPos, int length, long intendReadTillOffset, com.mapr.fs.jni.SFid sfid, org.apache.hadoop.fs.PathId pfid, java.lang.String file)intgetFamilyId(java.lang.String fname)java.lang.StringgetFamilyName(int id)long[]getFidServers()java.lang.StringgetFidStr()longgetScanner(com.mapr.fs.jni.MapRScan scan)byte[]getSchema(long version)TablePropertiesgetTableProperties()booleanhaveEof()voidincrement(com.mapr.fs.jni.MapRIncrement incr, boolean shouldFlush)booleanisJson()booleanisStale()longlastUpdateTime()voidmultiTabletGet(com.mapr.fs.jni.MapRGet[] mgets, boolean shouldFlush)voidput(com.mapr.fs.jni.MapRPut[] mputs)intreadPages(com.mapr.fs.jni.Page[] pagesToFill, long intendReadTillOffset)voidreleaseDirty(com.mapr.fs.jni.Page p)voidremoveFromInStreams()voidreturnPageToCache(com.mapr.fs.jni.Page p)voidscanNext(long scannerId, int numRows, com.mapr.fs.jni.MapRResult[] res)voidsyncPut(com.mapr.fs.jni.MapRPut[] mputs, boolean shouldBlock, boolean rowMut)voidsyncUpto(long pos)java.lang.StringtoString()voidupdateRecord(java.nio.ByteBuffer key, java.nio.ByteBuffer[] perFamRecordMuts, int[] mutationsFamilyIds, byte[] serReadConstraint, boolean shouldFlush, com.mapr.fs.jni.MapRUpdateAndGet muag)
-
-
-
Field Detail
-
EMPTY_BYTE_ARRAY
public static final byte[] EMPTY_BYTE_ARRAY
-
allInStreams
public static com.mapr.fs.Inode.List<java.io.Closeable> allInStreams
-
allOutStreams
public static com.mapr.fs.Inode.List<java.io.Closeable> allOutStreams
-
allTables
public static com.mapr.fs.Inode.List<MapRHTable> allTables
-
-
Constructor Detail
-
Inode
public Inode(long clusterPtr, long filePtr, java.lang.String filename, MapRHTable htable, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo) throws java.io.IOException- Throws:
java.io.IOException
-
Inode
public Inode(long clusterPtr, long filePtr, java.lang.String filename, MapRFsOutStream outStream, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo) throws java.io.IOException- Throws:
java.io.IOException
-
Inode
public Inode(long clusterPtr, long filePtr, java.lang.String filename, MapRFsInStream inStream, com.mapr.fs.jni.InodeAttributes attr, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo) throws java.io.IOException- Throws:
java.io.IOException
-
Inode
public Inode(long clusterPtr, long filePtr, java.lang.String filename, MapRFsInStream inStream, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
allocWriteBuffers
public static void allocWriteBuffers(int numPages)
-
getFidStr
public java.lang.String getFidStr()
-
getFidServers
public long[] getFidServers()
-
getChunkSize
public long getChunkSize()
-
attrs
public com.mapr.fs.jni.InodeAttributes attrs()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isStale
public boolean isStale()
-
eof
public long eof()
-
haveEof
public boolean haveEof()
-
filename
public java.lang.String filename()
-
allocatePage
public com.mapr.fs.jni.Page allocatePage(long startPos) throws java.io.IOException- Throws:
java.io.IOException
-
releaseDirty
public void releaseDirty(com.mapr.fs.jni.Page p) throws java.io.IOException- Throws:
java.io.IOException
-
syncUpto
public void syncUpto(long pos) throws java.io.IOException- Throws:
java.io.IOException
-
flush
public void flush()
-
returnPageToCache
public void returnPageToCache(com.mapr.fs.jni.Page p)
-
discardPage
public void discardPage(com.mapr.fs.jni.Page p)
-
allocateReadaheadPages
public com.mapr.fs.jni.Page[] allocateReadaheadPages(long startPos, int bytes)
-
readPages
public int readPages(com.mapr.fs.jni.Page[] pagesToFill, long intendReadTillOffset) throws java.io.IOException- Throws:
java.io.IOException
-
cleanupAfterRead
public void cleanupAfterRead(com.mapr.fs.jni.Page[] pagesToFill, int bytesRecd)
-
fillPages
public void fillPages(com.mapr.fs.jni.Page[] pagesToFill, com.mapr.fs.jni.SFid sfid, org.apache.hadoop.fs.PathId pfid, java.lang.String file, long intendReadTillOffset) throws java.io.IOException- Throws:
java.io.IOException
-
getDataIntoCache
public com.mapr.fs.jni.Page getDataIntoCache(long startPos, int length, long intendReadTillOffset, com.mapr.fs.jni.SFid sfid, org.apache.hadoop.fs.PathId pfid, java.lang.String file) throws java.io.IOException- Throws:
java.io.IOException
-
removeFromInStreams
public void removeFromInStreams()
-
adviseFile
public void adviseFile(int type, long offset, long count) throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close(boolean doFlush) throws java.io.IOException- Throws:
java.io.IOException
-
lastUpdateTime
public long lastUpdateTime()
-
flushPuts
public void flushPuts() throws java.io.IOException- Throws:
java.io.IOException
-
closeAll
public static void closeAll()
-
put
public void put(com.mapr.fs.jni.MapRPut[] mputs) throws java.io.IOException- Throws:
java.io.IOException
-
syncPut
public void syncPut(com.mapr.fs.jni.MapRPut[] mputs, boolean shouldBlock, boolean rowMut) throws java.io.IOException- Throws:
java.io.IOException
-
getBulkLoader
public long getBulkLoader(byte[] tableUuidForPuts) throws java.io.IOException- Throws:
java.io.IOException
-
bulkLoaderAppend
public void bulkLoaderAppend(long bulkLoaderId, com.mapr.fs.jni.MapRPut[] mputs) throws java.io.IOException- Throws:
java.io.IOException
-
bulkLoaderAppendEncoded
public void bulkLoaderAppendEncoded(long bulkLoaderId, com.mapr.fs.jni.MapRJSONPut[] mput) throws java.io.IOException- Throws:
java.io.IOException
-
bulkLoaderClose
public void bulkLoaderClose(long bulkLoaderId) throws java.io.IOException- Throws:
java.io.IOException
-
get
public void get(com.mapr.fs.jni.MapRGet[] mgets, boolean shouldFlush) throws java.io.IOException- Throws:
java.io.IOException
-
multiTabletGet
public void multiTabletGet(com.mapr.fs.jni.MapRGet[] mgets, boolean shouldFlush) throws java.io.IOException- Throws:
java.io.IOException
-
freeArena
public void freeArena(long arenaAddr)
-
addToScanCache
public void addToScanCache(long scannerId, com.mapr.fs.jni.MapRResult[] res, int numSkip, int numGet)
-
scanNext
public void scanNext(long scannerId, int numRows, com.mapr.fs.jni.MapRResult[] res) throws java.io.IOException- Throws:
java.io.IOException
-
closeScanner
public void closeScanner(long scannerId) throws java.io.IOException- Throws:
java.io.IOException
-
getScanner
public long getScanner(com.mapr.fs.jni.MapRScan scan) throws java.io.IOException- Throws:
java.io.IOException
-
getSchema
public byte[] getSchema(long version)
-
getFamilyName
public java.lang.String getFamilyName(int id) throws java.io.IOException- Throws:
java.io.IOException
-
getFamilyId
public int getFamilyId(java.lang.String fname) throws java.io.IOException- Throws:
java.io.IOException
-
increment
public void increment(com.mapr.fs.jni.MapRIncrement incr, boolean shouldFlush) throws java.io.IOException- Throws:
java.io.IOException
-
checkAndPut
public boolean checkAndPut(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput, boolean shouldFlush) throws java.io.IOException- Throws:
java.io.IOException
-
delete
public void delete(com.mapr.fs.jni.MapRPut[] mputs) throws java.io.IOException- Throws:
java.io.IOException
-
asyncDelete
public void asyncDelete(com.mapr.fs.jni.MapRPut[] mputs) throws java.io.IOException- Throws:
java.io.IOException
-
checkAndDelete
public boolean checkAndDelete(byte[] row, boolean useCf, int familyId, byte[] qualifier, byte[] value, com.mapr.fs.jni.MapRPut mput, boolean shouldFlush) throws java.io.IOException- Throws:
java.io.IOException
-
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 java.io.IOException- Throws:
java.io.IOException
-
append
public void append(com.mapr.fs.jni.MapRPut mput, boolean needResult, boolean shouldFlush) throws java.io.IOException- Throws:
java.io.IOException
-
checkAndReplaceOrDelete
public void checkAndReplaceOrDelete(java.nio.ByteBuffer key, java.nio.ByteBuffer[] serRecords, int[] mutationsFamilyIds, byte[] serReadConstraint, java.nio.ByteBuffer condition, boolean shouldFlush, boolean isDelete, com.mapr.fs.jni.MapRUpdateAndGet muag) throws java.io.IOException- Throws:
java.io.IOException
-
checkAndMutate
public void checkAndMutate(java.nio.ByteBuffer key, java.nio.ByteBuffer[] serRecordMutations, int[] mutationsFamilyIds, byte[] serReadConstraint, java.nio.ByteBuffer serCondition, boolean shouldFlush, com.mapr.fs.jni.MapRUpdateAndGet muag) throws java.io.IOException- Throws:
java.io.IOException
-
updateRecord
public void updateRecord(java.nio.ByteBuffer key, java.nio.ByteBuffer[] perFamRecordMuts, int[] mutationsFamilyIds, byte[] serReadConstraint, boolean shouldFlush, com.mapr.fs.jni.MapRUpdateAndGet muag) throws java.io.IOException- Throws:
java.io.IOException
-
isJson
public boolean isJson()
-
getTableProperties
public TableProperties getTableProperties()
-
commitAndGetContext
public com.mapr.fs.proto.Dbserver.CommitContext commitAndGetContext() throws java.io.IOException, java.lang.IllegalStateException- Throws:
java.io.IOExceptionjava.lang.IllegalStateException
-
createIndexSyncStateTracker
public com.mapr.fs.jni.IndexSyncStateTracker createIndexSyncStateTracker() throws java.io.IOException- Throws:
java.io.IOException
-
createIndexSyncStateTracker
public com.mapr.fs.jni.IndexSyncStateTracker createIndexSyncStateTracker(com.mapr.fs.proto.Dbserver.CommitContext ctx) throws java.io.IOException- Throws:
java.io.IOException
-
beginCommitContext
public void beginCommitContext() throws java.io.IOException, java.lang.IllegalStateException- Throws:
java.io.IOExceptionjava.lang.IllegalStateException
-
beginCommitContext
public void beginCommitContext(com.mapr.fs.proto.Dbserver.CommitContext ctx) throws java.io.IOException, java.lang.IllegalStateException- Throws:
java.io.IOExceptionjava.lang.IllegalStateException
-
clearCommitContext
public void clearCommitContext() throws java.lang.IllegalStateException- Throws:
java.lang.IllegalStateException
-
-