Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08E5B182B6 for ; Tue, 23 Feb 2016 22:24:19 +0000 (UTC) Received: (qmail 60840 invoked by uid 500); 23 Feb 2016 22:24:18 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 60760 invoked by uid 500); 23 Feb 2016 22:24:18 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 60409 invoked by uid 99); 23 Feb 2016 22:24:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2016 22:24:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 619282C1F6C for ; Tue, 23 Feb 2016 22:24:18 +0000 (UTC) Date: Tue, 23 Feb 2016 22:24:18 +0000 (UTC) From: "Arpit Agarwal (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-9821) HDFS configuration should accept friendly time units 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/HDFS-9821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15159773#comment-15159773 ] Arpit Agarwal commented on HDFS-9821: ------------------------------------- bq. Why don't we keep the existing configuration as-is and use the predefined unit as the default unit? When the value is set without a unit, the default unit is used. When it is set with a unit, the default unit is overridden. Hi [~szetszwo], the first option in the description meant to say what you describe for backwards compatibility. Steve, yes we'd accept ms suffix for milliseconds in config. Edited description for clarity. > HDFS configuration should accept friendly time units > ---------------------------------------------------- > > Key: HDFS-9821 > URL: https://issues.apache.org/jira/browse/HDFS-9821 > Project: Hadoop HDFS > Issue Type: Improvement > Components: datanode, namenode > Affects Versions: 2.8.0 > Reporter: Arpit Agarwal > Assignee: Xiaobing Zhou > > HDFS configuration keys that define time intervals use units inconsistently (Hours, seconds, milliseconds). > Not all keys have the unit as part of their name. Related keys may use different units e.g. {{dfs.blockreport.intervalMsec}} accepts msec while {{dfs.blockreport.initialDelay}} accepts seconds. Milliseconds is rarely useful as a time unit which makes these values hard to parse when reading config files. > We can either > # Let existing keys use friendly units e.g. 100ms, 60s, 5m, 1d, 6w etc. This can be done compatibly since there will be no conflict with existing valid configuration. If no suffix is specified just default to the current time unit. > # Just deprecate the existing keys and define new ones that accept friendly units. > We continue to use fine-grained time units (usually ms) internally in code and also accept "ms" option for tests. -- This message was sent by Atlassian JIRA (v6.3.4#6332)