Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 01-10-2017 07:28 AM
Hi All,
i'm running a mapReduce job - copying from Hbase table and putting into HDFS, ansd running into error.
Any ideas on this ?
Code snippet :
public class ProductAnalyzer extends Configured implements Tool {
.....
public static void main(String[] args) throws Exception { System.out.println(" in main111"); System.exit(ToolRunner.run(new Configuration(), new ProductAnalyzer(), args)); } public int run(String[] args) throws Exception { System.out.println(" In run "); String table = "sales_fact"; String output = "/tmp/exercise5/output1";
...
}}
Command :
HADOOP_CLASSPATH=$(ls -1 /usr/hdp/current/hbase-client/lib/* | tr '\n', ':') hadoop jar mr.jar hbase.labfiles.Exercise5.ProductAnalyzer -libjars $(ls -1 /usr/hdp/current/hbase-client/lib/* | tr '\n', ',')
Error :
WARNING: Use "yarn jar" to launch YARN applications. in main111 Exception in thread "main" java.lang.IllegalArgumentException: File name can't be empty string at org.apache.hadoop.util.GenericOptionsParser.validateFiles(GenericOptionsParser.java:390) at org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions(GenericOptionsParser.java:299) at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:487) at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:170) at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:153) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at hbase.labfiles.Exercise5.ProductAnalyzer.main(ProductAnalyzer.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
In calling ->
System.exit(ToolRunner.run(new Configuration(), new ProductAnalyzer(), args));
in main(), the program errors out
run() - is not being called.. Any ideas ?
Created 01-10-2017 07:49 PM
HADOOP_CLASSPATH=$(ls -1 /usr/hdp/current/hbase-client/lib/*.jar | tr '\n', ':') hadoop jar mr.jar hbase.labfiles.Exercise5.ProductAnalyzer -libjars $(ls -1 /usr/hdp/current/hbase-client/lib/*.jar | tr '\n', ',')
This worked finally (changes highlighted) !
Created 01-10-2017 07:49 PM
HADOOP_CLASSPATH=$(ls -1 /usr/hdp/current/hbase-client/lib/*.jar | tr '\n', ':') hadoop jar mr.jar hbase.labfiles.Exercise5.ProductAnalyzer -libjars $(ls -1 /usr/hdp/current/hbase-client/lib/*.jar | tr '\n', ',')
This worked finally (changes highlighted) !