Search in sources :

Example 1 with VPackBuilder

use of com.arangodb.velocypack.VPackBuilder in project YCSB by brianfrankcooper.

the class ArangoDB3Client method mapToJson.

private String mapToJson(HashMap<String, ByteIterator> values) {
    VPackBuilder builder = new VPackBuilder().add(ValueType.OBJECT);
    for (Map.Entry<String, ByteIterator> entry : values.entrySet()) {
        builder.add(entry.getKey(), byteIteratorToString(entry.getValue()));
    }
    builder.close();
    return arangoDB.util().deserialize(builder.slice(), String.class);
}
Also used : StringByteIterator(com.yahoo.ycsb.StringByteIterator) ByteIterator(com.yahoo.ycsb.ByteIterator) VPackBuilder(com.arangodb.velocypack.VPackBuilder) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

VPackBuilder (com.arangodb.velocypack.VPackBuilder)1 ByteIterator (com.yahoo.ycsb.ByteIterator)1 StringByteIterator (com.yahoo.ycsb.StringByteIterator)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1