Skip to content

Commit

Permalink
[Java] Separate termOffset and termId from the packed rawTail in the …
Browse files Browse the repository at this point in the history
…meta data for log inspection.
  • Loading branch information
mjpt777 committed May 23, 2016
1 parent 457678d commit d56e1af
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,14 @@ public static void main(final String[] args) throws Exception
for (int i = 0; i < PARTITION_COUNT; i++)
{
final UnsafeBuffer metaDataBuffer = atomicBuffers[i + PARTITION_COUNT];
final long rawTail = metaDataBuffer.getLongVolatile(TERM_TAIL_COUNTER_OFFSET);
final int termOffset = (int)(rawTail & 0xFFFF_FFFFL);
out.format(
"Index %d Term Meta Data status=%s tail=%d%n",
"Index %d Term Meta Data status=%s termOffset=%d termId=%d%n",
i,
termStatus(metaDataBuffer),
metaDataBuffer.getLong(TERM_TAIL_COUNTER_OFFSET) & 0xFFFF_FFFFL);
termOffset,
termId(rawTail));
}

for (int i = 0; i < PARTITION_COUNT; i++)
Expand Down

0 comments on commit d56e1af

Please sign in to comment.