Merge branch 'gui'
Conflicts:
src/blur-core/src/main/java/com/nearinfinity/blur/thrift/ThriftBlurControllerServer.java
src/blur-core/src/main/java/com/nearinfinity/blur/thrift/ThriftBlurShardServer.java
Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/4503f313
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/4503f313
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/4503f313
Branch: refs/heads/master
Commit: 4503f3134aabc5160c0ff404cfc4796d496cbe88
Parents: b0ef526 8757962
Author: gbarton <[email protected]>
Authored: Thu Aug 23 23:07:20 2012 -0400
Committer: gbarton <[email protected]>
Committed: Thu Aug 23 23:07:20 2012 -0400
----------------------------------------------------------------------
bin/blur-config.sh | 4 +
src/blur-core/pom.xml | 5 +
.../blur/thrift/ThriftBlurControllerServer.java | 17 +-
.../blur/thrift/ThriftBlurShardServer.java | 21 +-
.../com/nearinfinity/blur/utils/BlurConstants.java | 3 +
src/blur-gui/pom.xml | 148 +
.../com/nearinfinity/blur/gui/HttpJettyServer.java | 93 +
.../java/com/nearinfinity/blur/gui/LogServlet.java | 80 +
.../com/nearinfinity/blur/gui/MetricsServlet.java | 36 +
.../src/main/webapps/controller/WEB-INF/web.xml | 8 +
src/blur-gui/src/main/webapps/controller/d3.v2.js | 9406 +++++++++++++++
.../src/main/webapps/controller/d3.v2.min.js | 4 +
.../src/main/webapps/controller/footer.jsp | 2 +
.../src/main/webapps/controller/functions.jsp | 25 +
src/blur-gui/src/main/webapps/controller/home.jsp | 120 +
.../src/main/webapps/controller/index.html | 13 +
.../src/main/webapps/controller/metrics.jsp | 103 +
.../src/main/webapps/controller/shardList.jsp | 60 +
src/blur-gui/src/main/webapps/controller/style.css | 53 +
src/blur-gui/src/main/webapps/controller/table.jsp | 147 +
src/blur-gui/src/main/webapps/controller/test.html | 123 +
src/blur-testsuite/pom.xml | 74 +-
.../blur/testsuite/CreateInsertQueryRepeating.java | 270 +
.../blur/testsuite/LoadDataAsyncContinuously.java | 2 +-
.../src/main/resources/blur-default.properties | 3 +
src/pom.xml | 2 +-
26 files changed, 10785 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4503f313/src/blur-core/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4503f313/src/blur-core/src/main/java/com/nearinfinity/blur/thrift/ThriftBlurControllerServer.java
----------------------------------------------------------------------
diff --cc
src/blur-core/src/main/java/com/nearinfinity/blur/thrift/ThriftBlurControllerServer.java
index ed85e69,618d8dc..f42329a
---
a/src/blur-core/src/main/java/com/nearinfinity/blur/thrift/ThriftBlurControllerServer.java
+++
b/src/blur-core/src/main/java/com/nearinfinity/blur/thrift/ThriftBlurControllerServer.java
@@@ -35,8 -35,12 +35,11 @@@ import static com.nearinfinity.blur.uti
import static
com.nearinfinity.blur.utils.BlurConstants.BLUR_CONTROLLER_SERVER_THRIFT_THREAD_COUNT;
import static
com.nearinfinity.blur.utils.BlurConstants.BLUR_ZOOKEEPER_CONNECTION;
import static
com.nearinfinity.blur.utils.BlurConstants.BLUR_ZOOKEEPER_SYSTEM_TIME_TOLERANCE;
+ import static
com.nearinfinity.blur.utils.BlurConstants.BLUR_GUI_CONTROLLER_PORT;
+ import static com.nearinfinity.blur.utils.BlurConstants.BLUR_GUI_SHARD_PORT;
+ import static com.nearinfinity.blur.utils.BlurConstants.BLUR_SHARD_BIND_PORT;
import static com.nearinfinity.blur.utils.BlurUtil.quietClose;
-import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.apache.hadoop.conf.Configuration;
@@@ -127,17 -130,28 +131,28 @@@ public class ThriftBlurControllerServe
server.setBindPort(bindPort);
server.setThreadCount(threadCount);
server.setIface(iface);
+
+ int webServerPort =
Integer.parseInt(configuration.get(BLUR_GUI_CONTROLLER_PORT)) + serverIndex;
+
+ //TODO: this got ugly, there has to be a better way to handle all these
params
+ //without reversing the mvn dependancy and making blur-gui on top.
+ final HttpJettyServer httpServer = new HttpJettyServer(bindPort,
webServerPort,
+ configuration.getInt(BLUR_CONTROLLER_BIND_PORT, -1),
+ configuration.getInt(BLUR_SHARD_BIND_PORT, -1),
+ configuration.getInt(BLUR_GUI_CONTROLLER_PORT,-1),
+ configuration.getInt(BLUR_GUI_SHARD_PORT,-1),
+ "controller", blurMetrics);
// This will shutdown the server when the correct path is set in zk
- new BlurServerShutDown().register(new BlurShutdown() {
+ BlurShutdown shutdown = new BlurShutdown() {
@Override
public void shutdown() {
ThreadWatcher threadWatcher = ThreadWatcher.instance();
- quietClose(server, controllerServer, clusterStatus, zooKeeper,
threadWatcher);
+ quietClose(server, controllerServer, clusterStatus, zooKeeper,
threadWatcher, httpServer);
- System.exit(0);
}
- }, zooKeeper);
-
- server.start();
+ };
+ server.setShutdown(shutdown);
+ new BlurServerShutDown().register(shutdown, zooKeeper);
+ return server;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4503f313/src/blur-core/src/main/java/com/nearinfinity/blur/thrift/ThriftBlurShardServer.java
----------------------------------------------------------------------
diff --cc
src/blur-core/src/main/java/com/nearinfinity/blur/thrift/ThriftBlurShardServer.java
index 6a51274,79b8dd5..8e3d61a
---
a/src/blur-core/src/main/java/com/nearinfinity/blur/thrift/ThriftBlurShardServer.java
+++
b/src/blur-core/src/main/java/com/nearinfinity/blur/thrift/ThriftBlurShardServer.java
@@@ -16,7 -16,10 +16,14 @@@
package com.nearinfinity.blur.thrift;
++<<<<<<< HEAD
+import static com.nearinfinity.blur.utils.BlurConstants.*;
++=======
+ import static
com.nearinfinity.blur.utils.BlurConstants.BLUR_CONTROLLER_BIND_PORT;
+ import static
com.nearinfinity.blur.utils.BlurConstants.BLUR_GUI_CONTROLLER_PORT;
+ import static com.nearinfinity.blur.utils.BlurConstants.BLUR_GUI_SHARD_PORT;
+ import static
com.nearinfinity.blur.utils.BlurConstants.BLUR_INDEXMANAGER_SEARCH_THREAD_COUNT;
++>>>>>>> gui
import static com.nearinfinity.blur.utils.BlurConstants.BLUR_MAX_CLAUSE_COUNT;
import static
com.nearinfinity.blur.utils.BlurConstants.BLUR_SHARD_BIND_ADDRESS;
import static com.nearinfinity.blur.utils.BlurConstants.BLUR_SHARD_BIND_PORT;
@@@ -204,18 -196,28 +212,29 @@@ public class ThriftBlurShardServer exte
server.setThreadCount(threadCount);
server.setIface(iface);
server.setConfiguration(configuration);
+
+ int webServerPort =
Integer.parseInt(configuration.get(BLUR_GUI_SHARD_PORT)) + serverIndex;
+
+ //TODO: this got ugly, there has to be a better way to handle all these
params
+ //without reversing the mvn dependancy and making blur-gui on top.
+ final HttpJettyServer httpServer = new HttpJettyServer(bindPort,
webServerPort,
+ configuration.getInt(BLUR_CONTROLLER_BIND_PORT, -1),
+ configuration.getInt(BLUR_SHARD_BIND_PORT, -1),
+ configuration.getInt(BLUR_GUI_CONTROLLER_PORT,-1),
+ configuration.getInt(BLUR_GUI_SHARD_PORT,-1),
+ "shard", blurMetrics);
// This will shutdown the server when the correct path is set in zk
- new BlurServerShutDown().register(new BlurShutdown() {
+ BlurShutdown shutdown = new BlurShutdown() {
@Override
public void shutdown() {
ThreadWatcher threadWatcher = ThreadWatcher.instance();
- quietClose(refresher, server, shardServer, indexManager, indexServer,
threadWatcher, clusterStatus, zooKeeper);
- quietClose(refresher, server, shardServer, indexManager, indexServer,
threadWatcher, httpServer);
- System.exit(0);
++ quietClose(refresher, server, shardServer, indexManager, indexServer,
threadWatcher, clusterStatus, zooKeeper, httpServer);
}
- }, zooKeeper);
- server.start();
+ };
+ server.setShutdown(shutdown);
+ new BlurServerShutDown().register(shutdown, zooKeeper);
+ return server;
}
private static BlurFilterCache getFilterCache(BlurConfiguration
configuration) {
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4503f313/src/blur-core/src/main/java/com/nearinfinity/blur/utils/BlurConstants.java
----------------------------------------------------------------------