Return-Path: X-Original-To: apmail-incubator-chukwa-commits-archive@www.apache.org Delivered-To: apmail-incubator-chukwa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D5D866A65 for ; Sun, 12 Jun 2011 01:27:32 +0000 (UTC) Received: (qmail 43014 invoked by uid 500); 12 Jun 2011 01:27:32 -0000 Delivered-To: apmail-incubator-chukwa-commits-archive@incubator.apache.org Received: (qmail 42998 invoked by uid 500); 12 Jun 2011 01:27:32 -0000 Mailing-List: contact chukwa-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chukwa-dev@incubator.apache.org Delivered-To: mailing list chukwa-commits@incubator.apache.org Received: (qmail 42990 invoked by uid 99); 12 Jun 2011 01:27:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jun 2011 01:27:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jun 2011 01:27:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 218862388994; Sun, 12 Jun 2011 01:27:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1134853 - in /incubator/chukwa/trunk: CHANGES.txt src/web/hicc/index.jsp Date: Sun, 12 Jun 2011 01:27:09 -0000 To: chukwa-commits@incubator.apache.org From: eyang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110612012709.218862388994@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: eyang Date: Sun Jun 12 01:27:08 2011 New Revision: 1134853 URL: http://svn.apache.org/viewvc?rev=1134853&view=rev Log: CHUKWA-587. Improved default cluster selection code. (Eric Yang) Modified: incubator/chukwa/trunk/CHANGES.txt incubator/chukwa/trunk/src/web/hicc/index.jsp Modified: incubator/chukwa/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1134853&r1=1134852&r2=1134853&view=diff ============================================================================== --- incubator/chukwa/trunk/CHANGES.txt (original) +++ incubator/chukwa/trunk/CHANGES.txt Sun Jun 12 01:27:08 2011 @@ -90,6 +90,8 @@ Trunk (unreleased changes) CHUKWA-582. Change MoveToRepository to ignore anything starting with _. (Ari Rabkin) + CHUKWA-587. Improved default cluster selection code. (Eric Yang) + CHUKWA-579. Package initial_adaptors config file for tarball. (Eric Yang) CHUKWA-577. Convert HadoopMetricsProcessor to use Simple JSON library. (Eric Yang) Modified: incubator/chukwa/trunk/src/web/hicc/index.jsp URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/web/hicc/index.jsp?rev=1134853&r1=1134852&r2=1134853&view=diff ============================================================================== --- incubator/chukwa/trunk/src/web/hicc/index.jsp (original) +++ incubator/chukwa/trunk/src/web/hicc/index.jsp Sun Jun 12 01:27:08 2011 @@ -38,12 +38,16 @@ session.setAttribute(realName,request.getParameter(name)); } } - if(session.getAttribute("cluster")==null) { + String cluster = "none"; + try{ + if(session.getAttribute("cluster")==null) { ClusterConfig cc = new ClusterConfig(); Iterator ci = cc.getClusters(); - String cluster = (String) ci.next(); - session.setAttribute("cluster", cluster); + cluster = (String) ci.next(); + } + } catch(Exception e) { } + session.setAttribute("cluster", cluster); if(session.getAttribute("period")==null || session.getAttribute("start")==null || session.getAttribute("end")==null || session.getAttribute("time_type")==null) { session.setAttribute("time_type","last");