object
TestLogCleaning
extends AnyRef
Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
!=
(arg0: Any): Boolean
-
def
##
(): Int
-
def
==
(arg0: AnyRef): Boolean
-
def
==
(arg0: Any): Boolean
-
def
asInstanceOf
[T0]
: T0
-
def
clone
(): AnyRef
-
def
consumeMessages
(zkUrl: String, topics: Array[String]): File
-
def
dumpLog
(dir: File): Unit
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
externalSort
(file: File): BufferedReader
-
def
finalize
(): Unit
-
def
getClass
(): java.lang.Class[_]
-
def
hashCode
(): Int
-
def
isInstanceOf
[T0]
: Boolean
-
def
lineCount
(file: File): Int
-
def
main
(args: Array[String]): Unit
-
def
makeConsumer
(zkUrl: String, topics: Array[String]): ZookeeperConsumerConnector
-
def
ne
(arg0: AnyRef): Boolean
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
def
peekLine
(reader: BufferedReader): String
-
def
produceMessages
(brokerUrl: String, topics: Array[String], messages: Long, dups: Int, percentDeletes: Int): File
-
def
readNext
(reader: BufferedReader): TestRecord
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
toString
(): String
-
def
validateOutput
(producedDataFile: File, consumedDataFile: File): Unit
-
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
This is a torture test that runs against an existing broker. Here is how it works:
It produces a series of specially formatted messages to one or more partitions. Each message it produces it logs out to a text file. The messages have a limited set of keys, so there is duplication in the key space.
The broker will clean its log as the test runs.
When the specified number of messages have been produced we create a consumer and consume all the messages in the topic and write that out to another text file.
Using a stable unix sort we sort both the producer log of what was sent and the consumer log of what was retrieved by the message key. Then we compare the final message in both logs for each key. If this final message is not the same for all keys we print an error and exit with exit code 1, otherwise we print the size reduction and exit with exit code 0.