[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13651169#comment-13651169 ] Lars Hofhansl commented on HBASE-6476: -- I think we should just leave this whole issue alone. Sorry for filing in the first place. Thanks Chris for trying to make it work. Will mark as "Won't fix" later today if nobody objects. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Priority: Minor > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt, 6476v3.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470516#comment-13470516 ] Chris Trezzo commented on HBASE-6476: - A few curious things (if anyone has any thoughts on these that would be great): 1. Check out the Test history: https://builds.apache.org/job/HBase-TRUNK/3392/testReport/junit/org.apache.hadoop.hbase.util/TestThreads/testSleepWithoutInterrupt/history/ The System.currentTimeMillis() change might not have caused the test failure (it has failed twice for the same reason since the patch was reverted). In addition, there is something wonky going on because the test duration for all the failed runs is 1~2ms. The error message for the failed runs stated that the test timed out after 6000ms, which is the timeout set in the test tag. 2. The method sleepWithoutInterrupt is only called from test code, except during thrift server shutdown. Look at TBoundedThreadPoolServer.shutdownServer(). Anyone have any thoughts why we do the extra wait which calls sleepWithoutInterrupt? My thoughts are that we could remove the extra wait since we are already calling awaitTermination on the executor service in a loop above. Either that, or we could just replace the call with another call to awaitTermination and keep the second wait loop. This would limit sleepWithoutInterrupt calls to just test code. 3. Another tricky part with the EdgeManager is dealing with small tests that run in parallel within the same JVM. If test1 uses a non-default EnvironmentEdge, and test2 is relying on the DefaultEdge and doesn't set it explicitly, test2 would unknowingly be using whatever EnvironmentEdge test1 set. This would create flapping tests that might be tricky to debug. Thoughts? Thanks, Chris > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Chris Trezzo >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt, 6476v3.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467064#comment-13467064 ] Chris Trezzo commented on HBASE-6476: - hmm... testSleepWithoutInterrupt seems to consistently pass when I run it locally. Investigating further. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Chris Trezzo >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt, 6476v3.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466991#comment-13466991 ] Chris Trezzo commented on HBASE-6476: - I'll take a look. Thanks! > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Chris Trezzo >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt, 6476v3.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466366#comment-13466366 ] Hudson commented on HBASE-6476: --- Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #200 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/200/]) HBASE-6476 Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent; REVERT (Revision 1391852) Result = FAILURE stack : Files : * /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Threads.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/Chore.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/HServerInfo.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/RegionTransition.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/Delete.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ProtobufRpcEngine.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableRecordReaderImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/GeneralBulkAssigner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionState.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/DefaultLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/TimeToLiveLogCleaner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DeleteTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/EnableTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/metrics/MetricsRate.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MemoryBoundedLogMessageBuffer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredRPCHandlerImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredTaskImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/GetClosestRowBeforeTracker.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Leases.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java * /hbase/trunk/hbase-server/src/m
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466289#comment-13466289 ] Hudson commented on HBASE-6476: --- Integrated in HBase-TRUNK #3395 (See [https://builds.apache.org/job/HBase-TRUNK/3395/]) HBASE-6476 Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent; REVERT (Revision 1391852) Result = FAILURE stack : Files : * /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Threads.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/Chore.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/HServerInfo.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/RegionTransition.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/Delete.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ProtobufRpcEngine.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableRecordReaderImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/GeneralBulkAssigner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionState.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/DefaultLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/TimeToLiveLogCleaner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DeleteTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/EnableTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/metrics/MetricsRate.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MemoryBoundedLogMessageBuffer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredRPCHandlerImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredTaskImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/GetClosestRowBeforeTracker.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Leases.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hba
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466274#comment-13466274 ] stack commented on HBASE-6476: -- I backed out the patch. Mind taking a looksee [~ctrezzo]? Thanks boss. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Chris Trezzo >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt, 6476v3.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466182#comment-13466182 ] Hudson commented on HBASE-6476: --- Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #199 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/199/]) HBASE-6476 Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent (Revision 1391699) Result = FAILURE stack : Files : * /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Threads.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/Chore.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/HServerInfo.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/RegionTransition.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/Delete.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ProtobufRpcEngine.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableRecordReaderImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/GeneralBulkAssigner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionState.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/DefaultLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/TimeToLiveLogCleaner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DeleteTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/EnableTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/metrics/MetricsRate.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MemoryBoundedLogMessageBuffer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredRPCHandlerImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredTaskImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/GetClosestRowBeforeTracker.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Leases.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java * /hbase/trunk/hbase-server/src/main/java
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466069#comment-13466069 ] Ted Yu commented on HBASE-6476: --- Looks like trunk build is broken again (build 3392): {code} Tests in error: testSleepWithoutInterrupt(org.apache.hadoop.hbase.util.TestThreads): test timed out after 6000 milliseconds {code} > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Chris Trezzo >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt, 6476v3.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466058#comment-13466058 ] Hudson commented on HBASE-6476: --- Integrated in HBase-TRUNK #3392 (See [https://builds.apache.org/job/HBase-TRUNK/3392/]) HBASE-6476 Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent (Revision 1391699) Result = FAILURE stack : Files : * /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Threads.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/Chore.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/HServerInfo.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/RegionTransition.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/Delete.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ServerCallable.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ProtobufRpcEngine.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableRecordReaderImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/GeneralBulkAssigner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionState.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/DefaultLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/TimeToLiveLogCleaner.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DeleteTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/EnableTableHandler.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/metrics/MetricsRate.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MemoryBoundedLogMessageBuffer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredRPCHandlerImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredTaskImpl.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/GetClosestRowBeforeTracker.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Leases.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regio
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466011#comment-13466011 ] Hadoop QA commented on HBASE-6476: -- -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12547067/6476v3.txt against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 hadoop2.0. The patch compiles against the hadoop 2.0 profile. -1 javadoc. The javadoc tool appears to have generated 149 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 7 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/2961//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2961//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2961//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2961//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2961//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2961//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2961//console This message is automatically generated. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Chris Trezzo >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt, 6476v3.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465809#comment-13465809 ] Chris Trezzo commented on HBASE-6476: - I'll work on this today and post a patch. I agree it should be pretty easy. Thanks! Chris > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465321#comment-13465321 ] stack commented on HBASE-6476: -- Any progress on this? Seems like a hard won agreement. The patch should be easy after the above? Good stuff. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453925#comment-13453925 ] nkeywal commented on HBASE-6476: If we were right before, it means we should never need WallClockTime in the 'main' code, so that would lead to do two checks (System.currentTimeMillis and WallClockTime ) instead of one. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13452516#comment-13452516 ] Lars Hofhansl commented on HBASE-6476: -- We can also add a new method to EnvEdge called WallClockTime (or something). That way all code will only refer to EnvEdge and will also we very explicit about whether wall clock time is needed to time tests or this is a "controllable" time. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450080#comment-13450080 ] nkeywal commented on HBASE-6476: Personally, I'm ok with that (changing/enforcing src/main only). > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450063#comment-13450063 ] Chris Trezzo commented on HBASE-6476: - How about as an intermediate step we do the following: 1. Change all the occurrences in src/main code (that way when a new test uses EnvEdge they get predictable behaviour). 2. Add a check to hadoopQA to ensure no new occurrences are added. In the future, people can change the occurrences in test code on an as-needed test-by-test basis. Thoughts? If this sounds good, I can post a re-based version and a HadoopQA check. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449489#comment-13449489 ] nkeywal commented on HBASE-6476: I think we're actually on the same line :-). In src/main code, we should NEVER use System.currentTimeMillis(). In src/test code, we sometimes use it to measure the time spent in the function. For example: {noformat} // some test code final long max = System.currentTimeMillis() + 1; while (!condition){ // condition is modified by another thread from src/main Assert.assertTrue( System.currentTimeMillis() < max, " condition not met after 10s, exiting); Thread.sleep(1) } // more test code {noformat} I've wrote quite a lot of code like this. It helps the test to fail fast and clearly. In a way, that comes from JUnit/Surefire limitations. But at the end of the day, there is no reason to use EnvEdge here. On the contrary, we should NOT use it here. Because we could imagine a test that needs both to have a specific EnvEdge to fake the time for the src/main method, but still need to check that we're not spending too much 'real' time in it. What do you think? > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449433#comment-13449433 ] Lars Hofhansl commented on HBASE-6476: -- Hmm... Tests are *precisely* the place where you want to control time (i.e. not real time), so you do not need to write time dependent tests. And this specifically true to random number generation, so you get a predictable (or at least identical on each run) sequence of random numbers. Now, maybe in some cases you actually have to make you won't get the same random for each run, but by default you get the real time; so you just don't override the default EnvironmentEdge. I'm confused now. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449410#comment-13449410 ] Ted Yu commented on HBASE-6476: --- >From N: bq. I've done it just before this patch after a comment from Stack, but after some thinking I don't think it's a good idea: in tests you want the real time. See https://reviews.apache.org/r/6521/diff/1/?file=137550#file137550line52 > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449402#comment-13449402 ] Lars Hofhansl commented on HBASE-6476: -- Somehow I forgot to commit this. Thanks for rebasing Chris. Might be worth to check the code after patch to make sure we did not introduce new calls to System.currentTimeMillis(). > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449296#comment-13449296 ] Chris Trezzo commented on HBASE-6476: - Woops. Removing that patch. Repo was out-of-date. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt, 6476-v2.txt, 6476-v2.txt, 6476v3.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428869#comment-13428869 ] stack commented on HBASE-6476: -- +1 on commit. Open new issue to add in check? > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476-v2.txt, 6476-v2.txt, 6476.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428308#comment-13428308 ] Lars Hofhansl commented on HBASE-6476: -- The test is unrelated. I searched the generated findbugs warning for "EnvironmentEdge" and did not find anything. So I think this is good to go. If there are no objections I'll commit this soon. (Then I'll need some help added the build task to check for these, but according to @nkeyval that should be simple). > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476-v2.txt, 6476-v2.txt, 6476.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426319#comment-13426319 ] Hadoop QA commented on HBASE-6476: -- -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12538646/6476-v2.txt against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 240 new or modified tests. +1 hadoop2.0. The patch compiles against the hadoop 2.0 profile. +1 javadoc. The javadoc tool did not generate any warning messages. -1 javac. The applied patch generated 5 javac compiler warnings (more than the trunk's current 4 warnings). -1 findbugs. The patch appears to introduce 6 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hbase.master.TestAssignmentManager Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/2467//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2467//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2467//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2467//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2467//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2467//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2467//console This message is automatically generated. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476-v2.txt, 6476-v2.txt, 6476.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426096#comment-13426096 ] Lars Hofhansl commented on HBASE-6476: -- Argghh... I am an idiot. My script replaced System.currentTimeMillis() with EnvironmentEdgeManager.currentTimeMillis() in DefaultEnvironmentEgde. Obviously that leads to an endless loop. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426093#comment-13426093 ] Lars Hofhansl commented on HBASE-6476: -- That doesn't look too good. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.96.0 > > Attachments: 6476.txt > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426014#comment-13426014 ] Hadoop QA commented on HBASE-6476: -- -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12538589/6476.txt against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 240 new or modified tests. +1 hadoop2.0. The patch compiles against the hadoop 2.0 profile. +1 javadoc. The javadoc tool did not generate any warning messages. -1 javac. The applied patch generated 5 javac compiler warnings (more than the trunk's current 4 warnings). -1 findbugs. The patch appears to introduce 6 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hbase.coprocessor.TestCoprocessorInterface org.apache.hadoop.hbase.master.TestClockSkewDetection org.apache.hadoop.hbase.TestKeyValue org.apache.hadoop.hbase.regionserver.wal.TestWALActionsListener org.apache.hadoop.hbase.regionserver.TestQueryMatcher org.apache.hadoop.hbase.metrics.TestMetricsMBeanBase org.apache.hadoop.hbase.filter.TestDependentColumnFilter org.apache.hadoop.hbase.regionserver.TestResettingCounters org.apache.hadoop.hbase.coprocessor.TestRegionObserverStacking org.apache.hadoop.hbase.regionserver.wal.TestLogRollingNoCluster org.apache.hadoop.hbase.regionserver.wal.TestHLogMethods org.apache.hadoop.hbase.regionserver.TestBlocksScanned org.apache.hadoop.hbase.util.TestHFileArchiveUtil org.apache.hadoop.hbase.regionserver.TestMinVersions org.apache.hadoop.hbase.regionserver.TestCompactSelection org.apache.hadoop.hbase.regionserver.TestSplitTransaction org.apache.hadoop.hbase.ipc.TestPBOnWritableRpc org.apache.hadoop.hbase.TestSerialization org.apache.hadoop.hbase.regionserver.TestScanner org.apache.hadoop.hbase.util.TestHBaseFsckComparator org.apache.hadoop.hbase.util.TestByteBloomFilter org.apache.hadoop.hbase.master.cleaner.TestHFileCleaner org.apache.hadoop.hbase.regionserver.TestKeepDeletes org.apache.hadoop.hbase.util.TestThreads org.apache.hadoop.hbase.regionserver.TestRSStatusServlet org.apache.hadoop.hbase.master.TestCatalogJanitor org.apache.hadoop.hbase.regionserver.TestRegionSplitPolicy org.apache.hadoop.hbase.regionserver.TestScanWithBloomError org.apache.hadoop.hbase.client.TestIntraRowPagination org.apache.hadoop.hbase.regionserver.TestHRegionInfo org.apache.hadoop.hbase.regionserver.TestWideScanner org.apache.hadoop.hbase.migration.TestMigrationFrom090To092 org.apache.hadoop.hbase.monitoring.TestTaskMonitor org.apache.hadoop.hbase.regionserver.TestColumnSeeking org.apache.hadoop.hbase.TestCompare org.apache.hadoop.hbase.filter.TestFilter org.apache.hadoop.hbase.regionserver.TestStoreFile org.apache.hadoop.hbase.filter.TestColumnPrefixFilter org.apache.hadoop.hbase.monitoring.TestMemoryBoundedLogMessageBuffer org.apache.hadoop.hbase.filter.TestMultipleColumnPrefixFilter Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/2462//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2462//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2462//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2462//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2462//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2462//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2462//console This message is automatically generated. > Replace all occurrances of System.currentTimeMillis() w
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425953#comment-13425953 ] Andrew Purtell commented on HBASE-6476: --- +1 We've been replacing as needed but why not a one time global replacement. Adding a conformance check is nice. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.94.2 > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425949#comment-13425949 ] Lars Hofhansl commented on HBASE-6476: -- What could happen, though, is that a test that formerly used System.currentTimeMillis that was run in shared VM with a test that messed with the environmentedge, would not potentially have problems if we switched it to EnvironmentEdge. Although, I do not think there are many of these, and a test run will show. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.94.2 > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425877#comment-13425877 ] nkeywal commented on HBASE-6476: I think it should be ok! And it will be cleaner as well. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.94.2 > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425867#comment-13425867 ] Lars Hofhansl commented on HBASE-6476: -- bq. There are some tests that play with the EnvironmentEdgeManager, they had to be made medium as it was not possible to have them on a shared jvm as the small tests. So simply replacing all of System.currentTimeMillis() with EnvironmentEdgeManager.currentTimeMillis() should not be a problem, but if a test would actually mess with it, it would need to run on its own JVM. Do you see any other problems with just doing wholesale scripted replace? > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.94.2 > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425592#comment-13425592 ] nkeywal commented on HBASE-6476: bq. How hard would it be to add a maven task that checks for that, so we do not introduce System.currentTimeMillis back in the future? It could easily be done on the build env, as there is a script that we can change. We could add a simple grep there. The proper way would be to run something as pmd, adding rules is not difficult. But it would require some configuration to distinguish the debt vs. the new errors. Or we would activate only the totally clean rules. bq. Would be a problem too, if we globally mess with the EnvironmentEdge. There are some tests that play with the EnvironmentEdgeManager, they had to be made medium as it was not possible to have them on a shared jvm as the small tests. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.94.2 > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425440#comment-13425440 ] Lars Hofhansl commented on HBASE-6476: -- This {code} public void testSanity() throws Exception{ HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration()); String tableName = "test"+EnvironmentEdgeManager.currentTimeMillis(); {code} Would be a problem too, if we globally mess with the EnvironmentEdge. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.94.2 > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent
[ https://issues.apache.org/jira/browse/HBASE-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425437#comment-13425437 ] Lars Hofhansl commented on HBASE-6476: -- Write a quick script that performs the replace. 155 files are changed. A quick check reveals some cases of {code}new Random(EnvironmentEdgeManager.currentTimeMillis()){code}, which would not need to change (but it does not hurt and would lead to repeatable random numbers in tests). There are also fragment like this one found in TestZooKepper: {code} while (EnvironmentEdgeManager.currentTimeMillis() < limit1 && state != States.CLOSED){ state = connectionZK.getRecoverableZooKeeper().getState(); } {code} Which would hang forever if time does not progress. I also assume it's OK to requite o.a.h.h.util.EnvironmentEdgeManager in all changed client and server classes. > Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge > equivalent > - > > Key: HBASE-6476 > URL: https://issues.apache.org/jira/browse/HBASE-6476 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl >Priority: Minor > Fix For: 0.94.2 > > > There are still some areas where System.currentTimeMillis() is used in HBase. > In order to make all parts of the code base testable and (potentially) to be > able to configure HBase's notion of time, this should be generally be > replaced with EnvironmentEdgeManager.currentTimeMillis(). > How hard would it be to add a maven task that checks for that, so we do not > introduce System.currentTimeMillis back in the future? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira