Return-Path: Delivered-To: apmail-hadoop-mapreduce-dev-archive@minotaur.apache.org Received: (qmail 42518 invoked from network); 20 Nov 2009 18:55:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Nov 2009 18:55:34 -0000 Received: (qmail 17238 invoked by uid 500); 20 Nov 2009 18:55:33 -0000 Delivered-To: apmail-hadoop-mapreduce-dev-archive@hadoop.apache.org Received: (qmail 17102 invoked by uid 500); 20 Nov 2009 18:55:32 -0000 Mailing-List: contact mapreduce-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-dev@hadoop.apache.org Delivered-To: mailing list mapreduce-dev@hadoop.apache.org Received: (qmail 16905 invoked by uid 99); 20 Nov 2009 18:55:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2009 18:55:30 +0000 X-ASF-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.216.201] (HELO mail-px0-f201.google.com) (209.85.216.201) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2009 18:55:27 +0000 Received: by pxi39 with SMTP id 39so2437132pxi.2 for ; Fri, 20 Nov 2009 10:55:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.56.7 with SMTP id e7mr173846wfa.191.1258743307158; Fri, 20 Nov 2009 10:55:07 -0800 (PST) In-Reply-To: References: From: Todd Lipcon Date: Fri, 20 Nov 2009 10:54:47 -0800 Message-ID: <45f85f70911201054g7b8df76ck448016b2be850f10@mail.gmail.com> Subject: Re: Hadoop coding style guideline To: hdfs-dev@hadoop.apache.org Cc: "common-dev@hadoop.apache.org" , "mapreduce-dev@hadoop.apache.org" Content-Type: multipart/alternative; boundary=0016368e23e0afc3c70478d203e8 --0016368e23e0afc3c70478d203e8 Content-Type: text/plain; charset=ISO-8859-1 My opinions on the groups of line numbers from that pastebin: 1-3: Definitely not - no reason for ) on its own line 5-8: no, "throws" should be indented 10-13: I think this is acceptable 15-19: also acceptable IMO 22-24: acceptable - lines wrapped due to column limit should indent their wrappings 26-29: bad 31-36: seems the same as 16-19, so OK 39-47: bad - bizarre 50-53: bad - seems like a mistaken space 56-59: same as 1-3, seems bizarre 62-66: also bizarre like 50-53 So, IMO, the goal should be the examples on 10-24 or 31-36. If others agree, perhaps we should put some of these examples on the wiki? -Todd On Fri, Nov 20, 2009 at 9:04 AM, Cosmin Lehene wrote: > Hi, > > I was trying to make a patch and looking over the Hadoop guidelines for > code at http://wiki.apache.org/hadoop/CodeReviewChecklist, trying to > follow the conventions. > > Looking through code I found a few "patterns", however, these differ even > in the same class sometimes. Here's a collection of method declaration > styles I gathered from 2 or 3 files: http://pastie.org/707389 > > I have to admit Sun's code conventions are a bit unclear too, so maybe a > list of settings for the IDE like tab size, indent, continuation indent, > exceptions to the rule, etc. would help. > > Cosmin > --0016368e23e0afc3c70478d203e8--