java.lang.illegalargumentexception:java.net.urisyntaxexception:绝对uri中的相对路径:对于talend中的hbase

3phpmpom  于 2021-06-10  发布在  Hbase
关注(0)|答案(1)|浏览(352)

我一直在尝试使用bigdatabatch中的hbaseinput组件从hbase表中获取数据。

我没有在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

这是表名,

它编写了行键,我在组件中硬编码了行键。其余的田地都是空的。是的,我在表中有数据,它有数百万行。我认为talend无法从我的表中获取数据,它没有与之通信,正如异常所说的“由:java.lang.illegalargumentexception:java.net.urisyntaxexception:relative path in absolute引起”uri:namespace1:表“名称”

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

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

ar5n3qh5

ar5n3qh51#

您使用的是mapr发行版,它与其他hadoop发行版稍有不同。
最后,您可以进入 tHbaseInput 组件并设置以下属性:

hbase.table.namespace.mappings

或检查 Set table Namspace mappings 框并将Map放到表中。看这里。

相关问题