chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r1134853 - in /incubator/chukwa/trunk: CHANGES.txt src/web/hicc/index.jsp
Date Sun, 12 Jun 2011 01:27:09 GMT
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");



Mime
View raw message