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 B836A18582 for ; Thu, 10 Mar 2016 05:54:41 +0000 (UTC) Received: (qmail 20173 invoked by uid 500); 10 Mar 2016 05:54:41 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 20079 invoked by uid 500); 10 Mar 2016 05:54:41 -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 19821 invoked by uid 99); 10 Mar 2016 05:54:41 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Mar 2016 05:54:41 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CB1F92C1F5D for ; Thu, 10 Mar 2016 05:54:40 +0000 (UTC) Date: Thu, 10 Mar 2016 05:54:40 +0000 (UTC) From: "Lin Yiqun (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-9936) Remove unused import in HdfsServerConstants 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-9936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lin Yiqun updated HDFS-9936: ---------------------------- Attachment: HDFS-9936.001.patch > Remove unused import in HdfsServerConstants > ------------------------------------------- > > Key: HDFS-9936 > URL: https://issues.apache.org/jira/browse/HDFS-9936 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Lin Yiqun > Assignee: Lin Yiqun > Priority: Minor > Attachments: HDFS-9936.001.patch > > > In HDFS-9134, it moved the {{LEASE_SOFTLIMIT_PERIOD}},{{LEASE_HARDLIMIT_PERIOD}} constants from {{HdfsServerConstants}}. But in its fixed patch, it import a unused import {{import org.apache.hadoop.hdfs.client.HdfsClientConfigKeys}} in {{HdfsServerConstants}}. The code As follow: > {code} > --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HdfsServerConstants.java > +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HdfsServerConstants.java > @@ -25,6 +25,7 @@ > > import org.apache.hadoop.classification.InterfaceAudience; > import org.apache.hadoop.hdfs.DFSUtil; > +import org.apache.hadoop.hdfs.client.HdfsClientConfigKeys; > import org.apache.hadoop.hdfs.protocol.HdfsConstants; > import org.apache.hadoop.hdfs.server.datanode.DataNodeLayoutVersion; > import org.apache.hadoop.hdfs.server.namenode.FSDirectory; > @@ -42,28 +43,14 @@ > @InterfaceAudience.Private > public interface HdfsServerConstants { > int MIN_BLOCKS_FOR_WRITE = 1; > + > /** > - * For a HDFS client to write to a file, a lease is granted; During the lease > - * period, no other client can write to the file. The writing client can > - * periodically renew the lease. When the file is closed, the lease is > - * revoked. The lease duration is bound by this soft limit and a > - * {@link HdfsServerConstants#LEASE_HARDLIMIT_PERIOD hard limit}. Until the > - * soft limit expires, the writer has sole write access to the file. If the > - * soft limit expires and the client fails to close the file or renew the > - * lease, another client can preempt the lease. > - */ > - long LEASE_SOFTLIMIT_PERIOD = 60 * 1000; > - /** > - * For a HDFS client to write to a file, a lease is granted; During the lease > - * period, no other client can write to the file. The writing client can > - * periodically renew the lease. When the file is closed, the lease is > - * revoked. The lease duration is bound by a > - * {@link HdfsServerConstants#LEASE_SOFTLIMIT_PERIOD soft limit} and this hard > - * limit. If after the hard limit expires and the client has failed to renew > - * the lease, HDFS assumes that the client has quit and will automatically > - * close the file on behalf of the writer, and recover the lease. > + * Please see {@link HdfsConstants#LEASE_SOFTLIMIT_PERIOD} and > + * {@link HdfsConstants#LEASE_HARDLIMIT_PERIOD} for more information. > */ > - long LEASE_HARDLIMIT_PERIOD = 60 * LEASE_SOFTLIMIT_PERIOD; > + long LEASE_SOFTLIMIT_PERIOD = HdfsConstants.LEASE_SOFTLIMIT_PERIOD; > + long LEASE_HARDLIMIT_PERIOD = HdfsConstants.LEASE_HARDLIMIT_PERIOD; > + > long LEASE_RECOVER_PERIOD = 10 * 1000; // in ms > {code} > It has already a import for {{HdfsConstants}}. We can remove unused import here. -- This message was sent by Atlassian JIRA (v6.3.4#6332)