Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 155D8C1B5 for ; Thu, 17 May 2012 11:43:37 +0000 (UTC) Received: (qmail 76424 invoked by uid 500); 17 May 2012 11:43:36 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 75397 invoked by uid 500); 17 May 2012 11:43:31 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 75094 invoked by uid 99); 17 May 2012 11:43:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 11:43:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 11:43:28 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BFB26A1E6 for ; Thu, 17 May 2012 11:43:08 +0000 (UTC) Date: Thu, 17 May 2012 11:43:08 +0000 (UTC) From: "Hudson (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <1039745161.8331.1337254988787.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1236659679.6814.1337216185386.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HADOOP-8406) CompressionCodecFactory.CODEC_PROVIDERS iteration is thread-unsafe MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-8406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277739#comment-13277739 ] Hudson commented on HADOOP-8406: -------------------------------- Integrated in Hadoop-Hdfs-trunk #1048 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1048/]) HADOOP-8406. CompressionCodecFactory.CODEC_PROVIDERS iteration is thread-unsafe. Contributed by Todd Lipcon. (Revision 1339476) Result = SUCCESS todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1339476 Files : * /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt * /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/CompressionCodecFactory.java > CompressionCodecFactory.CODEC_PROVIDERS iteration is thread-unsafe > ------------------------------------------------------------------ > > Key: HADOOP-8406 > URL: https://issues.apache.org/jira/browse/HADOOP-8406 > Project: Hadoop Common > Issue Type: Bug > Components: io > Affects Versions: 2.0.0 > Reporter: Todd Lipcon > Assignee: Todd Lipcon > Fix For: 2.0.1 > > Attachments: hadoop-8406.txt > > > CompressionCodecFactory defines CODEC_PROVIDERS as: > {code} > private static final ServiceLoader CODEC_PROVIDERS = > ServiceLoader.load(CompressionCodec.class); > {code} > but this is a lazy collection which is thread-unsafe to iterate. We either need to synchronize when we iterate over it, or we need to materialize it during class-loading time by copying to a non-lazy collection -- 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