Commit c791f6d1 authored by Aurel's avatar Aurel

comsetic changes


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@706 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent de2dfaa0
...@@ -194,6 +194,5 @@ class Application(object): ...@@ -194,6 +194,5 @@ class Application(object):
p = protocot.protocolError('invalid partition table offset') p = protocot.protocolError('invalid partition table offset')
conn.notify(p) conn.notify(p)
return return
print "sending packet", len(row_list)
p = protocol.answerPartitionList(self.ptid, row_list) p = protocol.answerPartitionList(self.ptid, row_list)
conn.notify(p, msg_id) conn.notify(p, msg_id)
...@@ -125,6 +125,7 @@ class MasterEventHandler(BaseEventHandler): ...@@ -125,6 +125,7 @@ class MasterEventHandler(BaseEventHandler):
# monitoring phase # monitoring phase
self.app.monitoring_handler.dispatch(conn, packet) self.app.monitoring_handler.dispatch(conn, packet)
class MasterBaseEventHandler(BaseEventHandler): class MasterBaseEventHandler(BaseEventHandler):
""" This is the base class for connection to primary master node""" """ This is the base class for connection to primary master node"""
...@@ -132,7 +133,6 @@ class MasterBaseEventHandler(BaseEventHandler): ...@@ -132,7 +133,6 @@ class MasterBaseEventHandler(BaseEventHandler):
"""Called when a connection is accepted.""" """Called when a connection is accepted."""
raise UnexpectedPacketError raise UnexpectedPacketError
def connectionCompleted(self, conn): def connectionCompleted(self, conn):
app = self.app app = self.app
if app.trying_master_node is None: if app.trying_master_node is None:
...@@ -143,7 +143,6 @@ class MasterBaseEventHandler(BaseEventHandler): ...@@ -143,7 +143,6 @@ class MasterBaseEventHandler(BaseEventHandler):
conn.ask(protocol.askPrimaryMaster()) conn.ask(protocol.askPrimaryMaster())
EventHandler.connectionCompleted(self, conn) EventHandler.connectionCompleted(self, conn)
def connectionFailed(self, conn): def connectionFailed(self, conn):
app = self.app app = self.app
...@@ -163,7 +162,6 @@ class MasterBaseEventHandler(BaseEventHandler): ...@@ -163,7 +162,6 @@ class MasterBaseEventHandler(BaseEventHandler):
EventHandler.connectionFailed(self, conn) EventHandler.connectionFailed(self, conn)
def timeoutExpired(self, conn): def timeoutExpired(self, conn):
app = self.app app = self.app
...@@ -178,7 +176,6 @@ class MasterBaseEventHandler(BaseEventHandler): ...@@ -178,7 +176,6 @@ class MasterBaseEventHandler(BaseEventHandler):
EventHandler.timeoutExpired(self, conn) EventHandler.timeoutExpired(self, conn)
def connectionClosed(self, conn): def connectionClosed(self, conn):
app = self.app app = self.app
...@@ -208,10 +205,8 @@ class MasterBaseEventHandler(BaseEventHandler): ...@@ -208,10 +205,8 @@ class MasterBaseEventHandler(BaseEventHandler):
EventHandler.peerBroken(self, conn) EventHandler.peerBroken(self, conn)
@decorators.identification_required @decorators.identification_required
def handleNotifyNodeInformation(self, conn, packet, node_list): def handleNotifyNodeInformation(self, conn, packet, node_list):
logging.info("handleNotifyNodeInformation")
uuid = conn.getUUID() uuid = conn.getUUID()
app = self.app app = self.app
nm = app.nm nm = app.nm
...@@ -303,10 +298,10 @@ class MasterRequestEventHandler(MasterBaseEventHandler): ...@@ -303,10 +298,10 @@ class MasterRequestEventHandler(MasterBaseEventHandler):
p = protocol.noError(msg) p = protocol.noError(msg)
client_conn.notify(p, kw['msg_id']) client_conn.notify(p, kw['msg_id'])
class MasterBootstrapEventHandler(MasterBaseEventHandler): class MasterBootstrapEventHandler(MasterBaseEventHandler):
"""This class manage the bootstrap part to the primary master node""" """This class manage the bootstrap part to the primary master node"""
def handleNotReady(self, conn, packet, message): def handleNotReady(self, conn, packet, message):
app = self.app app = self.app
if app.trying_master_node is not None: if app.trying_master_node is not None:
...@@ -418,7 +413,6 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler): ...@@ -418,7 +413,6 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler):
@decorators.identification_required @decorators.identification_required
def handleNotifyPartitionChanges(self, conn, packet, ptid, cell_list): def handleNotifyPartitionChanges(self, conn, packet, ptid, cell_list):
logging.warning("handleNotifyPartitionChanges")
app = self.app app = self.app
nm = app.nm nm = app.nm
pt = app.pt pt = app.pt
...@@ -447,7 +441,6 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler): ...@@ -447,7 +441,6 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler):
@decorators.identification_required @decorators.identification_required
def handleSendPartitionTable(self, conn, packet, ptid, row_list): def handleSendPartitionTable(self, conn, packet, ptid, row_list):
logging.warning("handleSendPartitionTable")
uuid = conn.getUUID() uuid = conn.getUUID()
app = self.app app = self.app
nm = app.nm nm = app.nm
...@@ -470,6 +463,3 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler): ...@@ -470,6 +463,3 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler):
pt.setCell(offset, node, state) pt.setCell(offset, node, state)
pt.log() pt.log()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment