Running Non-MapReduce Applications
About this task
TestReaderWriter.java.Procedure
-
Add the following JAR files to your
$HADOOP_CLASSPATHenvironment variable with the following command:export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/opt/mapr/hive/hive-<version>/lib/antlr-runtime-3.4.jar:/opt/mapr/hive/hive-<version>/lib/hive-cli-<veresion>-mapr.jar -
Compile the test program with the following command:
javac -cp `hadoop classpath`:${HCAT_HOME}/share/hcatalog/hcatalog-core-<version>-mapr.jar TestReaderWriter.java -d <directory> -
Create a JAR file with the following command:
jar -cf hcatrwtest.jar org -
Run the job with the following command:
hadoop jar /root/<username>/hcatalog/hcatrwtest.jar org.apache.hive.catalog.data.TestReaderWriter -libjars $LIB_JARS
Results
mytbl that is
populated with data.