Example #1
0
 def __init__(self, ID):
     IDable.__init__(self, ID)
     self.logger = logging.getLogger(self.__class__.__name__)
     self.owners = set([])  #owners
     self.blockQueue = []  #blocked queue: [thread]
     self.blockedThreads = {}  #block thread info: {thread : (state, event)}
     self.state = Lockable.UNLOCKED
Example #2
0
 def __init__(self, ID):
     IDable.__init__(self, ID)
     self.logger = logging.getLogger(self.__class__.__name__)
     self.owners = set([])               #owners
     self.blockQueue = []                #blocked queue: [thread]
     self.blockedThreads = {}            #block thread info: {thread : (state, event)}
     self.state = Lockable.UNLOCKED
Example #3
0
 def __init__(self, ID, zoneID, actions, config):
     IDable.__init__(self, 'txn%s' % ID)
     self.zoneID = zoneID
     self.actions = actions
     self.gids = set([])
     self.config = config
     for action in actions:
         self.gids.add(action.itemID.gid)
Example #4
0
 def __init__(self, repID, gid, size):
     IDable.__init__(self, 'R%s/G%s' % (repID, gid))
     self.gid = gid
     self.items = []
     for i in range(size):
         itemid = ItemID(gid, i)
         item = Item(repID, itemid)
         self.items.append(item)
Example #5
0
 def __init__(self, ID):
     IDable.__init__(self, ID)
     self.events = []
     self.timeline = []
     self.attrs = []
     #register self to profiler
     self.parent = None
     self.children = set([])
Example #6
0
 def __init__(self, ID):
     IDable.__init__(self, ID)
     self.events = []
     self.timeline = []
     self.attrs = []
     #register self to profiler
     self.parent = None
     self.children = set([])
Example #7
0
 def __init__(self, repID, gid, size):
     IDable.__init__(self, 'R%s/G%s'%(repID, gid))
     self.gid = gid
     self.items = []
     for i in range(size):
         itemid = ItemID(gid, i)
         item = Item(repID, itemid)
         self.items.append(item)
Example #8
0
 def __init__(self, ID, zoneID, actions, config):
     IDable.__init__(self, 'txn%s'%ID)
     self.zoneID = zoneID
     self.actions = actions
     self.gids = set([])
     self.config = config
     for action in actions:
         self.gids.add(action.itemID.gid)
Example #9
0
 def __init__(self, cnode):
     IDable.__init__(self, '%s/lnr' % cnode.ID)
     Thread.__init__(self)
     MsgXeiver.__init__(self, cnode.ID)
     self.logger = logging.getLogger(self.__class__.__name__)
     self.cnode = cnode
     self.shouldClose = False
     self.learned = {}  #{eid : {cnodeID : batch}}
     self.votes = {}  #{(eid, cnodeID) : votes}
Example #10
0
 def __init__(self, cnode):
     IDable.__init__(self, '%s/acc' % cnode.ID)
     Thread.__init__(self)
     MsgXeiver.__init__(self, cnode.ID)
     self.logger = logging.getLogger(self.__class__.__name__)
     self.cnode = cnode
     self.accepted = {}  #{(eid, cnodeID) : batch}
     self.timeout = cnode.configs.get('tide.acceptor.epoch.timeout', 500)
     self.shouldClose = False
Example #11
0
 def __init__(self, system, ID, configs):
     IDable.__init__(self, 'zone%s/cn' % ID)
     Thread.__init__(self)
     RTI.__init__(self, self.ID)
     self.logger = logging.getLogger(self.__class__.__name__)
     self.system = system
     self.snodes = []
     self.configs = configs
     self.groupLocations = {}
     self.txnsRunning = set([])
     self.shouldClose = False
     self.closeEvent = SimEvent()
     #paxos entities
     self.paxosPRunner = None
     self.paxosAcceptor = None
     self.paxosLearner = None
Example #12
0
 def __init__(self, system, ID, configs):
     IDable.__init__(self, 'zone%s/cn'%ID)
     Thread.__init__(self)
     RTI.__init__(self, self.ID)
     self.logger = logging.getLogger(self.__class__.__name__)
     self.system = system
     self.snodes = []
     self.configs = configs
     self.groupLocations = {}
     self.txnsRunning = set([])
     self.shouldClose = False
     self.closeEvent = SimEvent()
     #paxos entities
     self.paxosPRunner = None
     self.paxosAcceptor = None
     self.paxosLearner = None
Example #13
0
 def __init__(self, cnode, ID, configs):
     IDable.__init__(self, '%s/sn%s' % (cnode.ID.split('/')[0], ID))
     Thread.__init__(self)
     RTI.__init__(self, self.ID)
     self.logger = logging.getLogger(self.__class__.__name__)
     self.system = cnode.system
     self.configs = configs
     self.cnode = cnode
     self.maxNumTxns = configs.get('max.num.txns.per.storage.node', 1024)
     self.pool = Resource(self.maxNumTxns, name='pool', unitName='thread')
     self.groups = {}  #{gid : group}
     self.newTxns = []
     self.txnsRunning = set([])
     self.shouldClose = False
     self.monitor = Profiler.getMonitor(self.ID)
     self.M_POOL_WAIT_PREFIX = '%s.pool.wait' % self.ID
     self.M_TXN_RUN_PREFIX = '%s.txn.run' % self.ID
     self.M_NUM_TXNS_RUN_KEY = '%s.num.txns' % self.ID
     self.runningThreads = set([])
     self.closeEvent = SimEvent()
     self.newTxnEvent = SimEvent()
Example #14
0
 def __init__(self, cnode, ID, configs):
     IDable.__init__(self, '%s/sn%s'%(cnode.ID.split('/')[0], ID))
     Thread.__init__(self)
     RTI.__init__(self, self.ID)
     self.logger = logging.getLogger(self.__class__.__name__)
     self.system = cnode.system
     self.configs = configs
     self.cnode = cnode
     self.maxNumTxns = configs.get('max.num.txns.per.storage.node', 1024)
     self.pool = Resource(self.maxNumTxns, name='pool', unitName='thread')
     self.groups = {}    #{gid : group}
     self.newTxns = []
     self.txnsRunning = set([])
     self.shouldClose = False
     self.monitor = Profiler.getMonitor(self.ID)
     self.M_POOL_WAIT_PREFIX = '%s.pool.wait' %self.ID
     self.M_TXN_RUN_PREFIX = '%s.txn.run' %self.ID
     self.M_NUM_TXNS_RUN_KEY = '%s.num.txns'%self.ID
     self.runningThreads = set([])
     self.closeEvent = SimEvent()
     self.newTxnEvent = SimEvent()
Example #15
0
 def __init__(self, ID, zoneID, gid):
     IDable.__init__(self, 'txn%s' % ID)
     self.zoneID = zoneID
     self.gids = set([gid])
Example #16
0
 def __init__(self, ID):
     IDable.__init__(self, ID)
     BThread.__init__(self)
     self.logger = logging.getLogger(self.__class__.__name__)
     self.monitor = Profiler.getMonitor(self.ID)
Example #17
0
 def __init__(self, ID, zoneID, gid):
     IDable.__init__(self, 'txn%s'%ID)
     self.zoneID = zoneID
     self.gids = set([gid])
Example #18
0
 def __init__(self, gid, iid):
     IDable.__init__(self, 'G%s/I%s' % (gid, iid))
     self.gid = gid
     self.iid = iid
Example #19
0
 def __init__(self, repID, gconfigs):
     IDable.__init__(self, 'D%s'%repID)
     self.groups = {}
     for gid, size in gconfigs.iteritems():
         self.groups[gid] = Group(repID, gid, size)
Example #20
0
 def __init__(self, gid, iid):
     IDable.__init__(self, 'G%s/I%s'%(gid, iid))
     self.gid = gid
     self.iid = iid
Example #21
0
 def __init__(self, repID, gconfigs):
     IDable.__init__(self, 'D%s' % repID)
     self.groups = {}
     for gid, size in gconfigs.iteritems():
         self.groups[gid] = Group(repID, gid, size)
Example #22
0
 def __init__(self, ID):
     IDable.__init__(self, ID)
     BThread.__init__(self)
     self.logger = logging.getLogger(self.__class__.__name__)
     self.monitor = Profiler.getMonitor(self.ID)
Example #23
0
 def __init__(self, runner, proxy):
     IDable.__init__(self, '%s--%s'%(runner.ID, proxy.ID))
Example #24
0
 def __init__(self, ID):
     IDable.__init__(self, ID)
     self.batch = []