Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-1732

DumpLogSegments tool fails when path has a '.'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.8.1.1
    • 0.8.2.0
    • tools
    • None

    Description

      Using DumpLogSegments in a directory that has a '.' that isn't part of the file extension causes an exception:

      16:48 $ time /Users/ewencp/kafka.git/bin/kafka-run-class.sh kafka.tools.DumpLogSegments  --file /Users/ewencp/kafka.git/system_test/replication_testsuite/testcase_1/logs/broker-3/kafka_server_3_logs/test_1-1/00000000000000016895.index --verify-index-only
      Dumping /Users/ewencp/kafka.git/system_test/replication_testsuite/testcase_1/logs/broker-3/kafka_server_3_logs/test_1-1/00000000000000016895.index
      Exception in thread "main" java.io.FileNotFoundException: /Users/ewencp/kafka.log (No such file or directory)
      	at java.io.FileInputStream.open(Native Method)
      	at java.io.FileInputStream.<init>(FileInputStream.java:146)
      	at kafka.utils.Utils$.openChannel(Utils.scala:162)
      	at kafka.log.FileMessageSet.<init>(FileMessageSet.scala:74)
      	at kafka.tools.DumpLogSegments$.kafka$tools$DumpLogSegments$$dumpIndex(DumpLogSegments.scala:109)
      	at kafka.tools.DumpLogSegments$$anonfun$main$1.apply(DumpLogSegments.scala:80)
      	at kafka.tools.DumpLogSegments$$anonfun$main$1.apply(DumpLogSegments.scala:73)
      	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
      	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:105)
      	at kafka.tools.DumpLogSegments$.main(DumpLogSegments.scala:73)
      	at kafka.tools.DumpLogSegments.main(DumpLogSegments.scala)
      

      Attachments

        1. KAFKA-1732.patch
          1 kB
          Ewen Cheslack-Postava

        Activity

          People

            ewencp Ewen Cheslack-Postava
            ewencp Ewen Cheslack-Postava
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: