Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framed transport #51

Open
PlayerOne opened this issue Dec 22, 2010 · 0 comments
Open

Framed transport #51

PlayerOne opened this issue Dec 22, 2010 · 0 comments

Comments

@PlayerOne
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant