Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 70578200B84 for ; Mon, 29 Aug 2016 06:25:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6ED02160AC7; Mon, 29 Aug 2016 04:25:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B5B8C160AB4 for ; Mon, 29 Aug 2016 06:25:22 +0200 (CEST) Received: (qmail 83180 invoked by uid 500); 29 Aug 2016 04:25:21 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 83154 invoked by uid 99); 29 Aug 2016 04:25:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2016 04:25:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6B2F52C0150 for ; Mon, 29 Aug 2016 04:25:21 +0000 (UTC) Date: Mon, 29 Aug 2016 04:25:21 +0000 (UTC) From: "Fenghua Hu (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (HDFS-10682) Replace FsDatasetImpl object lock with a separate lock object MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 29 Aug 2016 04:25:23 -0000 [ https://issues.apache.org/jira/browse/HDFS-10682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15444774#comment-15444774 ] Fenghua Hu edited comment on HDFS-10682 at 8/29/16 4:25 AM: ------------------------------------------------------------ In FsDatasetImpl#FsDatasetImpl() and FsDatasetImpl#addVolume(): volumeMap = new ReplicaMap(this); and ReplicaMap tempVolumeMap = new ReplicaMap(this); "this" is used as synchronization object: ReplicaMap(Object mutex) { if (mutex == null) { throw new HadoopIllegalArgumentException( "Object to synchronize on cannot be null"); } this.mutex = mutex; } ReplicaMap uses synchronized(mutex) {...} for synchronization. Do we need change it accordingly? [~vagarychen] [~arpitagarwal] was (Author: fenghua_hu): In FsDatasetImpl#FsDatasetImpl() and FsDatasetImpl#addVolume(): volumeMap = new ReplicaMap(this); and ReplicaMap tempVolumeMap = new ReplicaMap(this); "this" is used as synchronization object: 52 ReplicaMap(Object mutex) { 53 if (mutex == null) { 54 throw new HadoopIllegalArgumentException( 55 "Object to synchronize on cannot be null"); 56 } 57 this.mutex = mutex; ReplicaMap uses synchronized(mutex) {...} for synchronization. Do we need change it accordingly? [~vagarychen] [~arpitagarwal] > Replace FsDatasetImpl object lock with a separate lock object > ------------------------------------------------------------- > > Key: HDFS-10682 > URL: https://issues.apache.org/jira/browse/HDFS-10682 > Project: Hadoop HDFS > Issue Type: Improvement > Components: datanode > Reporter: Chen Liang > Assignee: Chen Liang > Fix For: 2.8.0 > > Attachments: HDFS-10682-branch-2.001.patch, HDFS-10682-branch-2.002.patch, HDFS-10682-branch-2.003.patch, HDFS-10682-branch-2.004.patch, HDFS-10682-branch-2.005.patch, HDFS-10682-branch-2.006.patch, HDFS-10682.001.patch, HDFS-10682.002.patch, HDFS-10682.003.patch, HDFS-10682.004.patch, HDFS-10682.005.patch, HDFS-10682.006.patch, HDFS-10682.007.patch, HDFS-10682.008.patch, HDFS-10682.009.patch, HDFS-10682.010.patch > > > This Jira proposes to replace the FsDatasetImpl object lock with a separate lock object. Doing so will make it easier to measure lock statistics like lock held time and warn about potential lock contention due to slow disk operations. > Right now we can use org.apache.hadoop.util.AutoCloseableLock. In the future we can also consider replacing the lock with a read-write lock. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org