Permalink
Browse files

Document fields of Link/Node

Summary:
Clarify fields in each data type, in particular the different function of
timestamp in the two data types.

Test Plan: Just added comments.  It still compiles

Reviewers: dhruba, emayanke

Reviewed By: emayanke

Differential Revision: https://reviews.facebook.net/D9957
  • Loading branch information...
1 parent 64441b5 commit 930ea9e43d12dccac516795efab445ba65caf681 @timarmstrong timarmstrong committed Apr 4, 2013
Showing with 25 additions and 2 deletions.
  1. +16 −2 src/java/com/facebook/LinkBench/Link.java
  2. +9 −0 src/java/com/facebook/LinkBench/Node.java
@@ -72,12 +72,26 @@ public Link clone() {
return l;
}
+ /** The node id of the source of directed edge */
public long id1;
- public long link_type;
+
+ /** The node id of the target of directed edge */
public long id2;
+
+ /** Type of link */
+ public long link_type;
+
+ /** Visibility mode */
public byte visibility;
- public byte[] data;
+
+ /** Version of link */
public int version;
+
+ /** time is the sort key for links. Often it contains a timestamp,
+ but it can be used as a arbitrary user-defined sort key. */
public long time;
+ /** Arbitrary payload data */
+ public byte[] data;
+
}
@@ -22,10 +22,19 @@
* @author tarmstrong
*/
public class Node {
+ /** Unique identifier for node */
public long id;
+
+ /** Type of node */
public int type;
+
+ /** Version of node: typically updated on every change */
public long version;
+
+ /** Last update time of node as UNIX timestamp */
public int time;
+
+ /** Arbitrary payload data */
public byte data[];
public Node(long id, int type, long version, int time,

0 comments on commit 930ea9e

Please sign in to comment.