Class RecordUtils
- java.lang.Object
-
- org.apache.iotdb.db.metadata.mtree.store.disk.schemafile.RecordUtils
-
public class RecordUtils extends java.lang.ObjectThis class translate an IMNode into a bytebuffer, or otherwise. Expected to support record as entry of segment-level index further. Coupling with IMNode structure.
-
-
Constructor Summary
Constructors Constructor Description RecordUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IMNodebuffer2Node(java.lang.String nodeName, java.nio.ByteBuffer buffer)NOTICE: Make sure that buffer has set its position and limit clearly before pass to this method.static java.lang.Stringbuffer2String(java.nio.ByteBuffer buffer)static booleangetAlignment(java.nio.ByteBuffer recBuf)static java.lang.StringgetRecordAlias(java.nio.ByteBuffer recBuf)static shortgetRecordLength(java.nio.ByteBuffer recBuf)These methods need a buffer whose position is ready to read.static longgetRecordSegAddr(java.nio.ByteBuffer recBuf)static bytegetRecordType(java.nio.ByteBuffer recBuf)static byte[]getSchemaBytes(java.nio.ByteBuffer recBuf)static java.nio.ByteBuffernode2Buffer(IMNode node)static voidupdateSegAddr(java.nio.ByteBuffer recBuf, long newSegAddr)
-
-
-
Method Detail
-
node2Buffer
public static java.nio.ByteBuffer node2Buffer(IMNode node)
-
buffer2Node
public static IMNode buffer2Node(java.lang.String nodeName, java.nio.ByteBuffer buffer) throws org.apache.iotdb.commons.exception.MetadataException
NOTICE: Make sure that buffer has set its position and limit clearly before pass to this method.- Parameters:
nodeName- name of the constructed nodebuffer- content of the node- Returns:
- node constructed from buffer
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getRecordLength
public static short getRecordLength(java.nio.ByteBuffer recBuf)
These methods need a buffer whose position is ready to read.
-
getRecordType
public static byte getRecordType(java.nio.ByteBuffer recBuf)
-
getRecordSegAddr
public static long getRecordSegAddr(java.nio.ByteBuffer recBuf)
-
getSchemaBytes
public static byte[] getSchemaBytes(java.nio.ByteBuffer recBuf)
-
getAlignment
public static boolean getAlignment(java.nio.ByteBuffer recBuf)
-
getRecordAlias
public static java.lang.String getRecordAlias(java.nio.ByteBuffer recBuf)
-
updateSegAddr
public static void updateSegAddr(java.nio.ByteBuffer recBuf, long newSegAddr)
-
buffer2String
public static java.lang.String buffer2String(java.nio.ByteBuffer buffer) throws org.apache.iotdb.commons.exception.MetadataException- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
-