rice.pastry.wire.testing
Class WireFileProcessor
java.lang.Object
rice.pastry.wire.testing.WireFileProcessor
- public class WireFileProcessor
- extends java.lang.Object
This file interprets all of the files generated by wireDebug()
calls throughout the wire package. It is used to test wether
100% of queued messages are received by some node.
There are 2 phases. The first parses all the messages into a
MessageDigest, and arranges them by node, then Enqueue, Sent,
Received, Dropped (not yet implemented)
The second phase analyzes those tables and makes sure that all
sent messages are received.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WNH_PREFIX
public static final java.lang.String WNH_PREFIX
- See Also:
- Constant Field Values
DM_PREFIX
public static final java.lang.String DM_PREFIX
- See Also:
- Constant Field Values
PREFIX_LENGTH
public static final int PREFIX_LENGTH
- See Also:
- Constant Field Values
enquePrefix
public static final java.lang.String enquePrefix
- See Also:
- Constant Field Values
sentPrefix
public static final java.lang.String sentPrefix
- See Also:
- Constant Field Values
receivedPrefix
public static final java.lang.String receivedPrefix
- See Also:
- Constant Field Values
dropPrefix
public static final java.lang.String dropPrefix
- See Also:
- Constant Field Values
TYPE_ENQ
public static final int TYPE_ENQ
- See Also:
- Constant Field Values
TYPE_SEN
public static final int TYPE_SEN
- See Also:
- Constant Field Values
TYPE_REC
public static final int TYPE_REC
- See Also:
- Constant Field Values
TYPE_DRP
public static final int TYPE_DRP
- See Also:
- Constant Field Values
ID_LENGTH
public static final int ID_LENGTH
- See Also:
- Constant Field Values
NUM_TABLES
public static final int NUM_TABLES
- See Also:
- Constant Field Values
enqueued
public java.util.Hashtable enqueued
- String nodeid -> HashTable of MessageDigest -> ObjPair
sent
public java.util.Hashtable sent
received
public java.util.Hashtable received
dropped
public java.util.Hashtable dropped
tables
public java.util.Hashtable[] tables
WireFileProcessor
public WireFileProcessor()
processFiles
public void processFiles()
throws java.io.IOException
- Throws:
java.io.IOException
processFile
public void processFile(java.lang.String fname)
throws java.io.IOException
- Throws:
java.io.IOException
processFiles
public void processFiles(java.io.File workingDirectory)
throws java.io.IOException
- Throws:
java.io.IOException
processWNHFile
public void processWNHFile(java.io.File f,
boolean log)
throws java.io.IOException
- Throws:
java.io.IOException
processDMFile
public void processDMFile(java.io.File f,
boolean log)
throws java.io.IOException
- Throws:
java.io.IOException
addToTable
public int addToTable(int type,
MessageDigest msg)
getType
public static int getType(java.lang.String prefix)
getType
public static java.lang.String getType(int type)
getReader
public static java.io.BufferedReader getReader(java.io.File f)
throws java.io.IOException
- Throws:
java.io.IOException
countItems
public WireFileProcessor.Pair countItems(java.util.Hashtable t)
countItems2
public WireFileProcessor.Pair countItems2(java.util.Hashtable set)
printTableTotals
public void printTableTotals()
compareEnqSnd
public void compareEnqSnd()
compareEnqRec
public void compareEnqRec()
compareTables
public void compareTables(java.util.Hashtable ta,
java.util.Hashtable tb)
compareSets
public int compareSets(java.util.Hashtable sa,
java.util.Hashtable sb)
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception