Package com.thinkaurelius.titan.diskstorage

Examples of com.thinkaurelius.titan.diskstorage.StaticBuffer.asByteBuffer()


                    o.writeObject(entry.getKey(), String.class);
                    o.writeClassAndObject(entry.getValue());
                }
                final StaticBuffer buffer = o.getStaticBuffer();
                WritableUtils.writeVInt(out, buffer.length());
                out.write(ByteBufferUtil.getArray(buffer.asByteBuffer()));
            }
        }

        public static Map<String, Object> readFields(final DataInput in) throws IOException {
            final int numberOfProperties = WritableUtils.readVInt(in);
View Full Code Here


                o.writeObject(key, String.class);
                o.writeClassAndObject(element.getProperty(key));
            }
            final StaticBuffer buffer = o.getStaticBuffer();
            WritableUtils.writeVInt(out, buffer.length());
            out.write(ByteBufferUtil.getArray(buffer.asByteBuffer()));
        }
    }
}
View Full Code Here

                StaticBuffer key = titanMutation.getKey();
                KCVMutation mut = titanMutation.getValue();

                RowMutation rm = rowMutations.get(key);
                if (rm == null) {
                    rm = new RowMutation(keySpaceName, key.asByteBuffer());
                    rowMutations.put(key, rm);
                }

                if (mut.hasAdditions()) {
                    for (Entry e : mut.getAdditions()) {
View Full Code Here

        for (Map.Entry<String, Map<StaticBuffer, KCVMutation>> keyMutation : mutations.entrySet()) {
            String columnFamily = keyMutation.getKey();
            for (Map.Entry<StaticBuffer, KCVMutation> mutEntry : keyMutation.getValue().entrySet()) {
                StaticBuffer key = mutEntry.getKey();
                ByteBuffer keyBB = key.asByteBuffer();

                // Get or create the single Cassandra Mutation object responsible for this key
                Map<String, List<org.apache.cassandra.thrift.Mutation>> cfmutation = batch.get(keyBB);
                if (cfmutation == null) {
                    cfmutation = new HashMap<String, List<org.apache.cassandra.thrift.Mutation>>(3); // TODO where did the magic number 3 come from?
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.