object
TestLogCleaning extends AnyRef
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
consumeMessages(zkUrl: String, topics: Array[String]): File
-
def
dumpLog(dir: File): Unit
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
externalSort(file: File): BufferedReader
-
def
finalize(): Unit
-
final
def
getClass(): java.lang.Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
lineCount(file: File): Int
-
def
main(args: Array[String]): Unit
-
def
makeConsumer(zkUrl: String, topics: Array[String]): ZookeeperConsumerConnector
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
def
validateOutput(producedDataFile: File, consumedDataFile: File): Unit
-
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
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.