Search in sources :

Example 1 with JsonWriter

use of voldemort.serialization.json.JsonWriter in project voldemort by voldemort.

the class ReadOnlyStorageMetadata method toJsonString.

public String toJsonString() throws IOException {
    StringWriter stringWriter = new StringWriter();
    new JsonWriter(stringWriter).writeMap(properties);
    stringWriter.flush();
    return stringWriter.toString();
}
Also used : StringWriter(java.io.StringWriter) JsonWriter(voldemort.serialization.json.JsonWriter)

Example 2 with JsonWriter

use of voldemort.serialization.json.JsonWriter in project voldemort by voldemort.

the class CheckSumMetadata method toJsonString.

public String toJsonString() throws IOException {
    StringWriter stringWriter = new StringWriter();
    new JsonWriter(stringWriter).writeMap(properties);
    stringWriter.flush();
    return stringWriter.toString();
}
Also used : StringWriter(java.io.StringWriter) JsonWriter(voldemort.serialization.json.JsonWriter)

Example 3 with JsonWriter

use of voldemort.serialization.json.JsonWriter in project voldemort by voldemort.

the class RebalancerState method toJsonString.

public String toJsonString() {
    List<Map<String, Object>> maps = Lists.newLinkedList();
    for (RebalanceTaskInfo rebalanceTaskInfo : stealInfoMap.values()) maps.add(rebalanceTaskInfo.asMap());
    StringWriter stringWriter = new StringWriter();
    new JsonWriter(stringWriter).write(maps);
    stringWriter.flush();
    return stringWriter.toString();
}
Also used : StringWriter(java.io.StringWriter) Map(java.util.Map) JsonWriter(voldemort.serialization.json.JsonWriter) RebalanceTaskInfo(voldemort.client.rebalance.RebalanceTaskInfo)

Example 4 with JsonWriter

use of voldemort.serialization.json.JsonWriter in project voldemort by voldemort.

the class RebalanceTaskInfo method toJsonString.

public synchronized String toJsonString() {
    Map<String, Object> map = asMap();
    StringWriter writer = new StringWriter();
    new JsonWriter(writer).write(map);
    writer.flush();
    return writer.toString();
}
Also used : StringWriter(java.io.StringWriter) JsonWriter(voldemort.serialization.json.JsonWriter)

Aggregations

StringWriter (java.io.StringWriter)4 JsonWriter (voldemort.serialization.json.JsonWriter)4 Map (java.util.Map)1 RebalanceTaskInfo (voldemort.client.rebalance.RebalanceTaskInfo)1