zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject svn commit: r1326464 - in /zookeeper/bookkeeper/trunk: CHANGES.txt hedwig-server/bin/hedwig hedwig-server/src/main/java/org/apache/hedwig/admin/HedwigAdmin.java
Date Mon, 16 Apr 2012 02:29:19 GMT
Author: sijie
Date: Mon Apr 16 02:29:19 2012
New Revision: 1326464

URL: http://svn.apache.org/viewvc?rev=1326464&view=rev
Log:
BOOKKEEPER-197: HedwigConsole uses the same file to load bookkeeper client config and hub
server config (sijie)

Modified:
    zookeeper/bookkeeper/trunk/CHANGES.txt
    zookeeper/bookkeeper/trunk/hedwig-server/bin/hedwig
    zookeeper/bookkeeper/trunk/hedwig-server/src/main/java/org/apache/hedwig/admin/HedwigAdmin.java

Modified: zookeeper/bookkeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/CHANGES.txt?rev=1326464&r1=1326463&r2=1326464&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/CHANGES.txt (original)
+++ zookeeper/bookkeeper/trunk/CHANGES.txt Mon Apr 16 02:29:19 2012
@@ -94,6 +94,8 @@ Trunk (unreleased changes)
 
         BOOKKEEPER-163: Prevent incorrect NoSuchLedgerException for readLastConfirmed. (ivank
via sijie)
 
+        BOOKKEEPER-197: HedwigConsole uses the same file to load bookkeeper client config
and hub server config (sijie)
+
       bookkeeper-benchmark/
 	
 	BOOKKEEPER-207: BenchBookie doesn't run correctly (ivank via fpj)

Modified: zookeeper/bookkeeper/trunk/hedwig-server/bin/hedwig
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/hedwig-server/bin/hedwig?rev=1326464&r1=1326463&r2=1326464&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/hedwig-server/bin/hedwig (original)
+++ zookeeper/bookkeeper/trunk/hedwig-server/bin/hedwig Mon Apr 16 02:29:19 2012
@@ -86,9 +86,13 @@ where command is one of:
 or command is the full name of a class with a defined main() method.
 
 Environment variables:
-   HEDWIG_SERVER_CONF     Hedwig server configuration file (default $DEFAULT_CONF)
-   HEDWIG_LOG_CONF        Log4j configuration file
-   HEDWIG_EXTRA_OPTS      Extra options to be passed to the jvm
+   HEDWIG_SERVER_CONF           Hedwig server configuration file (default $DEFAULT_CONF)
+   HEDWIG_CONSOLE_SERVER_CONF   Server part configuration for hedwig console,
+                                used for metadata management (default it is same as HEDWIG_SERVER_CONF)
+   HEDWIG_CONSOLE_CLIENT_CONF   Client part configuration for hedwig console,
+                                used for interacting with hub server.
+   HEDWIG_LOG_CONF              Log4j configuration file
+   HEDWIG_EXTRA_OPTS            Extra options to be passed to the jvm
 
 These variable can also be set in conf/hwenv.sh
 EOF
@@ -122,7 +126,15 @@ OPTS="$OPTS -Djava.net.preferIPv4Stack=t
 if [ $COMMAND == "server" ]; then
     exec java $OPTS org.apache.hedwig.server.netty.PubSubServer $HEDWIG_SERVER_CONF $@
 elif [ $COMMAND == "console" ]; then
-    exec java $OPTS org.apache.hedwig.admin.console.HedwigConsole -server-cfg $HEDWIG_SERVER_CONF
$@
+    # hedwig console configuration server part
+    if [ -n "$HEDWIG_CONSOLE_SERVER_CONF" ]; then
+        HEDWIG_CONSOLE_SERVER_CONF=$HEDWIG_SERVER_CONF
+    fi
+    # hedwig console configuration client part
+    if [ -n "$HEDWIG_CONSOLE_CLIENT_CONF" ]; then
+        HEDWIG_CONSOLE_CLIENT_OPTIONS="-client-cfg $HEDWIG_CONSOLE_CLIENT_CONF"
+    fi
+    exec java $OPTS org.apache.hedwig.admin.console.HedwigConsole -server-cfg $HEDWIG_CONSOLE_SERVER_CONF
$HEDWIG_CONSOLE_CLIENT_OPTIONS $@
 elif [ $COMMAND == "help" ]; then
     hedwig_help;
 else

Modified: zookeeper/bookkeeper/trunk/hedwig-server/src/main/java/org/apache/hedwig/admin/HedwigAdmin.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/hedwig-server/src/main/java/org/apache/hedwig/admin/HedwigAdmin.java?rev=1326464&r1=1326463&r2=1326464&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/hedwig-server/src/main/java/org/apache/hedwig/admin/HedwigAdmin.java
(original)
+++ zookeeper/bookkeeper/trunk/hedwig-server/src/main/java/org/apache/hedwig/admin/HedwigAdmin.java
Mon Apr 16 02:29:19 2012
@@ -84,10 +84,10 @@ public class HedwigAdmin {
         this.bkClientConf = bkConf;
 
         // connect to zookeeper
-        zk = new ZooKeeper(bkClientConf.getZkServers(), bkClientConf.getZkTimeout(), new
MyWatcher());
+        zk = new ZooKeeper(hubConf.getZkHost(), hubConf.getZkTimeout(), new MyWatcher());
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Connecting to zookeeper " + bkClientConf.getZkServers() + ", timeout
= "
-                    + bkClientConf.getZkTimeout());
+            LOG.debug("Connecting to zookeeper " + hubConf.getZkHost() + ", timeout = "
+                    + hubConf.getZkTimeout());
         }
 
         // connect to bookkeeper



Mime
View raw message