- Verify that mapr-client is installed on the node. The mapr-client package must be installed on each node that builds an application. The libhbase header files are in this directory:
- Verify that both the libMapRClient library and libjvm shared libraries are in the application’s library search path. The libMapRClient library is located in this directory:
When building applications that use the MapR version of libhbase, run this command:
gcc -o <application_name> <source_file> -I/opt/mapr/include/hbase -L/opt/mapr/lib/ -lMapRClient -L/usr/lib/jvm/java-7-sun/jre/lib/amd64/server -ljvm
For example, the following command builds the
hello_hbase application with the
hello_hbase.c source code:
gcc -o hello_hbase hello_hbase.c -I/opt/mapr/include/hbase -L/opt/mapr/lib/ -lMapRClient -L/usr/lib/jvm/java-7-sun/jre/lib/amd64/server -ljvm
The libMapRClient library has dependencies on libjvm, though a JVM is not instantiated. In general, the libjvm library is located within the JDK/JRE installation directory.
Before launching an application, set this value for the environment variable
If the client is on Windows, append the following directories to the
PATH environment variable:
If the application uses the
hb_connection_create_as_user API for impersonation, set the
MAPR_IMPERSONATION_ENABLED environment variable to
You can now launch the application.