In these instructions, we will be working in an example directory called ~/stage/sqlmr-sdk. The bundle also contains user defined function API and examples.
- Obtain the C SDK bundle, sqlmr-sdk-c.tar.gz.
-
Unpack the C SDK bundle.
cd ~/stage tar xf sqlmr-sdk-c.tar.gz
-
Change the working directory to ~/stage/sqlmr-sdk. You will see these directories:
- include/sqlmr/udf/api/c contains the user defined function C API headers, such as ScalarFunction.h, AggegatorFunction.h, and so on.
- example/c/udf/ contains some sample C user defined functions (source code and makefiles). You will also find source code here for example function tests that use TestRunner for local testing.
- include/sqlmr/api/c contains the SQL-MapReduce C API headers, such as ArgumentClause.h, ByteArray.h, ByteStream.h, ColumnDefinition.h, Core.h, and so on. User defined functions may also make use of many of these common API for SQL-MapReduce functions.
- example/c contains some sample C API functions (source code and makefiles) such as echo_input and list_files. You will also find source code here, for example function tests that use TestRunner for local testing.
- include/sqlmr/testrunner/c contains the header files of the TestRunner testing framework for testing API functions locally. Comments in the headers explain the tools provided for testing.
- lib contains the TestRunner library.