程序功能:MapReduce程序,从hbase里面取搜索日志,生成搜索下拉服务的数据。
问题:
程序采用Extract required libraries into generated jar,packate requited libraries into generated jar打包的时候,在eclipse下debug with configuration,运行正常。
但是用hadoop jar调用的时候会报错,错误信息如下
1 15/12/10 15:53:47 INFO suggestlist.DataCollector: ---------------Suggestlist data analysis begin to execute -------------
2 ---------------Suggestlist data analysis begin to execute -------------
3 hdfs path is hdfs://192.168.10.225:9000 -----这几个是程序传进云的参数,跟eclipse里面运行时打印的一致
4 output path is /org/jinher/search/suggestlist
5 resourcemanager is 192.168.10.225:8032
6 tarname is /export/search/dataanalysis/jar/SuggestListScheduler.jar
7 zkcluster is localhost:2181
8 15/12/10 15:53:47 INFO suggestlist.DataCollector: step 1,DataCollector is running
9 SLF4J: Class path contains multiple SLF4J bindings.
10 SLF4J: Found binding in [rsrc:org/slf4j/impl/StaticLoggerBinder.class]
11 SLF4J: Found binding in [jar:rsrc:slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
12 SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
13 SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
14 java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: rsrc:hbase-common-0.98.9-hadoop2.jar
15 at org.apache.hadoop.fs.Path.initialize(Path.java:206)
16 at org.apache.hadoop.fs.Path.<init>(Path.java:172)
17 at org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.findOrCreateJar(TableMapReduceUtil.java:821)
18 at org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJars(TableMapReduceUtil.java:774)
19 at org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addHBaseDependencyJars(TableMapReduceUtil.java:690)
20 at org.jinher.search.suggestlist.DataCollector.run(DataCollector.java:131)
21 at org.jinher.search.suggestlist.SuggestListScheduler.run(SuggestListScheduler.java:78)
22 at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
23 at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
24 at org.jinher.search.suggestlist.SuggestListScheduler.main(SuggestListScheduler.java:26)
25 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
26 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
27 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
28 at java.lang.reflect.Method.invoke(Method.java:606)
29 at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
30 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
31 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
32 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
33 at java.lang.reflect.Method.invoke(Method.java:606)
34 at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
35 Caused by: java.net.URISyntaxException: Relative path in absolute URI: rsrc:hbase-common-0.98.9-hadoop2.jar
36 at java.net.URI.checkPath(URI.java:1804)
37 at java.net.URI.<init>(URI.java:752)
38 at org.apache.hadoop.fs.Path.initialize(Path.java:203)
39 ... 19 more
程序采用copy required libraries into a sub-folder next to the genered JAR 打包的时候在,eclipse下debug with configuration,运行正常,hadoop jar 运行也正常,,那位大牛能解释一下为啥呢?谢谢
|
|