incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/2] git commit: Fixing some bugs, and removing the old status pages
Date Tue, 03 Dec 2013 18:16:51 GMT
Updated Branches:
  refs/heads/master c0c8dbed7 -> b322eaf88


Fixing some bugs, and removing the old status pages


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/7e392bf4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/7e392bf4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/7e392bf4

Branch: refs/heads/master
Commit: 7e392bf4bce04969349bbab8d748a097a95ebbe3
Parents: c0c8dbe
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Mon Dec 2 20:51:42 2013 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Dec 3 13:16:32 2013 -0500

----------------------------------------------------------------------
 .../clusterstatus/ZookeeperClusterStatus.java   |   1 +
 blur-gui/src/main/webapp/footer.jsp             |  21 ---
 blur-gui/src/main/webapp/functions.jsp          |  43 -----
 blur-gui/src/main/webapp/home.jsp               | 139 ----------------
 blur-gui/src/main/webapp/livemetrics.jsp        | 129 ---------------
 blur-gui/src/main/webapp/metrics.jsp            | 159 -------------------
 blur-gui/src/main/webapp/shardList.jsp          |  79 ---------
 blur-gui/src/main/webapp/style.css              | 105 ------------
 blur-gui/src/main/webapp/table.jsp              | 146 -----------------
 blur-gui/src/main/webapp/tableList.html         |  76 ---------
 blur-gui/src/main/webapp/test.html              | 141 ----------------
 blur-gui/src/main/webapp/traces.html            |   2 +-
 .../blur/mapreduce/lib/BlurOutputFormat.java    |   3 +-
 .../apache/blur/lucene/search/SuperQuery.java   |   2 +-
 .../org/apache/blur/trace/TraceCollector.java   |   2 +-
 15 files changed, 6 insertions(+), 1042 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
b/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
index d7e1a2f..d2deb10 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
@@ -649,6 +649,7 @@ public class ZookeeperClusterStatus extends ClusterStatus {
         _clusterToSafeMode.put(cluster, new SafeModeCacheEntry(false));
         return false;
       }
+      _clusterToSafeMode.put(cluster, new SafeModeCacheEntry(true));
       return true;
     } catch (KeeperException e) {
       throw new RuntimeException(e);

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-gui/src/main/webapp/footer.jsp
----------------------------------------------------------------------
diff --git a/blur-gui/src/main/webapp/footer.jsp b/blur-gui/src/main/webapp/footer.jsp
deleted file mode 100644
index dd36b6c..0000000
--- a/blur-gui/src/main/webapp/footer.jsp
+++ /dev/null
@@ -1,21 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-	<br/>
-	<a href="index.html">home</a> | <a href="logs">logs</a> | <a
href="metrics.jsp">metrics</a> <a href="metrics" title="Great with plugins like
jsonView">(raw)</a>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-gui/src/main/webapp/functions.jsp
----------------------------------------------------------------------
diff --git a/blur-gui/src/main/webapp/functions.jsp b/blur-gui/src/main/webapp/functions.jsp
deleted file mode 100644
index 72e19c8..0000000
--- a/blur-gui/src/main/webapp/functions.jsp
+++ /dev/null
@@ -1,43 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%!public String row(String... col) {
-		String ret = "<tr>";
-		for (String c : col)
-			ret += "<td>" + c + "</td>";
-		return ret + "</tr>\n";
-	}
-
-	public String row(int colspan, String col) {
-		return "<tr><td colspan=" + colspan + ">" + col + "</td></tr>";
-	}
-
-	public String shardListLink(String cluster, String display) {
-		return "<a href='shardList.jsp?clusterName=" + cluster
-				+ "' title='view shard servers'>" + display + "</a>";
-	}
-	
-	public String table(String content, String... headers) {
-		String ret = "<table class='statTable'><tr>\n";
-		for(String h : headers)
-			ret += "<td class='statTableTitle'>" + h + "</td>\n";
-		return ret + "</tr>" + content + "</table>\n";
-	}
-	
-%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-gui/src/main/webapp/home.jsp
----------------------------------------------------------------------
diff --git a/blur-gui/src/main/webapp/home.jsp b/blur-gui/src/main/webapp/home.jsp
deleted file mode 100644
index 43114f0..0000000
--- a/blur-gui/src/main/webapp/home.jsp
+++ /dev/null
@@ -1,139 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page contentType="text/html; charset=UTF-8" isThreadSafe="false"
-	import="javax.servlet.*" import="javax.servlet.http.*"
-	import="java.io.*" import="java.util.*" import="java.text.DateFormat"
-	import="java.lang.Math" import="java.net.URLEncoder"
-	import="org.apache.blur.thrift.*"
-	import="org.apache.blur.thrift.generated.*"
-	import="org.apache.blur.thrift.generated.Blur.*"%>
-<%@ include file="functions.jsp" %>
-<%!
-
-	public String tableLink(String tableName, String clusterName) {
-		return "<a href='table.jsp?tableName="+tableName+"&clusterName="+clusterName+"'
title='view details for " + tableName + "'>" + tableName + "</a>";
-	}
-	
-	public String getTables(Iface client) throws Exception {
-		String ret = "";
-		List<String> clusters = client.shardClusterList();
-		for (String cluster : clusters) {
-			//tables: _ tableName : enabled
-			List<String> tables = client.tableListByCluster(cluster);
-			for (String table : tables) {
-				try {
-					TableDescriptor td = client.describe(table);
-					ret += row(cluster, tableLink(table,cluster), td.shardCount+"", td.enabled?"yes":"no");
-				} catch (BlurException e) {
-					ret += row(3, "<font color=FF0000>Error describing table: "
-							+ table + "</font>");
-				}
-			}
-		}
-		return ret;
-	}
-
-	public String getClusters(Iface client) throws Exception {
-		String ret = "";
-		List<String> clusters = client.shardClusterList();
-		for (String cluster : clusters) {
-			ret += row(cluster, shardListLink(cluster,client.shardServerList(cluster).size()+""),
getClusterEnabled(client, cluster));
-		}
-		return ret;
-	}
-
-	
-	public String getConf(Iface client) throws Exception {
-		return row(2,"disabled as its broken");
-/*		try {
-			Map<String, String> config = client.configuration();
-			String ret = "";
-			for (String key : config.keySet()) {
-				ret += row(key, config.get(key));
-			}
-			return ret;
-		} catch (Exception e) {
-			return row(2, "Cannot retrieve anything from client.configuration.");
-		}*/
-	}
-
-	public String getClusterEnabled(Iface client, String cluster)
-			throws Exception {
-		return client.isInSafeMode(cluster) ? "Safe Mode On"
-				: "Yes";
-	}
-
-	public String getControllers(Iface client) throws Exception {
-		String ret = "";
-		List<String> con = client.controllerServerList();
-
-		for (String c : con) {
-			String[] split = c.split(":");
-			int base = Integer.parseInt(System.getProperty("blur.base.controller.port"));
-			int offset = Integer.parseInt(split[1])-base;
-			int baseShardPort = Integer.parseInt(System.getProperty("baseGuiControllerPort"));
-			ret += row("<a href='http://" + split[0] + ":" + (baseShardPort + offset) + "'>"
+ c + "</a>","Yes");
-		}
-		
-		return ret;
-	}%>
-<%
-	String hostName = request.getServerName() + ":" + System.getProperty("blur.gui.servicing.port");
-
-	Iface client = BlurClient.getClient(hostName);
-%>
-
-
-<html>
-<head>
-<title>Blur <%=System.getProperty("blur.gui.mode") %> '<%=hostName%>'
-</title>
-<link href="style.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-	<h1>
-		Blur <%=System.getProperty("blur.gui.mode") %> '<%=hostName%>'
-	</h1>
-	<br />
-	<h2>Controllers</h2>
-	<%=table(getControllers(client),"Name","Online") %>
-	<hr />
-	<br />
-	<h2>Clusters</h2>
-	<%=table(getClusters(client),"Cluster Name","Shard Servers","Enabled") %>
-	<hr />
-	<br />
-	<h2>Tables</h2>
-	<%=table(getTables(client),"Cluster Name","Table Name","Shards","Enabled")%>
-	<hr />
-	<br />
-	<h2>Configs</h2>
-	<table class="statTable" class="statTableTitle">
-		<tr>
-			<td class="statTableTitle">Param</td>
-			<td class="statTableTitle">Value</td>
-		</tr>
-		<%=getConf(client)%>
-	</table>
-	<hr />
-<%@ include file="footer.jsp" %>
-</body>
-
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-gui/src/main/webapp/livemetrics.jsp
----------------------------------------------------------------------
diff --git a/blur-gui/src/main/webapp/livemetrics.jsp b/blur-gui/src/main/webapp/livemetrics.jsp
deleted file mode 100644
index 6c5d11e..0000000
--- a/blur-gui/src/main/webapp/livemetrics.jsp
+++ /dev/null
@@ -1,129 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@page import="java.text.DecimalFormat"%>
-<%@page import="java.text.NumberFormat"%>
-<%@ page contentType="text/html; charset=UTF-8" isThreadSafe="false"
-	import="javax.servlet.*" import="javax.servlet.http.*"
-	import="java.io.*" import="java.util.*" import="java.text.DateFormat"
-	import="java.lang.Math" import="java.net.URLEncoder"
-	import="org.apache.blur.thrift.*"
-	import="org.apache.blur.thrift.generated.*"
-	import="org.apache.blur.thrift.generated.Blur.*"%>
-<%@ include file="functions.jsp"%>
-<%
-	String hostName = request.getServerName() + ":" + System.getProperty("blur.gui.servicing.port");
-%>
-<html>
-<head>
-<title>Metrics</title>
-<link href="style.css" rel="stylesheet" type="text/css" />
-</head>
-<script src="d3.v2.js"></script>
-<body>
-
-<script>
-function draw(uri, id, data, margin, width, height, xLabel, yLabel, labels) {
-  "use strict";
-  var graphSvg = d3.select("#" + id).select("svg");
-  if (graphSvg) {graphSvg.remove();}
-  var graph = d3.select("#" + id).append("svg").attr("width", width).attr("height", height);
-
-  var time_extent = d3.extent(data,function(d){return new Date(d.recordTime)});
-  var time_scale = d3.time.scale().domain(time_extent).range([margin, width]);
-
-  var maxArray = [];
-  for (var index in labels) {
-    var labelObject = labels[index];
-	maxArray.push(d3.max(data,function(d){return d[labelObject.name];}));
-  }
-  var y_scale = d3.scale.linear().range([height-margin,margin]).domain([0, d3.max(maxArray)]);
-
-  //add x axis
-  var x_axis = d3.svg.axis().scale(time_scale);
-  graph.append("g").attr("class","x axis " + id).attr("transform","translate(0,"+(height-margin)+")").call(x_axis);
-  d3.select(".x.axis."+id).append("text").text(xLabel).attr("x", (width / 2) - margin).attr("y",
margin / 1.5);
-
-  //add y axis
-  var y_axis = d3.svg.axis().scale(y_scale).orient("left");
-  graph.append("g").attr("class","y axis " + id).attr("transform","translate(" + margin +",0)").call(y_axis);
-  d3.select(".y.axis."+id).append("text").text(yLabel).attr("transform", "rotate (-90, 0,
0) translate(-" + (height/2) + ",-40)");
-
-  //add lines
-  for (var index in labels) {
-    var labelObject = labels[index];
-    var name = labelObject.name;
-    var line = d3.svg.line().x(function(d){return time_scale(new Date(d.recordTime))}).y(function(d){return
y_scale(d[name])}).interpolate("basis");
-    var l = graph.append("path").attr("d", line(data)).attr("class", name + "_line");
-    var s = labelObject.style;
-	for (var v in s) {
-      if (s.hasOwnProperty(v)) {
-	    l.style(s,v[s]);
-	  }
-	}
-  }
-}
-
-function drawGraphs(uri, margin, width, height) {
-  d3.json(uri,function(data) {
-	for (var graphId in data) {
-      if (data.hasOwnProperty(graphId)) {
-        draw(uri, graphId, data[graphId].lines.data, margin, width, height, data[graphId].xLabel,
data[graphId].yLabel, data[graphId].lines.labels);
-      }
-	}
-  });
-  setTimeout(function() {
-	drawGraphs(uri, margin, width, height);
-  }, 1000);	
-}
-
-var margin = 50, width = 450, height = 220;
-
-drawGraphs("/livemetrics", margin, width, height)
-
-</script>
-<h1>
-	Blur <%=System.getProperty("blur.gui.mode") %> '<%=hostName%>'
-</h1>
-<table>
-	<tr>
-		<td>
-			<h3>Blur Queries / Fetches / Mutates Requests</h3>
-			<div id="blur_calls"></div>
-		</td>
-		<td>
-			<h3>Blur Fetches / Mutates Record Rates</h3>
-			<div id="blur_recordRates"></div>
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<h3>JVM Heap / Committed Heap</h3>
-			<div id="jvm"></div>
-		</td>
-		<td>
-			<h3>System Load</h3>
-			<div id="system"></div>
-		</td>
-	</tr>
-</table>
-
-<%@ include file="footer.jsp" %>
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-gui/src/main/webapp/metrics.jsp
----------------------------------------------------------------------
diff --git a/blur-gui/src/main/webapp/metrics.jsp b/blur-gui/src/main/webapp/metrics.jsp
deleted file mode 100644
index 515a059..0000000
--- a/blur-gui/src/main/webapp/metrics.jsp
+++ /dev/null
@@ -1,159 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-
-<%
-	String hostName = request.getServerName() + ":" + System.getProperty("blur.gui.servicing.port");
-%>
-<html>
-  <head>
-    <title>Metrics</title>
-    <link href="style.css" rel="stylesheet" type="text/css" />
-  </head>
-  <script src="js/jquery-1.9.1.min.js"></script>
-  
-  <script type="text/javascript">
-    $(function() {
-        $.getJSON('metrics', function(data) {
-            $("#jvm").append(tree(data["jvm"]));
-            
-            var ignoreColumns = ["Operation", "Buffer Type", "Property"];
-            var thriftCallsInfoColumns = ["Operation", "count", "max", "mean", "median",
"min", "p75", "p95", "p98", "p99", "p999", "std_dev"];
-            var thriftCallsTable = constructTable(data["org.apache.blur.Blur.Thrift Calls
in �s"], thriftCallsInfoColumns, ignoreColumns);
-            $("#thrift-calls").append(thriftCallsTable);
-            
-            var luceneInternalBuffersColumns = ["Buffer Type", "count", "m1", "m5", "m15",
"mean", "type", "unit"];
-            var thriftCallsTable = constructTable(data["org.apache.blur.Lucene.Internal Buffers"],
luceneInternalBuffersColumns, ignoreColumns);
-            $("#lucene-internal-buffers").append(thriftCallsTable);
-            
-            var blurDefaultColumns = ["Property", "type", "value"];
-            var blurDefaultTable = constructTable(data["org.apache.blur.Blur.default"], blurDefaultColumns,
ignoreColumns);
-            $("#blur-default").append(blurDefaultTable);
-            
-            var blurLuceneTable = constructTable(data["org.apache.blur.Lucene"], blurDefaultColumns,
ignoreColumns);
-            $("#blur-lucene").append(blurLuceneTable);
-            
-            var blurColumns = ["Operation", "count", "m1", "m5", "m15", "mean", "type", "unit"];
-            var blurTable = constructTable(data["org.apache.blur.Blur"], blurColumns, ignoreColumns);
-            $("#blur").append(blurTable);
-            
-            $("#blur-fetchtimer").append(tree(data["org.apache.blur.Blur"]["Fetch Timer"]));
-        }); 
-    });
-    
-    /*
-     * Builds and returns a UL/LI tree recirsively from the json data provided
-     */
-    function tree(data) {    
-        if (typeof(data) == 'object') {        
-            var ul = $('<ul>');
-            for (var i in data) {            
-                ul.append($('<li>').text(i).append(tree(data[i])));         
-            }        
-            return ul;
-        } else {       
-            var textNode = document.createTextNode(' : ' + data);
-            return textNode;
-        }
-    }
-
-    function constructTable(data, columns, ignoreColumns) {
-    	var table = $("<table>");
-		table.attr("border", "1px solid black");
-		table.attr("border-collapse", "collapse");
-		var thead = $("<thead>");
-		var tbody = $("<tbody>");
-		table.append(thead),
-        table.append(tbody);
-		
-		var headrow = $("<tr>");
-		for (var i in columns) {
-			headrow.append($("<th>").text(columns[i]).css("text-align", "left").css("border",
"1px solid black"));
-		}
-		thead.append(headrow);
-	    
-		$.each(data, function(k, v) {
-			var ignoreKey = false;
-		    var tr = $("<tr>");
-		    tr.append($("<td>").text(camelCaseToNormal(k)).css("border", "1px solid black"));
-		    for (var i in columns) {
-		    	if ($.inArray(columns[i], ignoreColumns) == -1) {
-		    		
-		    		if (v[columns[i]] == undefined) {
-		    			ignoreKey = true;
-		    		} else {
-		    			// fetch the value of the appropriate column
-			    		var td = $("<td>");
-		    		    td.text(v[columns[i]]);
-		    		    td.css("border", "1px solid black");
-		    	        tr.append(td);
-		    		}
-		    	}
-		    }
-		    
-		    if (!ignoreKey) {
-		        tbody.append(tr);
-		    }
-		});
-		
-		return table;
-    }
-    
-    function camelCaseToNormal(text) {
-    	return text.replace(/([A-Z])/g, ' $1').replace(/^./, function(str){ return str.toUpperCase();
})
-    }
-
-  </script>
-  
-  <body style="padding:20px;">
-    <div id="header">
-      <h1>Blur <%=System.getProperty("blur.gui.mode") %> '<%=hostName%>'</h1>
-    </div>
-	
-	<div class="container">
-      <div class="content">
-        <div id="jvm"><h2>JVM Properties</h2></div>
-      </div>
-    
-      <div class="content">
-        <div id="thrift-calls"><h2>Thrift Calls</h2></div>
-      </div>
-    </div>
-    
-    <div class="container" style="clear:both;">
-      <div id="blur" class="content" style="width:1300px;"><h2>Blur</h2></div>
-    </div> 
-    
-    <div class="container" style="clear:both;">
-      <div id="lucene-internal-buffers" class="content" style="width:1300px;"><h2>Lucene
Internal Buffers</h2></div>
-    </div>  
-
-    <div class="container" style="clear:both;">
-      <div id="blur-default" class="content" style="width:400px;"><h2>Blur Default</h2></div>
-      <div id="blur-lucene"  class="content" style="width:400px;"><h2>Lucene</h2></div>
-      <div id="blur-fetchtimer" class="content" style="width:300px;"><h2>Blur
Fetch Timer</h2></div>
-    </div>  
-    
-      <div id="footer">
-        <%@ include file="footer.jsp" %>
-      </div>
-    
-	
-  </body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-gui/src/main/webapp/shardList.jsp
----------------------------------------------------------------------
diff --git a/blur-gui/src/main/webapp/shardList.jsp b/blur-gui/src/main/webapp/shardList.jsp
deleted file mode 100644
index b709ad5..0000000
--- a/blur-gui/src/main/webapp/shardList.jsp
+++ /dev/null
@@ -1,79 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@ page contentType="text/html; charset=UTF-8" isThreadSafe="false"
-	import="javax.servlet.*" import="javax.servlet.http.*"
-	import="java.io.*" import="java.util.*" import="java.text.DateFormat"
-	import="java.lang.Math" import="java.net.URLEncoder"
-	import="org.apache.blur.thrift.*"
-	import="org.apache.blur.thrift.generated.*"
-	import="org.apache.blur.thrift.generated.Blur.*"%>
-<%@ include file="functions.jsp"%>
-<%!
-	public String shards(Iface client, String clusterName) throws Exception {
-		String ret = "";
-		List<String> servers = client.shardServerList(clusterName);
-		
-		for(String s : servers) {
-			String[] split = s.split(":");
-			int base = Integer.parseInt(System.getProperty("blur.base.shard.port"));
-			int offset = Integer.parseInt(split[1])-base;
-			int baseShardPort = Integer.parseInt(System.getProperty("baseGuiShardPort"));
-			ret += row("<a href='http://" + split[0] + ":" + (baseShardPort + offset) + "'>"
+ s + "</a>","","");
-			
-		}
-		return ret;
-	}
-%>
-
-<%
-	//TODO: prop file the port
-	String hostName = request.getServerName() + ":" + System.getProperty("blur.gui.servicing.port");
-
-	Iface client = BlurClient.getClient(hostName);
-
-	String clusterName = request.getParameter("clusterName");
-%>
-
-<html>
-<head>
-<title>Blur Cluster Shard List '<%=hostName%>'
-</title>
-<link href="style.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-	<%
-		if (clusterName == null) {
-	%>
-	No cluster specified, go home.
-	<%
-		} else {
-	%>
-	<h1>
-		Blur Shard List for Cluster '<%=clusterName%>'
-	</h1>
-	<br />
-		<%=table(shards(client, clusterName),"Shard") %>
-
-	<%
-		}
-	%>
-<%@ include file="footer.jsp" %>
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-gui/src/main/webapp/style.css
----------------------------------------------------------------------
diff --git a/blur-gui/src/main/webapp/style.css b/blur-gui/src/main/webapp/style.css
deleted file mode 100644
index f730075..0000000
--- a/blur-gui/src/main/webapp/style.css
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-body {
-	font-family: sans-serif;
-	font-size: 11px;
-	line-height: 17px;
-}
-
-a {
-    color: #0044FF !important;
-    text-decoration: none !important;
-}
-
-h2 {
-	margin: 5px 5px 0px 0px;
-}
-
-hr {
-	-moz-border-bottom-colors: none;
-	-moz-border-image: none;
-	-moz-border-left-colors: none;
-	-moz-border-right-colors: none;
-	-moz-border-top-colors: none;
-	border-color: -moz-use-text-color #DDDDDD #DDDDDD;
-	border-right: 1px solid #DDDDDD;
-	border-style: none solid solid;
-	border-width: 0 1px 1px;
-}
-
-table {
-	font-size: 12px;
-	
-}
-
-td {
-	align: left;
-	font-size: 12px;
-	padding-left: 10px;
-	padding-right: 10px;
-	font-family: Verdana;
-}
-
-.statTable {
-	width: 500px;
-}
-
-.statTableTitle {
-	color: 55555;
-	align: left;
-	font-weight: bold;
-	font-size:14pt;
-	padding: 10px 5px 0px 5px;
-	font-family: Helvetica;
-	background-color: #DDDDDD;
-}
-
-.axis path {
-  fill:none;
-  stroke: black;
-}
-
-.tick {
-  fill:none;
-  stroke:black;
-} 
-
-.axis {
-  font-family: arial;
-  font-size:0.6em;
-}
-
-path {
-  fill:none;
-  stroke:black;
-  stroke-width:2px;
-}
-
-.container {
-    width:1300px;
-    margin:20px 0;
-    padding: 20px;
-}
-
-.content {
-    float:left;
-    width:600px;
-}
-
-#footer {
-    clear:both;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-gui/src/main/webapp/table.jsp
----------------------------------------------------------------------
diff --git a/blur-gui/src/main/webapp/table.jsp b/blur-gui/src/main/webapp/table.jsp
deleted file mode 100644
index 9dbe59e..0000000
--- a/blur-gui/src/main/webapp/table.jsp
+++ /dev/null
@@ -1,146 +0,0 @@
-<%
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file 
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-%>
-<%@page import="java.text.DecimalFormat"%>
-<%@page import="java.text.NumberFormat"%>
-<%@ page contentType="text/html; charset=UTF-8" isThreadSafe="false"
-	import="javax.servlet.*" import="javax.servlet.http.*"
-	import="java.io.*" import="java.util.*" import="java.text.DateFormat"
-	import="java.lang.Math" import="java.net.URLEncoder"
-	import="org.apache.blur.thrift.*"
-	import="org.apache.blur.thrift.generated.*"
-	import="org.apache.blur.thrift.generated.Blur.*"%>
-<%@ include file="functions.jsp"%>
-<%!public boolean tableInSafeMode(Iface client, String clusterName) throws Exception {
-		return client.isInSafeMode(clusterName);
-	}
-
-	public String getStats(Iface client, String tableName) throws Exception {
-		DecimalFormat df = new DecimalFormat("#,###,###,###0.00");
-		String ret = "";
-
-		TableStats ts = client.tableStats(tableName);
-		String size = "";
-		//bytes
-		if(ts.bytes < 1000)
-			size = ts.bytes + " bytes";
-		//kb
-		else if(ts.bytes < 1048576)
-			size = df.format(ts.bytes/1000.0) + " KB";
-		else if(ts.bytes < 1073741824)
-			size = df.format(ts.bytes/1000.0/1000) + " MB";
-		else if(ts.bytes < 137438953472l)
-			size = df.format(ts.bytes/1000.0/1000/1000) + " GB";
-		else if(ts.bytes < 1099511627776l)
-			size = df.format(ts.bytes/1000.0/1000/1000/1000) + " TB";
-		ret += row("size", size);
-		ret += row("Rows", ts.rowCount + "");
-		ret += row("Records", ts.recordCount + "");
-		TableDescriptor td = client.describe(tableName);
-		ret += row("Block Caching", td.blockCaching + "");
-		ret += row("Read Only", td.readOnly + "");
-		return ret;
-	}
-
-	public String getSchema(Iface client, String tableName) throws Exception {
-		String ret = "";
-
-		Schema s = client.schema(tableName);
-		for (String fam : s.families.keySet()) {
-			String tmp = "";
-			Map<String,ColumnDefinition> columns = s.getFamilies().get(fam);
-			for (String c : columns.keySet()) {
-				ColumnDefinition cd = columns.get(c);
-				StringBuilder sb = new StringBuilder();
-				if (!(cd.getProperties() == null || cd.getProperties().isEmpty())) {
-					for (String key : cd.getProperties().keySet()) {
-						String value = cd.getProperties().get(key);
-						sb.append(key).append(":").append(value).append("<br/>");
-					}
-				}
-				if (cd.getSubColumnName() == null) {
-					cd.setSubColumnName("");
-				}
-				ret += row(fam, cd.getColumnName(), cd.getSubColumnName(), cd.getFieldType(), Boolean.toString(cd.isFieldLessIndexed()),
sb.toString());
-			}
-		}
-		return ret;
-	}%>
-<%
-	final String NONE = "none given";
-
-	String hostName = request.getServerName() + ":" + System.getProperty("blur.gui.servicing.port");
-
-	Iface client = BlurClient.getClient(hostName);
-
-	String tableName = request.getParameter("tableName");
-	String clusterName = request.getParameter("clusterName");
-
-	if (tableName == null || tableName.length() < 1) {
-		tableName = NONE;
-	}
-
-	if (clusterName == null || clusterName.length() < 1) {
-		clusterName = NONE;
-	}
-%>
-
-
-<html>
-<head>
-<title>Table '<%=tableName%>'
-</title>
-
-<link href="style.css" rel="stylesheet" type="text/css" />
-
-</head>
-
-<body>
-	<%
-		if (NONE.equals(clusterName) || NONE.equals(tableName)) {
-	%>
-	Dont have a cluster and tableName specified, go home.
-	<%
-		} else {
-	%>
-	<h1>
-		Table '<%=tableName%>'
-	</h1>
-	<%
-		if (tableInSafeMode(client, clusterName)) {
-	%>
-		Cluster
-		<%=clusterName%>
-		is in safe mode, cannot retrieve table information yet.
-	<%
-			} else {
-	%>
-		<h2>Stats</h2>
-		<%=table(getStats(client, tableName), "Stat", "Value")%>
-		<br />
-		<h2>Schema</h2>
-		<%=table(getSchema(client, tableName), "Family", "Column", "SubColumn", "Type", "FT/Indexed",
"Properties")%>
-	<%
-			}
-		}
-	%>
-<%@ include file="footer.jsp" %>
-</body>
-</html>
-

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-gui/src/main/webapp/tableList.html
----------------------------------------------------------------------
diff --git a/blur-gui/src/main/webapp/tableList.html b/blur-gui/src/main/webapp/tableList.html
deleted file mode 100644
index 4673fe6..0000000
--- a/blur-gui/src/main/webapp/tableList.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html>
-<head>
-<title>Blur</title>
-<meta charset="utf-8">
-<link href="css/bootstrap.min.css" rel="stylesheet">
-</head>
-
-<script src="js/jquery-1.9.1.min.js"></script>
-<script src="js/thrift.js"></script>
-<script src="js/Blur.js"></script>
-<script src="js/Blur_types.js"></script>
-<script>
-function tableList() {
-    var transport = new Thrift.Transport("/blur");
-    var protocol  = new Thrift.Protocol(transport);
-    var client    = new BlurClient(protocol);
-        
-    try {
-      var result = client.tableList();
-      for (var i = 0; i < result.length; i++) {
-	    var tableName = result[i];
-	    var tableDescriptor = client.describe(tableName)
-        $("#blurtables_tbody").append(
-	     "<tr>"+
-	      "<td>"+tableDescriptor.name+"</td>"+
-	      "<td>"+tableDescriptor.readOnly+"</td>"+
-	      "<td>"+tableDescriptor.cluster+"</td>"+
-	      "<td>"+tableDescriptor.isEnabled+"</td>"+
-	      "<td>"+tableDescriptor.shardCount+"</td>"+
-	      "<td>"+tableDescriptor.tableUri+"</td>"+
-	     "</tr>");
-      }
-    } catch(ouch){
-alert (ouch);
-    }
-}
-$(window).bind("load", tableList);
-</script>
-<body>
-
-<table>
-<thead>
-<tr>
-<th>Table Name</th>
-<th>ReadOnly</th>
-<th>Cluster</th>
-<th>Enabled</th>
-<th>Shard Count</th>
-<th>Table Uri</th>
-</tr>
-</thead>
-<tbody id="blurtables_tbody">
-	
-</tbody>
-</table>
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-gui/src/main/webapp/test.html
----------------------------------------------------------------------
diff --git a/blur-gui/src/main/webapp/test.html b/blur-gui/src/main/webapp/test.html
deleted file mode 100644
index 89a1162..0000000
--- a/blur-gui/src/main/webapp/test.html
+++ /dev/null
@@ -1,141 +0,0 @@
-<!DOCTYPE html>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html>
-<head>
-<meta charset="utf-8">
-<style>
-svg {
-	font: 10px sans-serif;
-}
-
-.line {
-	fill: none;
-	stroke: #000;
-	stroke-width: 1.5px;
-}
-
-.axis path,.axis line {
-	fill: none;
-	stroke: #000;
-	shape-rendering: crispEdges;
-}
-
-div { 
-	background: #CCC;
-}
-
-</style>
-
-</head>
-
-<script src="d3.v2.js"></script>
-<body>
-	<script>
-		//decimal formatter
-		var df = d3.format("4d");
-
-		//basic printout
-		d3.json("metrics", function(json) {
-			//alert(json);
-			arr = [];
-			arr[0] = json;
-			//select obj and bind data
-			d3.select("body").selectAll("ul")
-				.data(arr)
-				.enter().append("ul")
-				.text("Metrics")
-				.selectAll("li")
-				.data(function(d) {
-					var map = [];
-					var i = 0;
-					for(var x in d) {
-						var obj = {};
-						obj.name = x;
-						obj.value = d[x];
-						map[i++] = obj;
-					}
-					return map})
-					.enter()
-					.append("li")
-					.text(function(d) { return d.name + " " + d.value })
-					.style("background-color", function(d,i) { return i % 2 ? "#eee" : "#ddd"; });
-		});
-		
-		
-		
-		//realtime update stuffs
-		
-		//data holder
-		var dummy = [];
-		
-		var total = 10;
-		for(i=0;i<total-1;i++)
-			dummy.push(0);
-		
-		var div = null;
-
-		//not sure why i have to init inside the json method
-		d3.json("metrics", function(json) {
-			dummy.push(d3.round(json.methodCalls.mutate.invokes
-					/ (json.methodCalls.mutate.times / 1000000000.0), 3));
-
-			//select obj and bind data
-			div = d3.select("body")
-						.selectAll("div")
-						.data(dummy)
-						.enter()
-						.append("div")
-						.append("p")
-						.text(function(d) { return d + " mutates/s"});
-			dummy.shift();
-		
-		});
-
-		if(dummy === undefined)
-			alert("no metrics for mutates");
-
-		function tock() {
-			d3.json("metrics", function(json) {
-				dummy.push(d3.round(json.methodCalls.mutate.invokes
-						/ (json.methodCalls.mutate.times / 1000000000.0), 3));
-
-				alert("dummy.length: " + dummy.length + " dummy: " + dummy);
-	
-				div.transition()
-					.duration(1000)
-					.ease("linear")
-					//.text(function(d,i) { alert(d + " " + i);return d + " mutates/s"})
-					.each("end",tock());
-				dummy.shift();
-			});
-		}
-
-		tock();
-		
-		//after data add?
-//		div.enter().append("span").text(function(d) {
-//			return d + "<br/>\n";
-//		})
-
-
-	</script>
-
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-gui/src/main/webapp/traces.html
----------------------------------------------------------------------
diff --git a/blur-gui/src/main/webapp/traces.html b/blur-gui/src/main/webapp/traces.html
index d7d92e9..30ec931 100644
--- a/blur-gui/src/main/webapp/traces.html
+++ b/blur-gui/src/main/webapp/traces.html
@@ -45,7 +45,7 @@ function displayPage() {
       body.html(s + "</table>");
 	  for (var i = 0; i < lst.length; i++) {
 		var traceId = lst[i];
-        $("#traceid_"+traceId).click(function(){ displayRequestIds(event.target.id); return
false; });
+        $("#traceid_"+traceId).click(function(event){ displayRequestIds(event.target.id);
return false; });
       }
 
     } catch(ouch){

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
----------------------------------------------------------------------
diff --git a/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
b/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
index 0dbc887..1731864 100644
--- a/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
+++ b/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
@@ -400,10 +400,11 @@ public class BlurOutputFormat extends OutputFormat<Text, BlurMutate>
{
 
       _conf = new IndexWriterConfig(LuceneVersionConstant.LUCENE_VERSION, analyzer);
       _conf.setCodec(new Blur021Codec());
+      _conf.setSimilarity(tableContext.getSimilarity());
       TieredMergePolicy mergePolicy = (TieredMergePolicy) _conf.getMergePolicy();
       mergePolicy.setUseCompoundFile(false);
 
-      _overFlowConf = new IndexWriterConfig(LuceneVersionConstant.LUCENE_VERSION, analyzer);
+      _overFlowConf = _conf.clone();
       _overFlowConf.setMergePolicy(NoMergePolicy.NO_COMPOUND_FILES);
 
       if (_indexLocally) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-query/src/main/java/org/apache/blur/lucene/search/SuperQuery.java
----------------------------------------------------------------------
diff --git a/blur-query/src/main/java/org/apache/blur/lucene/search/SuperQuery.java b/blur-query/src/main/java/org/apache/blur/lucene/search/SuperQuery.java
index 6939bd6..5a436c1 100644
--- a/blur-query/src/main/java/org/apache/blur/lucene/search/SuperQuery.java
+++ b/blur-query/src/main/java/org/apache/blur/lucene/search/SuperQuery.java
@@ -220,7 +220,7 @@ public class SuperQuery extends AbstractWrapperQuery {
     @Override
     public int advance(int target) throws IOException {
       if (target == NO_MORE_DOCS) {
-        return print(ADVANCE, primeDoc = scorer.advance(NO_MORE_DOCS));
+        return print(ADVANCE, primeDoc = NO_MORE_DOCS);
       }
       int doc = scorer.docID();
       int odoc = doc;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7e392bf4/blur-util/src/main/java/org/apache/blur/trace/TraceCollector.java
----------------------------------------------------------------------
diff --git a/blur-util/src/main/java/org/apache/blur/trace/TraceCollector.java b/blur-util/src/main/java/org/apache/blur/trace/TraceCollector.java
index b6d23fc..b5953f3 100644
--- a/blur-util/src/main/java/org/apache/blur/trace/TraceCollector.java
+++ b/blur-util/src/main/java/org/apache/blur/trace/TraceCollector.java
@@ -30,7 +30,7 @@ public class TraceCollector {
   protected final List<TracerImpl> _traces = new CopyOnWriteArrayList<TracerImpl>();
   protected final AtomicLong _traceCounter = new AtomicLong();
   protected final AtomicInteger _scope = new AtomicInteger();
-  protected final long _now = System.nanoTime();
+  protected final long _now = (System.currentTimeMillis() * 1000000) + (System.nanoTime()
% 1000000);
   protected final String _pid;
   protected final String _threadName;
   protected final String _nodeName;


Mime
View raw message