Closed shvachko closed 9 years ago
There is another similar thing in hbase org.apache.hadoop.hbase.util.EnvironmentEdgeManager and it provides org.apache.hadoop.hbase.util.EnvironmentEdge. This interface has a couple of useful implementations to make it possible to control time. HBase uses this EnvironmentEdge in many places, so we can write tests with controlled timestamps, that is good for testing edge situations of eventual consistency in our storage.
I just removed the now()
methods and imported Time.now()
from hadoop.
See branch issue-102
for review.
Good to know about HBase EnvironmentEdge
Andrey. Funny how every project has same tools.
Got an approval from Plamen for this.
Just committed.
One in BlockManagementAgent, another in NamespaceProcessor, and a bunch of direct use of o.a.h.u.Time.now(). I propose to do static import of o.a.h.u.Time.now(), and use now() in the code. That way it will be easy to replace it with giraffa impl. of now() if needed.