Skip to content

Commit

Permalink
use TBinaryProtocolAccelerated for better performance when so extensi…
Browse files Browse the repository at this point in the history
…on installed (#3)
  • Loading branch information
starfalling committed Jun 8, 2020
1 parent 40b9161 commit f2bedf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Service/AliHbaseThriftService.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


use Luffy\AliHbaseThrift\Exception\MethodNotFoundException;
use Thrift\Protocol\TBinaryProtocol;
use Thrift\Protocol\TBinaryProtocolAccelerated;
use Thrift\Transport\TBufferedTransport;
use Thrift\Transport\THttpClient;
use Luffy\Thrift2Hbase\THBaseServiceClient;
Expand Down Expand Up @@ -39,7 +39,7 @@ public function __construct($host, $port, $key_id, $signature)
$socket = new THttpClient($host, $port);
$socket->addHeaders($headers);
$transport = new TBufferedTransport($socket);
$protocol = new TBinaryProtocol($transport);
$protocol = new TBinaryProtocolAccelerated($transport);
$this->client = new THBaseServiceClient($protocol);
}

Expand Down Expand Up @@ -327,4 +327,4 @@ public function __call($name, $arguments)
throw new MethodNotFoundException("method {$name} not found in ali hbase");
}
}
}
}

0 comments on commit f2bedf9

Please sign in to comment.