#include <talker.h>
Collaboration diagram for Talker:
Public Methods | |
Talker (const char *rippername, const char *tempdir, WebLinkGraph *ripperweb, GraphBuilder *rippergb, bool pvm_is_master, int pvm_numtasks) throw (exception) | |
~Talker () | |
void | Talk () throw (exception) |
Reads and executes commands through a couple of pipes. More... | |
void | PropagateLeafCounts () throw (invalid_argument) |
Sends the LeafNode's occupation counts to other processes and clears the counts. More... | |
void | PrintStatistics (ostream &o) |
prints out some memory usage statistics. More... | |
void | PrintStatisticsGraph (ostream &o) |
prints out some link graph statistics. More... | |
bool | BuildTags (ifstream &g) |
reads a file containing space separated urls and tags those which are found in the web link graph. More... | |
bool | LoadLeaves (ifstream &g) |
int | GetToken (char *command, ostream &out, char *message, int n,...) |
In interactive mode, reads the next token from the command buffer, and returns the token's id number if recognized. More... | |
char * | GetTokenVar (char *command, ostream &out, char *message) |
In interactive mode, reads the next token from the command buffer, and returns the token's string value for processing. More... | |
bool | ProcessCommand (char *command, ostream &out) |
void | SetupFIFOs () throw (exception) |
Creates input/output FIFOs if they don't exist Also deletes nodes.equiv if it exists. More... | |
void | RemoveFIFOs () |
Unlinks the FIFO files. More... | |
Private Attributes | |
ostringstream | inputfifo |
ostringstream | outputfifo |
ostringstream | nodequiv |
const char * | name |
const char * | tempdir |
WebLinkGraph * | web |
GraphBuilder * | gb |
gsl_rng * | r |
PageRankSampler * | prsampler |
DateBiasedPageRankSampler * | dbsampler |
TruncatedKleinbergSampler * | tksampler |
WebSampler * | defaultsampler |
PVMInterface * | pvminterface |
LeafNodePtrList * | leaflist |
Definition at line 47 of file talker.h.
|
Definition at line 174 of file talker.cc. References hubs, LeafNodePtrList, and NULL. |
|
Definition at line 242 of file talker.cc. References dbsampler, leaflist, prsampler, pvminterface, and RemoveFIFOs(). |
|
reads a file containing space separated urls and tags those which are found in the web link graph.
Definition at line 897 of file talker.cc. References GraphBuilder::FindWebNode(), gb, and WebNode::SetTag(). Referenced by ProcessCommand(). |
|
In interactive mode, reads the next token from the command buffer, and returns the token's id number if recognized.
Definition at line 921 of file talker.cc. Referenced by ProcessCommand(). |
|
In interactive mode, reads the next token from the command buffer, and returns the token's string value for processing.
Definition at line 944 of file talker.cc. References NULL. Referenced by ProcessCommand(). |
|
Definition at line 963 of file talker.cc. References GraphBuilder::AddLeaf(), EQUIV_SIZE, GraphBuilder::FindLeafNodeKey(), GraphBuilder::FindWebNode(), gb, WebNode::ID(), leaflist, nodequiv, IDPair::one, LeafNode::SetDate(), GraphBuilder::SetupLeafTable(), IDPair::two, uint16, uint32, and GraphBuilder::UpdateLeafLinks(). Referenced by ProcessCommand(). |
|
prints out some memory usage statistics.
Definition at line 881 of file talker.cc. References gb, leaflist, num_docs_processed, and GraphBuilder::StatisticsMem(). Referenced by ProcessCommand(). |
|
prints out some link graph statistics.
Definition at line 889 of file talker.cc. References gb, and GraphBuilder::StatisticsGraph(). Referenced by ProcessCommand(). |
|
|
Sends the LeafNode's occupation counts to other processes and clears the counts. This procedure is interruptible by pending messages. Exception caveat: Because we want to cast the structure LeafCountsStruct as a consecutive pair of unsigned integers, we throw an invalid_argument exception in case sizeof(unsigned int) != sizeof(uint32) for this compiler. Not very portable, but less work :-) Definition at line 403 of file talker.cc. References greater_LeafCountsStruct(), LeafCountsStruct::id, MAXLEAFMESSAGE_SIZE, LeafCountsStruct::occupation_count, and uint32. Referenced by ProcessCommand(). |
|
Unlinks the FIFO files.
Definition at line 281 of file talker.cc. References inputfifo, and outputfifo. Referenced by ~Talker(). |
|
Creates input/output FIFOs if they don't exist Also deletes nodes.equiv if it exists.
|
|
Reads and executes commands through a couple of pipes. This function executes interactive commands. Input is read from /tmp/ripper.input and resposes are written to /tmp/ripper.output Definition at line 292 of file talker.cc. Referenced by main(). |
|
Definition at line 84 of file talker.h. Referenced by ProcessCommand(), and ~Talker(). |
|
Definition at line 86 of file talker.h. Referenced by ProcessCommand(). |
|
Definition at line 79 of file talker.h. Referenced by BuildTags(), LoadLeaves(), PrintStatistics(), PrintStatisticsGraph(), and ProcessCommand(). |
|
Definition at line 73 of file talker.h. Referenced by RemoveFIFOs(). |
|
Definition at line 90 of file talker.h. Referenced by LoadLeaves(), PrintStatistics(), ProcessCommand(), and ~Talker(). |
|
Definition at line 76 of file talker.h. Referenced by ProcessCommand(). |
|
Definition at line 75 of file talker.h. Referenced by LoadLeaves(). |
|
Definition at line 74 of file talker.h. Referenced by RemoveFIFOs(). |
|
Definition at line 83 of file talker.h. Referenced by ProcessCommand(), and ~Talker(). |
|
Definition at line 88 of file talker.h. Referenced by ProcessCommand(), and ~Talker(). |
|
Definition at line 81 of file talker.h. Referenced by ProcessCommand(). |
|
Definition at line 77 of file talker.h. Referenced by ProcessCommand(). |
|
Definition at line 85 of file talker.h. Referenced by ProcessCommand(). |
|
Definition at line 78 of file talker.h. Referenced by ProcessCommand(). |