org.vertexium.accumulo.mapreduce.AccumuloMutationElementMapper Maven / Gradle / Ivy
package org.vertexium.accumulo.mapreduce;
import org.apache.accumulo.core.data.Mutation;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import java.io.IOException;
public abstract class AccumuloMutationElementMapper extends ElementMapper {
@Override
protected void saveDataMutation(Context context, Text dataTableName, Mutation m) throws IOException, InterruptedException {
context.write(getKey(context, dataTableName, m), m);
}
@Override
protected void saveEdgeMutation(Context context, Text edgesTableName, Mutation m) throws IOException, InterruptedException {
context.write(getKey(context, edgesTableName, m), m);
}
@Override
protected void saveVertexMutation(Context context, Text verticesTableName, Mutation m) throws IOException, InterruptedException {
context.write(getKey(context, verticesTableName, m), m);
}
@Override
protected void saveExtendedDataMutation(Context context, Text tableName, Mutation m) throws IOException, InterruptedException {
context.write(getKey(context, tableName, m), m);
}
protected Text getKey(Context context, Text tableName, Mutation m) {
return tableName;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy