def writeToDisk(self): # THIS IS A HACK!!! WE NEED BETTER merge synronization busyLoopCounter = 0 while not (self.documentQueue.empty() and self.postingQueue.empty()): time.sleep(30) if busyLoopCounter % 5 == 0: print >> sys.stderr, "WriteToDisk waiting on queues..." busyLoopCounter += 1 print >> sys.stderr, "Writing to disk..." path = self.makePartitionName("LEX") pickle_tools.pickle_dump_attrs(self,path,"externalPartitionCount","lexicon","termCount") for partition in self.partitions: partition.writeToDisk()
def writeToDisk(self): if self.path: print >> sys.stderr, "Pickling MMP to %s" % self.path pickle_tools.pickle_dump_attrs(self,self.path,"termInstanceLimit","termIdHash","indexKey")
def writeToDisk(self): metadataPath = self.path + self.metadataFileSuffix pickle_tools.pickle_dump_attrs(self,metadataPath,"termInstanceLimit","termIdHash","indexKey")
def saveContext(self): pickle_tools.pickle_dump_attrs(self, self.path, "nextTermId", "termWords")