Skip to content

Framed transport #51

@PlayerOne

Description

@PlayerOne

We are currently using framed transport for thrift. Pandra has support for this, but it would be nice to make this easily configurable. To be able to configure the transport type we made the following adjustments:

in file config.php:

define('THRIFT_TRANSPORT_BUFFERED', 1);
define('THRIFT_TRANSPORT_FRAMED', 2);
define('THRIFT_TRANSPORT', THRIFT_TRANSPORT_FRAMED);

in file lib/Core.class.php, in both functions connect() and connectSeededKeyspace():

if (THRIFT_TRANSPORT == THRIFT_TRANSPORT_BUFFERED) {
    $transport = new TBufferedTransport(new TSocket($host, $port, PERSIST_CONNECTIONS, 'PandraCore::registerError'), 1024, 1024);
} else {
    $transport = new TFramedTransport(new TSocket($host, $port, PERSIST_CONNECTIONS, 'PandraCore::registerError'), 1024, 1024);
}

And finally change the definition of the function _authOpen in file lib/Core.class.php to:

static private function _authOpen(TTransport &$transport, $keySpace)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions