Package com.yahoo.ycsb

Examples of com.yahoo.ycsb.ByteIterator


                array[i] = (byte)k.charAt(j);
                i++;
            }
            array[i] = '\t'; // XXX would like to use sane delimiter (null, 254, 255, ...) but java makes this nearly impossible
            i++;
            ByteIterator v = values.get(k);
            i = v.nextBuf(array, i);
            array[i] = '\t';
            i++;
        }
        array[array.length-1] = 0;
        ByteBuffer buf = ByteBuffer.wrap(array);
View Full Code Here


        {
            byte[] k = key.getBytes(UTF8);
            m_writeBuf.putInt(k.length);
            m_writeBuf.put(k);

            ByteIterator v = columns.get(key);
            int len = (int) v.bytesLeft();
            m_writeBuf.putInt(len);
            v.nextBuf(m_workingData, m_writeBuf.position());
            m_writeBuf.position(m_writeBuf.position() + len);
        }

        byte[] data = new byte[m_writeBuf.position()];
        System.arraycopy(m_workingData, 0, data, 0, data.length);
View Full Code Here

        HashMap<String, ByteIterator> values = new HashMap<String, ByteIterator>();

        for (int i = 0; i < 4; i++)
        {
            String fieldkey = "field" + i;
            ByteIterator data = new RandomByteIterator(fieldlengthgenerator.nextInt());
            values.put(fieldkey, data);
        }
        return values;
    }
View Full Code Here

                System.out.print("Reading key: " + key);
            }

            Column column;
            String name;
            ByteIterator value;
           
            assert results != null && !results.isEmpty();
/*            for (ColumnOrSuperColumn oneresult : results)
            {

View Full Code Here

            {
                tuple = new HashMap<String, ByteIterator>();

                Column column;
                String name;
                ByteIterator value;
                for (ColumnOrSuperColumn onecol : oneresult.columns)
                {
                    column = onecol.column;
                    name = new String(column.name.array(), column.name.position() + column.name.arrayOffset(),
                            column.name.remaining());
View Full Code Here

TOP

Related Classes of com.yahoo.ycsb.ByteIterator

Copyright © 2018 www.massapicom. 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.