You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by jo...@apache.org on 2014/09/02 20:16:05 UTC

git commit: KAFKA-1485 Upgrade to Zookeeper 3.4.6 missing file

Repository: kafka
Updated Branches:
  refs/heads/trunk 3abe3403a -> ae2414127


KAFKA-1485 Upgrade to Zookeeper 3.4.6 missing file


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/ae241412
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/ae241412
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/ae241412

Branch: refs/heads/trunk
Commit: ae24141275727255e0dd5d8a739648851d0a0491
Parents: 3abe340
Author: Joe Stein <jo...@stealth.ly>
Authored: Tue Sep 2 14:17:10 2014 -0400
Committer: Joe Stein <jo...@stealth.ly>
Committed: Tue Sep 2 14:17:10 2014 -0400

----------------------------------------------------------------------
 .../kafka/tools/ZooKeeperMainWrapper.scala      | 39 ++++++++++++++++++++
 1 file changed, 39 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/ae241412/core/src/main/scala/kafka/tools/ZooKeeperMainWrapper.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/tools/ZooKeeperMainWrapper.scala b/core/src/main/scala/kafka/tools/ZooKeeperMainWrapper.scala
new file mode 100644
index 0000000..4c51f31
--- /dev/null
+++ b/core/src/main/scala/kafka/tools/ZooKeeperMainWrapper.scala
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+package kafka.tools
+
+import org.apache.zookeeper.ZooKeeperMain
+
+class ZooKeeperMainWrapper(args: Array[String]) extends ZooKeeperMain(args) {
+  def runCmd(): Unit = {
+    processCmd(this.cl)
+    System.exit(0)
+  }
+}
+
+/**
+ * ZooKeeper 3.4.6 broke being able to pass commands on command line.
+ * See ZOOKEEPER-1897.  This class is a hack to restore this faclity.
+ */
+object ZooKeeperMainWrapper {
+
+  def main(args: Array[String]): Unit = {
+    val main: ZooKeeperMainWrapper = new ZooKeeperMainWrapper(args)
+    main.runCmd()
+  }
+}