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();
}
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();
}
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();
}
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();
}
Aggregations