All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vertexium.accumulo.StreamingPropertyValueHdfsRef Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium.accumulo;

import org.apache.hadoop.fs.Path;
import org.vertexium.accumulo.util.OverflowIntoHdfsStreamingPropertyValueStorageStrategy;
import org.vertexium.property.StreamingPropertyValue;
import org.vertexium.property.StreamingPropertyValueRef;

public class StreamingPropertyValueHdfsRef extends StreamingPropertyValueRef {
    private static final long serialVersionUID = -7075231119033637091L;
    private String path;

    // here for serialization
    protected StreamingPropertyValueHdfsRef() {

    }

    public StreamingPropertyValueHdfsRef(String path, StreamingPropertyValue propertyValue) {
        super(propertyValue);
        this.path = path;
    }

    public String getPath() {
        return path;
    }

    @Override
    public StreamingPropertyValue toStreamingPropertyValue(AccumuloGraph graph, long timestamp) {
        OverflowIntoHdfsStreamingPropertyValueStorageStrategy writer = (OverflowIntoHdfsStreamingPropertyValueStorageStrategy) graph.getStreamingPropertyValueStorageStrategy();
        return new StreamingPropertyValueHdfs(writer.getFileSystem(), new Path(writer.getDataDir(), getPath()), this);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy