Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

HBase mapreduce error

avatar
Expert Contributor

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 ?

1 ACCEPTED SOLUTION

avatar
Expert Contributor

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) !

View solution in original post

1 REPLY 1

avatar
Expert Contributor

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) !