chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r1144943 - in /incubator/chukwa/trunk: CHANGES.txt src/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java src/web/hicc/jsp/graph_explorer.jsp
Date Sun, 10 Jul 2011 19:39:14 GMT
Author: eyang
Date: Sun Jul 10 19:39:14 2011
New Revision: 1144943

URL: http://svn.apache.org/viewvc?rev=1144943&view=rev
Log:
CHUKWA-594.  Fix row key matching in HICC web interface. (Preetam Patil via Eric Yang)

Modified:
    incubator/chukwa/trunk/CHANGES.txt
    incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
    incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp

Modified: incubator/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1144943&r1=1144942&r2=1144943&view=diff
==============================================================================
--- incubator/chukwa/trunk/CHANGES.txt (original)
+++ incubator/chukwa/trunk/CHANGES.txt Sun Jul 10 19:39:14 2011
@@ -88,6 +88,8 @@ Trunk (unreleased changes)
 
   BUG FIXES
 
+    CHUKWA-594.  Fix row key matching in HICC web interface. (Preetam Patil via Eric Yang)
+
     CHUKWA-592.  Enable test case for HBaseWriter. (Eric Yang)
 
     CHUKWA-591. Check for empty result from HBase Scanner. (Eric Yang)

Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java?rev=1144943&r1=1144942&r2=1144943&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
(original)
+++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
Sun Jul 10 19:39:14 2011
@@ -27,7 +27,7 @@ import org.apache.hadoop.hbase.client.Re
 import org.apache.hadoop.hbase.client.ResultScanner;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.filter.RowFilter;
-import org.apache.hadoop.hbase.filter.SubstringComparator;
+import org.apache.hadoop.hbase.filter.RegexStringComparator;
 import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
 import org.apache.log4j.Logger;
 import org.mortbay.log.Log;
@@ -62,7 +62,7 @@ public class ChukwaHBaseStore {
       scan.setMaxVersions();
       if(filterByRowKey) {
         RowFilter rf = new RowFilter(CompareOp.EQUAL, new 
-            SubstringComparator(rkey)); 
+            RegexStringComparator("[0-9]+-"+rkey+"$")); 
         scan.setFilter(rf);
       }
       ResultScanner results = table.getScanner(scan);

Modified: incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp?rev=1144943&r1=1144942&r2=1144943&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp (original)
+++ incubator/chukwa/trunk/src/web/hicc/jsp/graph_explorer.jsp Sun Jul 10 19:39:14 2011
@@ -119,7 +119,10 @@
         var url = encodeURI("/hicc/v1/metrics/rowkey/"+table+"/"+family+"/"+column);
         $.ajax({ url: url, dataType: "json", success: function(data){
           for(var i in data) {
-            $('#row').not(":contains('"+data[i]+"')").append("<option>"+data[i]+"</option>");
+            var test = $('#row').find('option[value="'+data[i]+'"]').val();
+            if(typeof(test) == "undefined") {
+              $('#row').append('<option value="'+data[i]+'">'+data[i]+'</option>');
+            }
           }
         }});
       });



Mime
View raw message