Package org.apache.cassandra.io

Examples of org.apache.cassandra.io.DataInputBuffer.readInt()


    public static RangeSliceReply read(byte[] body) throws IOException
    {
        DataInputBuffer bufIn = new DataInputBuffer();
        bufIn.reset(body, body.length);
        boolean completed = bufIn.readBoolean();
        int rowCount = bufIn.readInt();
        List<Row> rows = new ArrayList<Row>(rowCount);
        for (int i = 0; i < rowCount; i++)
        {
            rows.add(Row.serializer().deserialize(bufIn));
        }
View Full Code Here


                    bufIn.reset(bufOut.getData(), bufOut.getLength());

                    /* The key is the table name */
                    String key = bufIn.readUTF();
                    /* read the size of the data we ignore this value */
                    bufIn.readInt();
                    tableMetadata_ = Table.TableMetadata.serializer().deserialize(bufIn);
                    break;
                }       
            }           
        }
View Full Code Here

                    bufIn.reset(bufOut.getData(), bufOut.getLength());
                    /* Skip over the commit log key portion */
                    bufIn.readUTF();
                    /* Skip over data size */
                    bufIn.readInt();
                   
                    /* read the commit log entry */
                    try
                    {                       
                        Row row = Row.serializer().deserialize(bufIn);
View Full Code Here

             * certain parts
           */
            // read the key
            bufIn.readUTF();
            // read the data length and then deserialize
            bufIn.readInt();
            try
            {
                systemRow_ = Row.serializer().deserialize(bufIn);
            }
            catch ( IOException e )
View Full Code Here

             * certain parts
           */
            // read the key
            bufIn.readUTF();
            // read the data length and then deserialize
            bufIn.readInt();
            try
            {
                systemRow_ = Row.serializer().deserialize(bufIn);
            }
            catch ( IOException e )
View Full Code Here

                    bufIn.reset(bufOut.getData(), bufOut.getLength());

                    /* The key is the table name */
                    bufIn.readUTF();
                    /* read the size of the data we ignore this value */
                    bufIn.readInt();
                    tableMetadata_ = Table.TableMetadata.serializer().deserialize(bufIn);
                    break;
                }       
            }           
        }
View Full Code Here

                    bufIn.reset(bufOut.getData(), bufOut.getLength());
                    /* Skip over the commit log key portion */
                    bufIn.readUTF();
                    /* Skip over data size */
                    bufIn.readInt();
                   
                    /* read the commit log entry */
                    try
                    {                       
                        Row row = Row.serializer().deserialize(bufIn);
View Full Code Here

                /* Key just read */
                String key = bufIn.readUTF();
                if ( key.equals(SSTable.blockIndexKey_) )
                {
                    /* Ignore the size of the data associated with the block index */
                    bufIn.readInt();
                    /* Number of keys in the block. */
                    int blockSize = bufIn.readInt();
                    /* Largest key in the block */
                    String largestKey = null;

View Full Code Here

                if ( key.equals(SSTable.blockIndexKey_) )
                {
                    /* Ignore the size of the data associated with the block index */
                    bufIn.readInt();
                    /* Number of keys in the block. */
                    int blockSize = bufIn.readInt();
                    /* Largest key in the block */
                    String largestKey = null;

                    /*
                     * Read the keys in this block and find the largest key in
View Full Code Here

                /* Key just read */
                String key = bufIn.readUTF();
                /* check if we want this key */
                if ( key.equals(keyToExtract) )
                {
                  int keySize = bufIn.readInt();
                  byte[] keyData = new byte[keySize];
                  bufIn.read(keyData, 0, keySize);

                  /* write the key data into a file */
                    RandomAccessFile raf = new RandomAccessFile(outputFile, "rw");                 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.