(self)
Start thrift token master server and block waiting until it's done.
Start thrift token master server and block waiting until it's done.
Start thrift token master server and block waiting until it s done .
def run_master_server(self):
        """Start thrift token master server and block waiting until it's done.
        """
        assert self._master_handler
        processor = Processor(self._master_handler)
        if self._port:
            transport = TSocket.TServerSocket(port=self._port)
        else:
            transport = TSocket.TServerSocket()
            self._port = transport.port
        tfactory = TTransport.TBufferedTransportFactory()
        pfactory = TBinaryProtocol.TBinaryProtocolFactory()
        server = TServer.TThreadedServer(processor, transport, tfactory,
                                         pfactory)

        LOG.info('Starting server on host:port %s:%d', self._hostname,
                 self._port)
        server.serve()
        LOG.info('server is done')
def run_master_server ( self ) : assert self . _master_handler processor = Processor ( self . _master_handler ) if self . _port : transport = TSocket . TServerSocket ( port = self . _port ) else : transport = TSocket . TServerSocket ( ) self . _port = transport . port tfactory = TTransport . TBufferedTransportFactory ( ) pfactory = TBinaryProtocol . TBinaryProtocolFactory ( ) server = TServer . TThreadedServer ( processor , transport , tfactory , pfactory ) LOG . info ( 'Starting server on host:port %s:%d' , self . _hostname , self . _port ) server . serve ( ) LOG . info ( 'server is done' )