Module ESMergeSVManager :: Class ESMergeSVManager
[show private | hide private]
[frames | no frames]

Class ESMergeSVManager

ESFileTypes --+    
              |    
    SQLUtil --+    
              |    
         ESInit --+
                  |
                 ESMergeSVManager


ESMergeSVManager is in charge of merging multiple svNames into new graphid
Method Summary
  __init__(self, db, dbType, logFile)
Initialize database pointer, cursor, db type (MySQL or SQLite).
  merge(self, svList)
Main routine to merge and update all tables using given data version list:
  setGrade(self, grade)
Set grade to be used
  setTime(self, timeS)
Set time stamp to be used
  updateKeyFile(self, newgid, gidList)
Update KeyFile table
  updateLocation(self, newgid, gidList)
Update Location table
  updateVersion(self, svList)
Update Version and GraphPath tables
    Inherited from ESFileTypes
integer allow(self, type)
Check if given file type is allowed in EventStore.
integer allowToInject(self, type)
Check if given file type is allowed for injection in EventStore.
list esFileTypes(self)
Return a list of known file types supported in EventStore.
list esInjectionFileTypes(self)
Return a list of known file types supported in EventStore which allowed for injection.
integer isDatType(self, iFileType)
Check if given file type is data file.
integer isKeyType(self, iFileType)
Check if given file type is index file.
integer isLocType(self, iFileType)
Check if given file type is location file.
    Inherited from SQLUtil
  close(self)
Close cursor and db connector
  commit(self)
Explicit commit
  createTables(self, table)
Create table(s) in EventStore database.
  dropTable(self, table)
Drop table in EventStore
  endTxn(self, msg)
Update EventStore db log and invoke COMMIT transaction.
  fetchAll(self, query)
Update a EventStore log and retrieve all rows for given query
  fetchOne(self, query)
Update a EventStore log and retrieve one row for given query
  findFileForRun(self, run, time)
Find location of the data file holding given run
  getAllParents(self, childName)
Get all parents for given child name
  getIsolationLevel(self)
Get isolation level of SQLite DB
  getLastId(self, table)
Get last autoincemented id for given table
  getTableNames(self)
Return a list of table names in EventStore DB
  getTables(self)
Return list of tables from DB
  getTableSchema(self, tableName)
Return EventStore table schema
  idx(self, name)
  lockTables(self, tableName)
Lock tables in EventStore.
  makeESQuery(self, timeStamp)
Return the following dictionary: dict[time]=[(grade,minR,maxR,svName)]
  printDBContent(self, table)
Print content of given table in EventStore DB
  printESInfo(self, timeStamp)
Dump EventStore DB content in user readable format.
  printRuns(self, minR, maxR)
Print list of runs for given run range
  rollback(self)
Rollback transaction
  setCommitFlag(self, flag)
Set flag which will inform underlying DB what to do with transaction commits.
  setIsolationLevel(self, level)
Set isolation level for internal DB (necessary to perform SQLite transactions.
  setVerboseLevel(self, verbose)
Set verbose level, 0 low, 1 is high.
  showDepend(self, childName)
Print all dependencies for given data version name.
  startTxn(self, msg)
Update EventStore db log and invoke BEGIN transaction.
  unlockTables(self)
Unlock all locked tables in EventStore
  updateDBAndLog(self, iQuery, cQuery)
  updateLog(self, iQuery, cQuery)
Update EventStore log and execute given query.
  writeToLog(self, msg)
Update EventStore db log with time/pid/msg signature

Method Details

__init__(self, db, dbType, logFile)
(Constructor)

Initialize database pointer, cursor, db type (MySQL or SQLite). Retrieve information about table names from underlying DB.
Overrides:
es_init.ESInit.__init__ (inherited documentation)

merge(self, svList)

Main routine to merge and update all tables using given data version list:
  • resolve their svId's
  • add entry into GraphPath newGraphId->svid1, newGraphId->svid2, etc.
  • add entry into Version with all run-ranges from gid1, gid2, etc.
  • copy entries from KeyFile with gid1->newGraphId, gid2->newGraphId
  • copy entries from Location with gid1->newGraphId, gid2->newGraphId

setGrade(self, grade)

Set grade to be used

setTime(self, timeS)

Set time stamp to be used

updateKeyFile(self, newgid, gidList)

Update KeyFile table

updateLocation(self, newgid, gidList)

Update Location table

updateVersion(self, svList)

Update Version and GraphPath tables

Generated by Epydoc 2.1 on Tue Jan 24 10:46:01 2006 http://epydoc.sf.net