[
https://issues.apache.org/jira/browse/HBASE-21476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16734528#comment-16734528
]
Sean Busbey commented on HBASE-21476:
-------------------------------------
If you modify our yetus personality's definition for "personality_modules"
([line 179 currently defines arguments we pass for unit
tests|https://github.com/apache/hbase/blob/master/dev-support/hbase-personality.sh#L179])
to include that flag then you can get a test run with the flag active.
We'll need a plan on how testing this will work going forward, because we a)
don't want to run all the tests with just this flag set, b) probably we don't
want to run all the tests with it on and off in precommit, c) maybe we want
both for nightly tests?
One way to do this is to define a profile that has a selection of tests that
provide good coverage of this feature as well as the needed flag to have them
run with the table attribute set. Then we can add to our yetus personality a
test that expressly is running unit tests with that profile active.
These are things that should be included in the scope document, probably by
expanding the section on testing.
> Support for nanosecond timestamps
> ---------------------------------
>
> Key: HBASE-21476
> URL: https://issues.apache.org/jira/browse/HBASE-21476
> Project: HBase
> Issue Type: New Feature
> Affects Versions: 2.1.1
> Reporter: Andrey Elenskiy
> Assignee: Andrey Elenskiy
> Priority: Major
> Labels: features, patch
> Attachments: Apache HBase - Nanosecond Timestamps v1.pdf,
> HBASE-21476.branch-2.1.0003.patch, HBASE-21476.branch-2.1.0004.patch,
> nanosecond_timestamps_v1.patch, nanosecond_timestamps_v2.patch
>
>
> Introducing a new table attribute "NANOSECOND_TIMESTAMPS" to tell HBase to
> handle timestamps with nanosecond precision. This is useful for applications
> that timestamp updates at the source with nanoseconds and still want features
> like column family TTL and "hbase.hstore.time.to.purge.deletes" to work.
> The attribute should be specified either on new tables or on existing tables
> which have timestamps only with nanosecond precision. There's no migration
> from milliseconds to nanoseconds for already existing tables. We could add
> this migration as part of compaction if you think that would be useful, but
> that would obviously make the change more complex.
> I've added a new EnvironmentEdge method "currentTimeNano()" that uses
> [java.time.Instant|https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html]
> to get time in nanoseconds which means it will only work with Java 8. The
> idea is to gradually replace all places where "EnvironmentEdge.currentTime()"
> is used to have HBase working purely with nanoseconds (which is a
> prerequisite for HBASE-14070). Also, I've refactored ScanInfo and
> PartitionedMobCompactor to expect TableDescriptor as an argument which makes
> code a little cleaner and easier to extend.
> Couple more points:
> - column family TTL (specified in seconds) and
> "hbase.hstore.time.to.purge.deletes" (specified in milliseconds) options
> don't need to be changed, those are adjusted automatically.
> - Per cell TTL needs to be scaled by clients accordingly after
> "NANOSECOND_TIMESTAMPS" table attribute is specified.
> Looking for everyone's feedback to know if that's a worthwhile direction.
> Will add more comprehensive tests in a later patch.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)