zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2960) The dataDir and dataLogDir are used opposingly
Date Mon, 12 Mar 2018 11:42:00 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-2960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16395105#comment-16395105
] 

ASF GitHub Bot commented on ZOOKEEPER-2960:
-------------------------------------------

ijuma closed pull request #4678: MINOR: Revert to ZooKeeper 3.4.10 due to ZOOKEEPER-2960
URL: https://github.com/apache/kafka/pull/4678
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/test/scala/unit/kafka/server/ServerShutdownTest.scala b/core/src/test/scala/unit/kafka/server/ServerShutdownTest.scala
index 596c3539f83..5e33816783a 100755
--- a/core/src/test/scala/unit/kafka/server/ServerShutdownTest.scala
+++ b/core/src/test/scala/unit/kafka/server/ServerShutdownTest.scala
@@ -23,6 +23,7 @@ import kafka.utils.TestUtils._
 import kafka.api.FetchRequestBuilder
 import kafka.message.ByteBufferMessageSet
 import java.io.File
+import java.net.UnknownHostException
 
 import kafka.log.LogManager
 import org.apache.kafka.clients.producer.{KafkaProducer, ProducerRecord}
@@ -130,7 +131,7 @@ class ServerShutdownTest extends ZooKeeperTestHarness {
     val newProps = TestUtils.createBrokerConfig(0, zkConnect)
     newProps.setProperty("zookeeper.connect", "some.invalid.hostname.foo.bar.local:65535")
     val newConfig = KafkaConfig.fromProps(newProps)
-    verifyCleanShutdownAfterFailedStartup[IllegalArgumentException](newConfig)
+    verifyCleanShutdownAfterFailedStartup[UnknownHostException](newConfig)
   }
 
   @Test
diff --git a/core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala b/core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala
index 77e11eae716..4eb9e67bf60 100644
--- a/core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala
+++ b/core/src/test/scala/unit/kafka/zookeeper/ZooKeeperClientTest.scala
@@ -16,6 +16,7 @@
  */
 package kafka.zookeeper
 
+import java.net.UnknownHostException
 import java.nio.charset.StandardCharsets
 import java.util.UUID
 import java.util.concurrent.atomic.AtomicBoolean
@@ -57,7 +58,7 @@ class ZooKeeperClientTest extends ZooKeeperTestHarness {
     System.clearProperty(JaasUtils.JAVA_LOGIN_CONFIG_PARAM)
   }
 
-  @Test(expected = classOf[IllegalArgumentException])
+  @Test(expected = classOf[UnknownHostException])
   def testUnresolvableConnectString(): Unit = {
     new ZooKeeperClient("some.invalid.hostname.foo.bar.local", -1, -1, Int.MaxValue, time,
"testMetricGroup",
       "testMetricType").close()
diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle
index 2ac496b4ca9..b7a03dcd752 100644
--- a/gradle/dependencies.gradle
+++ b/gradle/dependencies.gradle
@@ -71,7 +71,7 @@ versions += [
   slf4j: "1.7.25",
   snappy: "1.1.7.1",
   zkclient: "0.10",
-  zookeeper: "3.4.11",
+  zookeeper: "3.4.10",
   jfreechart: "1.0.0",
   mavenArtifact: "3.5.2"
 ]


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> The dataDir and dataLogDir are used opposingly
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-2960
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2960
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.4.11
>         Environment: Not relevant.
>            Reporter: Dan Milon
>            Assignee: Andor Molnar
>            Priority: Critical
>             Fix For: 3.4.12
>
>
> _emphasized text_After upgrading from zookeeper 3.4.5, to 3.4.11, without editing {{zoo.cfg}},
the new version of the server tries to use the {{dataDir}} as the {{dataLogDir}}, and the
{{dataLogDir}} as the {{dataDir}}. Or at least some parts of the server.
> Configuration file has:
> {noformat}
> $ grep -i data /etc/zookeeper/zoo.cfg 
> dataLogDir=/var/lib/zookeeper/datalog
> dataDir=/var/lib/zookeeper/data
> {noformat}
> But runtime configuration has:
> {noformat}
> $ echo conf | nc localhost 2181 | grep -i data
> dataDir=/var/lib/zookeeper/datalog/version-2
> dataLogDir=/var/lib/zookeeper/data/version-2
> {noformat}
> Also, I got this in the debug logs, so clearly some parts of the server confuse things.
> {noformat}
> [PurgeTask:FileTxnSnapLog@79] - Opening datadir:/var/lib/zookeeper/datalog snapDir:/var/lib/zookeeper/data
> [main:FileTxnSnapLog@79] - Opening datadir:/var/lib/zookeeper/data snapDir:/var/lib/zookeeper/datalog
> {noformat}
> I tried to look in the code for wrong uses of the directories. I only found [ZookeeperServer.java|https://github.com/apache/zookeeper/blob/master/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java#L227]
is passing the arguments to {{FileTxnSnapLog}} in the wrong order, but the code comment says
that this is legacy only for tests, so I assume it isn't the cause for my case.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message