Return-Path: X-Original-To: apmail-hadoop-general-archive@minotaur.apache.org Delivered-To: apmail-hadoop-general-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08C1111236 for ; Sun, 27 Jul 2014 02:29:36 +0000 (UTC) Received: (qmail 42077 invoked by uid 500); 27 Jul 2014 02:29:34 -0000 Delivered-To: apmail-hadoop-general-archive@hadoop.apache.org Received: (qmail 41967 invoked by uid 500); 27 Jul 2014 02:29:34 -0000 Mailing-List: contact general-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@hadoop.apache.org Delivered-To: mailing list general@hadoop.apache.org Received: (qmail 41955 invoked by uid 99); 27 Jul 2014 02:29:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Jul 2014 02:29:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cembree@gmail.com designates 209.85.223.176 as permitted sender) Received: from [209.85.223.176] (HELO mail-ie0-f176.google.com) (209.85.223.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Jul 2014 02:29:32 +0000 Received: by mail-ie0-f176.google.com with SMTP id tr6so5225526ieb.21 for ; Sat, 26 Jul 2014 19:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=5gRay4RscNlMpbnJ5AbfVNG+h1n7bUHkSiX2jSnG7ik=; b=OyHs24xQZx8JQy8ARgK3GTMRqYNOlfXNWbWTLtW9HNh/GvGv/TnuzMFeFMkwEL3+dk I3H2EpHoAkEuTxBPFEhqGXwOUFrQ8o5T/cOiLWt4/I1rRLtUyuZ5eFEC5SOWL1PShbkk 6sSp/yR1uUCmPYdxxWdPQ2luhqUxHuX8LIbrYwh8m2ozf2lARERiQguxtTdWNo8KVYhy aq9gNDyp8Js2WBp+m799OEc0jtN8J7tmCaYPRzkQ0/CZiVAQ1kgdTSGMNmWjpSAxNzsa DhcNZ1j/1OL3g4Gh8IacbcUXnDqWlkAC2w9lv0lN3ZDuGRcfY24GPEajec4eTwtZgyMs qfzw== MIME-Version: 1.0 X-Received: by 10.42.198.75 with SMTP id en11mr31258864icb.7.1406428146953; Sat, 26 Jul 2014 19:29:06 -0700 (PDT) Received: by 10.107.26.202 with HTTP; Sat, 26 Jul 2014 19:29:06 -0700 (PDT) Reply-To: chris@embree.us In-Reply-To: References: Date: Sat, 26 Jul 2014 22:29:06 -0400 Message-ID: Subject: Re: Code guidelines and bash From: Chris Embree To: general@hadoop.apache.org Content-Type: multipart/alternative; boundary=20cf30223e5319f3b404ff239208 X-Virus-Checked: Checked by ClamAV on apache.org --20cf30223e5319f3b404ff239208 Content-Type: text/plain; charset=UTF-8 Allen, et. al., I'm not sure how up to date that checklist is, but imposing such a small size on cmd arguments seems incredibly short sighted. I'm pretty sure that it is not a generally accepted limit. I've seen MANY Hadoop processes require lengthy CLASS_PATHS that were easily over 240 chars. BTW, the BASH limit is something around 24k, well beyond 120 chars. IMHO, if you want to avoid Bill Gates syndrome, (no one will ever need more than 256k RAM) you might want to set an upper limit around 64K. And then I'd use a configuration file so I could be stupid and request a max of 256M, because I'm doing something way abnormal. $0.02. YMMV. ;) On Sat, Jul 26, 2014 at 10:02 PM, Paresh Yadav wrote: > Hey Allen, > > I am not a shell scripting expert but I have written few and used/seen many > from including top 3 enterprise software giants. I don't think everyone > sticks to 80 char guidelines, may be this is remnant of the old 80 char > terminals. I prefer long descriptive names for the env vars (or vars in > general) as it makes the program more readable. Not sure what are technical > ramifications of having lines longer than 80 char if any. > > *Thanks,* > Paresh Yadav > Solutions Engineer, Canada > > Phone: 416.688.1003 > Email: pyadav@hortonworks.com > Website: http://www.hortonworks.com/ > > *Follow Us: * > < > http://facebook.com/hortonworks/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature > > > > < > http://twitter.com/hortonworks?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature > > > < > http://www.linkedin.com/company/hortonworks?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature > > > > [image: photo] > > > On Sat, Jul 26, 2014 at 3:20 PM, Allen Wittenauer wrote: > > > Hey folks: > > > > Deep linked by http://wiki.apache.org/hadoop/CodeReviewChecklist is > the > > rule that line length should be ideally maximum 80 chars. (Sun coding > > guidelines.) In general, it's a good idea and it works for many many > > languages... > > > > Now the caveat. > > > > As most of you know, I've been hacking on HADOOP-9902 off and on for a > > year now. [For those that don't, this is an almost complete rewrite of > > most of the major shell code that we ship with Hadoop. The stuff that > was > > missed I'll pick it up after this gets committed.] As part of this, I > > recently reformatted the last patch to fit that 80 character requirement > as > > best I could. The result is... not good. Not good at all. In many > ways, > > it actually hurt readability even beyond the lack of indentation that > Bash > > Beautifier doesn't support for line continuation. (That case statement in > > bin/hadoop is painful to look at and makes me cry.) > > > > Barring anymore feedback, it's pretty much ready to commit. But before > > that happens, do we want to specify that bash has different line length > > requirements? Say 120 chars? Most of the problems stem from our usage > of > > REALLY LONG env var names that can't really be changed at this point > > without *massively* screwing backward compatibility. (Hello, > > YARN_RESOURCEMANAGER_OPTS... I'm talking about you!). > > > > Bouncing the idea around a few folks, they all seem to agree that 80 is > > just too hard for bash given our general use case, but I think it'd be > good > > to have something official. > > > > Thoughts? > > > > Thanks. > > > > -- > CONFIDENTIALITY NOTICE > NOTICE: This message is intended for the use of the individual or entity to > which it is addressed and may contain information that is confidential, > privileged and exempt from disclosure under applicable law. If the reader > of this message is not the intended recipient, you are hereby notified that > any printing, copying, dissemination, distribution, disclosure or > forwarding of this communication is strictly prohibited. If you have > received this communication in error, please contact the sender immediately > and delete it from your system. Thank You. > --20cf30223e5319f3b404ff239208--