Database Reference
In-Depth Information
ResultScanner scanner = table.getScanner(scan);
System.out.println("Scan Results - ");
for (Result result2 : scanner) {
System.out.println("row[" + Bytes.toString(result2.getRow())
+ "]: " + result2);
}
}
}
The Thrift client
The Apache Thrift software framework is used for cross-language services
development. It is bundled with a code generation engine to build services that
work seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, JavaScript,
Node.js, Smalltalk, OCaml, Delphi, and other languages.
Get started with the Apache Thrift installation and working example
at https://thrift.apache.org/ .
After the Thrift compiler is installed, create a thrift ile. This ile is an interface
deinition ( ID ) made up of Thrift types and services. The services deined in the ID
ile are implemented by the server and are called by any clients. The Thrift compiler
is used to convert the thrift File into source code which is used by the different
client libraries and the server.
Getting started
For a Thrift-based client to make a connection to a HBase cluster, irst start the
Thrift server on the HBase Master as follows:
[root@localhost bin]# hbase thrift
usage: Thrift [-b <arg>] [-c] [-f] [-h] [-hsha | -nonblocking |
-threadedselector | -threadpool] [--infoport <arg>] [-k <arg>] [-m <arg>]
[-p <arg>] [-q <arg>] [-w <arg>]
-b,--bind <arg> Address to bind the Thrift server to.
[default:
0.0.0.0]
 
Search WWH ::




Custom Search