> On Feb. 4, 2015, 10:22 a.m., Rakesh R wrote: > > src/java/main/org/apache/zookeeper/server/ExpiryQueue.java, line 53 > > <https://reviews.apache.org/r/30573/diff/2/?file=847280#file847280line53> > > > > There are few occurance where its using the Time#currentElapsedTime() > > to new Date(). This will give wrong Calendar date, how do we handle this > > case? > > > > Few examples are, > > > > 1) ExpiryQueue#dump(PrintWriter pwriter) > > pwriter.print(new Date(time)); > > > > 2) ServerBean#getLastResponseTime() > > new Date(stats.getLastResponseTime()).toString(); > > Hongchao Deng wrote: > Remove them!
Addressed this by adding a new static func Time#elapsedTimeToDate(). - Hongchao ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30573/#review70939 ----------------------------------------------------------- On Feb. 4, 2015, 9:37 p.m., Hongchao Deng wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30573/ > ----------------------------------------------------------- > > (Updated Feb. 4, 2015, 9:37 p.m.) > > > Review request for zookeeper. > > > Repository: zookeeper-git > > > Description > ------- > > Zookeeper should be tolerant of clock adjustments > > > Diffs > ----- > > src/java/main/org/apache/zookeeper/ClientCnxn.java > c85cc8d1b6dae0c0d0850d758420fb31a8dd1dcc > src/java/main/org/apache/zookeeper/ClientCnxnSocket.java > 16cb9120686bf982b4c68a0172600d23b6119042 > src/java/main/org/apache/zookeeper/Login.java > 6d248ab37a0a6b11358f5f3adc9dc363b1a9c73b > src/java/main/org/apache/zookeeper/Shell.java > 62169d797a7a103d921634c4676fffea878def51 > src/java/main/org/apache/zookeeper/ZKUtil.java > 4713a08a934175c2b297f69740e204c7288c078c > src/java/main/org/apache/zookeeper/common/Time.java PRE-CREATION > src/java/main/org/apache/zookeeper/server/ConnectionBean.java > 917aacfdcdcd50576029faab65ca98b89cfb2df9 > src/java/main/org/apache/zookeeper/server/ExpiryQueue.java > a037bf49235e386cc20ee68633ec162b1db013d1 > src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java > a97be4a5452006fbd85d355c0dcb16276cbf1c59 > src/java/main/org/apache/zookeeper/server/RateLogger.java > fc951cf5147bedbf1786ff1047a1e1a5fd7f5121 > src/java/main/org/apache/zookeeper/server/Request.java > ee01dcfa63784a9dd380f91d768e1b3f28b9cce9 > src/java/main/org/apache/zookeeper/server/ServerStats.java > c3246293e409d863412144ed76b2a91ca1ac98f2 > src/java/main/org/apache/zookeeper/server/SessionTrackerImpl.java > 0c2c042e276c557a86f47d7ab5333e6860e12bd9 > src/java/main/org/apache/zookeeper/server/WorkerService.java > c55ff48f92e5e3ae7783ad5be0262a5d9899c521 > src/java/main/org/apache/zookeeper/server/ZKDatabase.java > f336049f0afb7b539460223b4903d323e2558aed > src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java > 30a0ed390bb7473ddb36757da97bc7d5f4281887 > > src/java/main/org/apache/zookeeper/server/quorum/AuthFastLeaderElection.java > 6cd0af88292d9cb89652f1c6d2a80ec2726b5b6a > src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java > dfe692f4889a11b8a8eb3a4cbbd150ed5cac6a9f > src/java/main/org/apache/zookeeper/server/quorum/Follower.java > 6dbb0b22a4e0658a6b04629e6efdf1ac722375e5 > src/java/main/org/apache/zookeeper/server/quorum/Leader.java > 20589045752a7ba4ae9c9090055a4fcbe86a8eda > > src/java/main/org/apache/zookeeper/server/quorum/LearnerSnapshotThrottler.java > 97b48915321aab6ea31bd7db8fe1197165507feb > src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java > 388ceeb45bd18c7cb8f0766a96ebd4a54a9e76de > src/java/systest/org/apache/zookeeper/test/system/GenerateLoad.java > 4092c760f2cc4eda410ac6125e58ec399d1a6ca4 > src/java/systest/org/apache/zookeeper/test/system/InstanceManager.java > 809fa4819eed61aee3fcee1b5641ec85b967d479 > src/java/systest/org/apache/zookeeper/test/system/SimpleSysTest.java > 9cdf4d912a29e8a5341e4a9700fd07e1eeb015f3 > src/java/test/org/apache/zookeeper/common/TimeTest.java PRE-CREATION > src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java > 9abe47910f5d73195c57e9f33d9d2150a4861141 > src/java/test/org/apache/zookeeper/test/ClientBase.java > a6229b50b4a4486b443daa6b3b92ac4ab5cf94cb > src/java/test/org/apache/zookeeper/test/ClientHammerTest.java > b807dbb0f4350b29190b5d5862c418de84a168c5 > src/java/test/org/apache/zookeeper/test/CnxManagerTest.java > 563c77c41c86c692edfd95ea48d397bc25154d26 > src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java > ab84146f58e8f97ef24517703c30ef6015a71c84 > src/java/test/org/apache/zookeeper/test/ReadOnlyModeTest.java > 0579858659cec892aee3fa4362d0c55d175d87a7 > src/java/test/org/apache/zookeeper/test/StaticHostProviderTest.java > bf1dcef7fbca91fee6128096e8413013fa11e0e0 > src/java/test/org/apache/zookeeper/test/TestHammer.java > 09a678b28c1915d419d586dfc6a523060b1df1aa > src/java/test/org/apache/zookeeper/test/ZooKeeperTestClient.java > 5386a7a910686a44cbe33f5ac18674d92b6aad44 > > Diff: https://reviews.apache.org/r/30573/diff/ > > > Testing > ------- > > > Thanks, > > Hongchao Deng > >