java.lang.IllegalArgumentException:java.net.URISyntaxException:绝对URI中的相对路径:用于Talend中的Hbase

时间:2017-02-07 10:54:01

标签: exception hbase relative-path talend bigdata

我一直在尝试使用Big data Batch中的HbaseInput组件从Hbase表中获取数据。如下所示。 enter image description here

我没有在tMap中执行任何转换,只是尝试从Hbase表中读取数据。我检查了所有连接,它们连接正常。 所以,最后我建立了一个工作,复制它并在集群中运行。 这份工作给了我以下例外,

[WARN ]: org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum=zk:5181, exception=org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
Running job: job_1472265299867_10046
 map 0% reduce 0%
Task Id : attempt_1472265299867_10046_m_000001_0, Status : FAILED
Error: java.lang.RuntimeException: Error in configuring object
        at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109)
        at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75)
        at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)
        at org.talend.hadoop.mapred.lib.DelegatingInputFormat.getRecordReader(DelegatingInputFormat.java:58)
        at org.apache.hadoop.mapred.MapTask$TrackedRecordReader.<init>(MapTask.java:172)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:414)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:347)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1566)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:106)
        ... 11 more
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: namespace1:table_name
        at local_project.hbasepilot_0_1.HbasePilot$tHBaseInput_1InputFormat.configure(HbasePilot.java:308)
        ... 16 more
Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: namespace1:table_name
        at org.apache.hadoop.fs.Path.initialize(Path.java:218)
        at org.apache.hadoop.fs.Path.<init>(Path.java:184)
        at org.apache.hadoop.fs.Path.<init>(Path.java:93)
        at com.mapr.fs.hbase.MapRTableMappingRules.makePath(MapRTableMappingRules.java:296)
        at com.mapr.fs.hbase.MapRTableMappingRules.getTablePath(MapRTableMappingRules.java:277)
        at com.mapr.fs.hbase.MapRTableMappingRules.getMaprTablePath(MapRTableMappingRules.java:248)
        at com.mapr.fs.hbase.MapRTableMappingRules.isMapRTable(MapRTableMappingRules.java:201)
        at org.apache.hadoop.hbase.client.mapr.BaseTableMappingRules.isMapRTable(BaseTableMappingRules.java:96)
        at org.apache.hadoop.hbase.client.HTable.initIfMapRTable(HTable.java:440)
        at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:204)
        at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:172)
        at local_project.hbasepilot_0_1.HbasePilot$tHBaseInput_1InputFormat.configure(HbasePilot.java:306)
        ... 16 more
Caused by: java.net.URISyntaxException: Relative path in absolute URI: namespace1:table_name
        at java.net.URI.checkPath(URI.java:1823)
        at java.net.URI.<init>(URI.java:745)
        at org.apache.hadoop.fs.Path.initialize(Path.java:215)
        ... 27 more

 map 50% reduce 0%
 map 100% reduce 0%
Job complete: job_1472265299867_10046
Counters: 34
        File System Counters
                FILE: Number of bytes read=0
                FILE: Number of bytes written=188744
                FILE: Number of read operations=0
                FILE: Number of large read operations=0
                FILE: Number of write operations=0
                MAPRFS: Number of bytes read=652
                MAPRFS: Number of bytes written=100535043
                MAPRFS: Number of read operations=34
                MAPRFS: Number of large read operations=0
                MAPRFS: Number of write operations=12998
        Job Counters
                Failed map tasks=1
                Killed map tasks=1
                Launched map tasks=4
                Other local map tasks=1
                Rack-local map tasks=3
                Total time spent by all maps in occupied slots (ms)=8052096
                Total time spent by all reduces in occupied slots (ms)=0
                Total time spent by all map tasks (ms)=4026048
                Total vcore-seconds taken by all map tasks=4026048
                Total megabyte-seconds taken by all map tasks=8245346304
                DISK_MILLIS_MAPS=2013025
        Map-Reduce Framework
                Map input records=4299826
                Map output records=4299826
                Input split bytes=652
                Spilled Records=0
                Failed Shuffles=0
                Merged Map outputs=0
                GC time elapsed (ms)=43365
                CPU time spent (ms)=3716080
                Physical memory (bytes) snapshot=2017206272
                Virtual memory (bytes) snapshot=7506382848
                Total committed heap usage (bytes)=2491416576
        File Input Format Counters
                Bytes Read=0
        File Output Format Counters
                Bytes Written=100535043

这是表名, enter image description here

它已经写了行键,我在组件中硬编码了。 其余的字段都是空的。 是的,我在表中有数据,它有数百万行。 我认为talend无法从我的表中获取数据,它没有与它通信,因为例外情况“引起:java.lang.IllegalArgumentException:java.net.URISyntaxException:绝对URI中的相对路径: namespace1:表格名“

**这是指定表名的正确方法吗?

为什么我不从表中挑选数据?**

1 个答案:

答案 0 :(得分:1)

您正在使用MAPR发行版,它与其他Hadoop发行版略有不同。

在talend中,您可以转到tHbaseInput组件的高级设置并设置以下权限:

hbase.table.namespace.mappings

或检查Set table Namspace mappings框并将您的映射放到表格中。请参阅here