Package com.mapr.fs

Class Inode

java.lang.Object
com.mapr.fs.Inode

public final class Inode extends Object
  • Field Details

    • EMPTY_BYTE_ARRAY

      public static final byte[] EMPTY_BYTE_ARRAY
    • allInStreams

      public static com.mapr.fs.Inode.List<Closeable> allInStreams
    • allOutStreams

      public static com.mapr.fs.Inode.List<Closeable> allOutStreams
    • allTables

      public static com.mapr.fs.Inode.List<MapRHTable> allTables
  • Constructor Details

    • Inode

      public Inode(long clusterPtr, long filePtr, String filename, MapRHTable htable, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo) throws IOException
      Throws:
      IOException
    • Inode

      public Inode(long clusterPtr, long filePtr, String filename, MapRFsOutStream outStream, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo) throws IOException
      Throws:
      IOException
    • Inode

      public Inode(long clusterPtr, long filePtr, String filename, MapRFsInStream inStream, com.mapr.fs.jni.InodeAttributes attr, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo) throws IOException
      Throws:
      IOException
    • Inode

      public Inode(long clusterPtr, long filePtr, String filename, MapRFsInStream inStream, com.mapr.fs.jni.JNILoggerProxy logger, com.mapr.fs.jni.MapRUserInfo userInfo) throws IOException
      Throws:
      IOException
  • Method Details

    • allocWriteBuffers

      public static void allocWriteBuffers(int numPages)
    • getFidStr

      public String getFidStr()
    • getFidServers

      public long[] getFidServers()
    • getChunkSize

      public long getChunkSize()
    • attrs

      public com.mapr.fs.jni.InodeAttributes attrs()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isStale

      public boolean isStale()
    • eof

      public long eof()
    • haveEof

      public boolean haveEof()
    • filename

      public String filename()
    • allocatePage

      public com.mapr.fs.jni.Page allocatePage(long startPos) throws IOException
      Throws:
      IOException
    • releaseDirty

      public void releaseDirty(com.mapr.fs.jni.Page p) throws IOException
      Throws:
      IOException
    • syncUpto

      public void syncUpto(long pos) throws IOException
      Throws:
      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 IOException
      Throws:
      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, String file, long intendReadTillOffset) throws IOException
      Throws:
      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, String file) throws IOException
      Throws:
      IOException
    • removeFromInStreams

      public void removeFromInStreams()
    • adviseFile

      public void adviseFile(int type, long offset, long count) throws IOException
      Throws:
      IOException
    • close

      public void close(boolean doFlush) throws IOException
      Throws:
      IOException
    • lastUpdateTime

      public long lastUpdateTime()
    • flushPuts

      public void flushPuts() throws IOException
      Throws:
      IOException
    • closeAll

      public static void closeAll()
    • put

      public void put(com.mapr.fs.jni.MapRPut[] mputs) throws IOException
      Throws:
      IOException
    • syncPut

      public void syncPut(com.mapr.fs.jni.MapRPut[] mputs, boolean shouldBlock, boolean rowMut) throws IOException
      Throws:
      IOException
    • getBulkLoader

      public long getBulkLoader(byte[] tableUuidForPuts) throws IOException
      Throws:
      IOException
    • bulkLoaderAppend

      public void bulkLoaderAppend(long bulkLoaderId, com.mapr.fs.jni.MapRPut[] mputs) throws IOException
      Throws:
      IOException
    • bulkLoaderAppendEncoded

      public void bulkLoaderAppendEncoded(long bulkLoaderId, com.mapr.fs.jni.MapRJSONPut[] mput) throws IOException
      Throws:
      IOException
    • bulkLoaderClose

      public void bulkLoaderClose(long bulkLoaderId) throws IOException
      Throws:
      IOException
    • get

      public void get(com.mapr.fs.jni.MapRGet[] mgets, boolean shouldFlush) throws IOException
      Throws:
      IOException
    • multiTabletGet

      public void multiTabletGet(com.mapr.fs.jni.MapRGet[] mgets, boolean shouldFlush) throws IOException
      Throws:
      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 IOException
      Throws:
      IOException
    • closeScanner

      public void closeScanner(long scannerId) throws IOException
      Throws:
      IOException
    • getScanner

      public long getScanner(com.mapr.fs.jni.MapRScan scan) throws IOException
      Throws:
      IOException
    • getSchema

      public byte[] getSchema(long version)
    • getFamilyName

      public String getFamilyName(int id) throws IOException
      Throws:
      IOException
    • getFamilyId

      public int getFamilyId(String fname) throws IOException
      Throws:
      IOException
    • increment

      public void increment(com.mapr.fs.jni.MapRIncrement incr, boolean shouldFlush) 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

      public void delete(com.mapr.fs.jni.MapRPut[] mputs) throws IOException
      Throws:
      IOException
    • asyncDelete

      public void asyncDelete(com.mapr.fs.jni.MapRPut[] mputs) 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
    • 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
    • append

      public void append(com.mapr.fs.jni.MapRPut mput, boolean needResult, boolean shouldFlush) throws IOException
      Throws:
      IOException
    • checkAndReplaceOrDelete

      public void checkAndReplaceOrDelete(ByteBuffer key, ByteBuffer[] serRecords, int[] mutationsFamilyIds, 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[] perFamRecordMuts, int[] mutationsFamilyIds, byte[] serReadConstraint, boolean shouldFlush, com.mapr.fs.jni.MapRUpdateAndGet muag) throws IOException
      Throws:
      IOException
    • isJson

      public boolean isJson()
    • getTableProperties

      public TableProperties getTableProperties()
    • commitAndGetContext

      public com.mapr.fs.proto.Dbserver.CommitContext commitAndGetContext() throws IOException, IllegalStateException
      Throws:
      IOException
      IllegalStateException
    • createIndexSyncStateTracker

      public com.mapr.fs.jni.IndexSyncStateTracker createIndexSyncStateTracker() throws IOException
      Throws:
      IOException
    • createIndexSyncStateTracker

      public com.mapr.fs.jni.IndexSyncStateTracker createIndexSyncStateTracker(com.mapr.fs.proto.Dbserver.CommitContext ctx) throws IOException
      Throws:
      IOException
    • beginCommitContext

      public void beginCommitContext() throws IOException, IllegalStateException
      Throws:
      IOException
      IllegalStateException
    • beginCommitContext

      public void beginCommitContext(com.mapr.fs.proto.Dbserver.CommitContext ctx) throws IOException, IllegalStateException
      Throws:
      IOException
      IllegalStateException
    • clearCommitContext

      public void clearCommitContext() throws IllegalStateException
      Throws:
      IllegalStateException