com.bigdata.sparse
Class TimestampChooser
java.lang.Object
com.bigdata.sparse.TimestampChooser
- All Implemented Interfaces:
- IRowStoreConstants
public class TimestampChooser
- extends Object
- implements IRowStoreConstants
Utility class for choosing timestamps for the SparseRowStore on the
server.
- Version:
- $Id: TimestampChooser.java 2265 2009-10-26 12:51:06Z thompsonbry $
- Author:
- Bryan Thompson
|
Method Summary |
static long |
chooseTimestamp(IIndex ndx,
long timestamp)
Choose the timestamp for TPS.TPV tuples to written on the sparse row
store. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimestampChooser
public TimestampChooser()
chooseTimestamp
public static long chooseTimestamp(IIndex ndx,
long timestamp)
- Choose the timestamp for
TPS.TPV tuples to written on the sparse row
store.
Note: Revisions written with the same timestamp as a pre-existing column
value will overwrite the existing column value rather than causing new
revisions with their own distinct timestamp to be written. There is
therefore a choice for "auto" vs "auto-unique" for timestamps.
Note: Timestamps generated locally on the server will be consistent
within a row, and all revisions of column values for the same row will
always be in the same index partition and hence on the same server. This
means that we can use locally assigned timestamp as unique timestamps.
However, time could go backwards if there is a failover to another server
for the partition and the other server has a different clock time. This
is resolved by choosing a timestamp assigned by the global
ITimestampService.
- Parameters:
timestamp - When timestamp> is IRowStoreConstants.AUTO_TIMESTAMP
the timestamp is the local system time. When timestamp
is IRowStoreConstants.AUTO_TIMESTAMP_UNIQUE a federation
wide unique timestamp is assigned by the
ITimestampService. Otherwise the caller's
timestamp is returned.
Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.