Search in sources :

Example 1 with StringElementStorage

use of com.tencent.angel.ps.storage.vector.storage.StringElementStorage in project angel by Tencent.

the class ComplexRowFormat method save.

private void save(ServerStringAnyRow row, PSMatrixSaveContext saveContext, MatrixPartitionMeta partMeta, DataOutputStream output) throws IOException {
    StringElementStorage storage = row.getStorage();
    ObjectIterator<Object2ObjectMap.Entry<String, IElement>> iter = storage.iterator();
    while (iter.hasNext()) {
        Object2ObjectMap.Entry<String, IElement> entry = iter.next();
        save(entry.getKey(), entry.getValue(), output);
    }
}
Also used : Entry(java.util.Map.Entry) IElement(com.tencent.angel.ps.storage.vector.element.IElement) Object2ObjectMap(it.unimi.dsi.fastutil.objects.Object2ObjectMap) StringElementStorage(com.tencent.angel.ps.storage.vector.storage.StringElementStorage)

Aggregations

IElement (com.tencent.angel.ps.storage.vector.element.IElement)1 StringElementStorage (com.tencent.angel.ps.storage.vector.storage.StringElementStorage)1 Object2ObjectMap (it.unimi.dsi.fastutil.objects.Object2ObjectMap)1 Entry (java.util.Map.Entry)1