Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D363C9953 for ; Tue, 31 Jul 2012 00:59:34 +0000 (UTC) Received: (qmail 32015 invoked by uid 500); 31 Jul 2012 00:59:34 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 31967 invoked by uid 500); 31 Jul 2012 00:59:34 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 31959 invoked by uid 99); 31 Jul 2012 00:59:34 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jul 2012 00:59:34 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 6799D142839 for ; Tue, 31 Jul 2012 00:59:34 +0000 (UTC) Date: Tue, 31 Jul 2012 00:59:34 +0000 (UTC) From: "Lars Hofhansl (JIRA)" To: issues@hbase.apache.org Message-ID: <722285745.119289.1343696374427.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1577384634.118701.1343689247553.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HBASE-6476) Replace all occurrances of System.currentTimeMillis() with EnvironmentEdge equivalent MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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