Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Document fields of Link/Node
Browse files Browse the repository at this point in the history
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
Tim Armstrong committed Apr 4, 2013
1 parent 64441b5 commit 930ea9e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/java/com/facebook/LinkBench/Link.java
Expand Up @@ -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;

}
9 changes: 9 additions & 0 deletions src/java/com/facebook/LinkBench/Node.java
Expand Up @@ -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,
Expand Down

0 comments on commit 930ea9e

Please sign in to comment.