-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff7e885
commit 670a82c
Showing
30 changed files
with
2,289 additions
and
1,347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/net/openhft/chronicle/queue/DumpQueueMain.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,33 @@ | |||
package net.openhft.chronicle.queue; | |||
|
|||
import net.openhft.chronicle.bytes.MappedBytes; | |||
import net.openhft.chronicle.queue.impl.single.SingleChronicleQueue; | |||
import net.openhft.chronicle.wire.Wires; | |||
|
|||
import java.io.File; | |||
import java.io.IOException; | |||
|
|||
/** | |||
* Created by Peter on 07/03/2016. | |||
*/ | |||
public class DumpQueueMain { | |||
public static void main(String[] args) { | |||
dump(args[0]); | |||
} | |||
|
|||
public static void dump(String dir) { | |||
File[] files = new File(dir).listFiles(); | |||
if (files == null) { | |||
System.err.println("Directory not found " + dir); | |||
} | |||
for (File file : files) { | |||
if (file.getName().endsWith(SingleChronicleQueue.SUFFIX)) { | |||
try (MappedBytes bytes = MappedBytes.mappedBytes(file, 4 << 20)) { | |||
System.out.println(Wires.fromSizePrefixedBlobs(bytes)); | |||
} catch (IOException ioe) { | |||
System.err.println("Failed to read " + file + " " + ioe); | |||
} | |||
} | |||
} | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.