Skip to content

Instantly share code, notes, and snippets.

@okram
Created December 12, 2013 20:25
Show Gist options
  • Save okram/7934816 to your computer and use it in GitHub Desktop.
Save okram/7934816 to your computer and use it in GitHub Desktop.
private void readPathElement(final FaunusPathElement element, Schema schema, final DataInput in) throws IOException {
readElement(element,schema,in);
//in.readBoolean();
element.pathEnabled = element.getConf().getBoolean(FaunusCompiler.PATH_ENABLED, false);
if (element.pathEnabled) {
element.paths = readElementPaths(in);
element.microVersion = (element instanceof FaunusVertex) ? new FaunusVertex.MicroVertex(element.id) : new FaunusEdge.MicroEdge(element.id);
} else
element.pathCounter = WritableUtils.readVLong(in);
}
private void writePathElement(final FaunusPathElement element, final Schema schema, final DataOutput out) throws IOException {
writeElement(element,schema,out);
//out.writeBoolean(element.pathEnabled);
if (element.pathEnabled)
writeElementPaths(element.paths, out);
else
WritableUtils.writeVLong(out, element.pathCounter);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment