Issue 23 making gridworks print out the parameters that it was initialized with

(we have to pass them from the command line because there is no way to access it directly from java from the standard java library)


git-svn-id: http://google-refine.googlecode.com/svn/trunk@745 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-05-13 01:10:41 +00:00
parent 5070de6446
commit a7e06721da
3 changed files with 7 additions and 2 deletions

View File

@ -750,7 +750,7 @@ add_option "$JAVA_OPTIONS"
if [ -z "$GRIDWORKS_MEMORY" ]; then if [ -z "$GRIDWORKS_MEMORY" ]; then
GRIDWORKS_MEMORY="1024M" GRIDWORKS_MEMORY="1024M"
fi fi
add_option "-Xms256M -Xmx$GRIDWORKS_MEMORY" add_option "-Xms256M -Xmx$GRIDWORKS_MEMORY -Dgridworks.memory=$GRIDWORKS_MEMORY"
if [ -z "$GRIDWORKS_PORT" ]; then if [ -z "$GRIDWORKS_PORT" ]; then
GRIDWORKS_PORT="3333" GRIDWORKS_PORT="3333"

View File

@ -127,7 +127,7 @@ set OPTS=%OPTS% %JAVA_OPTIONS%
if not "%GRIDWORKS_MEMORY%" == "" goto gotMemory if not "%GRIDWORKS_MEMORY%" == "" goto gotMemory
set GRIDWORKS_MEMORY=1024M set GRIDWORKS_MEMORY=1024M
:gotMemory :gotMemory
set OPTS=%OPTS% -Xms256M -Xmx%GRIDWORKS_MEMORY% set OPTS=%OPTS% -Xms256M -Xmx%GRIDWORKS_MEMORY% -Dgridworks.memory=%GRIDWORKS_MEMORY%
if not "%GRIDWORKS_PORT%" == "" goto gotPort if not "%GRIDWORKS_PORT%" == "" goto gotPort
set GRIDWORKS_PORT=3333 set GRIDWORKS_PORT=3333

View File

@ -128,6 +128,11 @@ class GridworksServer extends Server {
private ThreadPoolExecutor threadPool; private ThreadPoolExecutor threadPool;
public void init(String host, int port) throws Exception { public void init(String host, int port) throws Exception {
logger.info("Starting Server bound to '" + host + ":" + port + "'");
String memory = Configurations.get("gridworks.memory");
if (memory != null) logger.info("Max memory size: " + memory);
int maxThreads = Configurations.getInteger("gridworks.queue.size", 30); int maxThreads = Configurations.getInteger("gridworks.queue.size", 30);
int maxQueue = Configurations.getInteger("gridworks.queue.max_size", 300); int maxQueue = Configurations.getInteger("gridworks.queue.max_size", 300);
long keepAliveTime = Configurations.getInteger("gridworks.queue.idle_time", 60); long keepAliveTime = Configurations.getInteger("gridworks.queue.idle_time", 60);