Hive错误:java.io.IOException:无法创建代理提供程序类org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider

时间:2015-08-06 11:28:13

标签: apache hadoop hive hiveql hadoop-streaming

我的hive查询有时会成功运行,但是最长时间会产生错误" java.io.IOException:无法创建代理提供程序类org.apache.hadoop.hdfs.server.namenode.ha。 ConfiguredFailoverProxyProvider"

以下是我的错误日志

  

java.lang.RuntimeException:java.io.IOException:无法创建代理   提供者类org.apache.hadoop.hdfs.server.namenode.ha.Con \   figuredFailoverProxyProvider at   org.apache.hadoop.mapred.lib.CombineFileInputFormat.isSplitable(CombineFileInputFormat.java:154)     在   org.apache.hadoop.mapreduce.lib.input.CombineFileInputFormat.getMoreSplits(CombineFileInputFormat.java:283)     在   org.apache.hadoop.mapreduce.lib.input.CombineFileInputFormat.getSplits(CombineFileInputFormat.java:239)     在   org.apache.hadoop.mapred.lib.CombineFileInputFormat.getSplits(CombineFileInputFormat.java:75)     在   org.apache.hadoop.hive.shims.HadoopShimsSecure $ CombineFileInputFormatShim.getSplits(HadoopShimsSecure.java:336)     在   org.apache.hadoop.hive.shims.HadoopShimsSecure $ CombineFileInputFormatShim.getSplits(HadoopShimsSecure.java:302)     在   org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.getSplits(CombineHiveInputFormat.java:435)     在   org.apache.hadoop.mapreduce.JobSubmitter.writeOldSplits(JobSubmitter.java:525)     在   org.apache.hadoop.mapreduce.JobSubmitter.writeSplits(JobSubmitter.java:517)     在   org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:399)     在org.apache.hadoop.mapreduce.Job $ 10.run(Job.java:1295)at at   org.apache.hadoop.mapreduce.Job $ 10.run(Job.java:1292)at at   java.security.AccessController.doPrivileged(Native Method)at   javax.security.auth.Subject.doAs(Subject.java:415)at   org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1614)     在org.apache.hadoop.mapreduce.Job.submit(Job.java:1292)at   org.apache.hadoop.mapred.JobClient $ 1.run(JobClient.java:564)at at   org.apache.hadoop.mapred.JobClient $ 1.run(JobClient.java:559)at at   java.security.AccessController.doPrivileged(Native Method)at   javax.security.auth.Subject.doAs(Subject.java:415)at   org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1614)     在   org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:559)     在org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:550)     在   org.apache.hadoop.hive.ql.exec.mr.ExecDriver.execute(ExecDriver.java:420)     在   org.apache.hadoop.hive.ql.exec.mr.MapRedTask.execute(MapRedTask.java:136)     在org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:153)at   org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:85)     在org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1516)at   org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1283)at   org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1101)at at   org.apache.hadoop.hive.ql.Driver.run(Driver.java:924)at at   org.apache.hadoop.hive.ql.Driver.run(Driver.java:914)at   org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:269)     在   org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:221)     在   org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:431)     在   org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:367)     在   org.apache.hadoop.hive.cli.CliDriver.processReader(CliDriver.java:464)     在   org.apache.hadoop.hive.cli.CliDriver.processFile(CliDriver.java:474)     在   org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:756)     在org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:694)at   org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:633)at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:606)at   org.apache.hadoop.util.RunJar.main(RunJar.java:212)引起:   java.io.IOException:无法创建代理提供程序类   org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverPr \   oxyProvider在   org.apache.hadoop.hdfs.NameNodeProxies.createFailoverProxyProvider(NameNodeProxies.java:475)     在   org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:148)     在org.apache.hadoop.hdfs.DFSClient。(DFSClient.java:632)at at   org.apache.hadoop.hdfs.DFSClient。(DFSClient.java:570)at at   org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:147)     在   org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2596)     在org.apache.hadoop.fs.FileSystem.get(FileSystem.java:367)at   org.apache.hadoop.fs.FileSystem.get(FileSystem.java:169)at at   org.apache.hadoop.mapred.lib.CombineFileInputFormat.isSplitable(CombineFileInputFormat.java:151)     ... 45更多引起:java.lang.reflect.InvocationTargetException     at sun.reflect.GeneratedConstructorAccessor32.newInstance(未知   来源)at   sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)     在   org.apache.hadoop.hdfs.NameNodeProxies.createFailoverProxyProvider(NameNodeProxies.java:458)     ... 53更多引起:java.lang.OutOfMemoryError:GC开销限制   超出了java.util.Arrays.copyOf(Arrays.java:2219)at   java.util.ArrayList.grow(ArrayList.java:242)at   java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:216)at   java.util.ArrayList.ensureCapacityInternal(ArrayList.java:208)at   java.util.ArrayList.add(ArrayList.java:440)at   java.lang.String.split(String.java:2288)at   sun.net.util.IPAddressUtil.textToNumericFormatV4(IPAddressUtil.java:47)     在java.net.InetAddress.getAllByName(InetAddress.java:1129)at   java.net.InetAddress.getAllByName(InetAddress.java:1098)at   java.net.InetAddress.getByName(InetAddress.java:1048)at   org.apache.hadoop.security.SecurityUtil $ StandardHostResolver.getByName(SecurityUtil.java:474)     在   org.apache.hadoop.security.SecurityUtil.getByName(SecurityUtil.java:461)     在   org.apache.hadoop.net.NetUtils.createSocketAddrForHost(NetUtils.java:235)     在org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:215)     在org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:163)     在org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:152)     在   org.apache.hadoop.hdfs.DFSUtil.getAddressesForNameserviceId(DFSUtil.java:677)     在   org.apache.hadoop.hdfs.DFSUtil.getAddressesForNsIds(DFSUtil.java:645)     在org.apache.hadoop.hdfs.DFSUtil.getAddresses(DFSUtil.java:628)at   org.apache.hadoop.hdfs.DFSUtil.getHaNnRpcAddresses(DFSUtil.java:727)     在   org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider。(ConfiguredFailoverProxyProvider.java:88)     at sun.reflect.GeneratedConstructorAccessor32.newInstance(未知   来源)at   sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)     在   org.apache.hadoop.hdfs.NameNodeProxies.createFailoverProxyProvider(NameNodeProxies.java:458)     在   org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:148)     在org.apache.hadoop.hdfs.DFSClient。(DFSClient.java:632)at at   org.apache.hadoop.hdfs.DFSClient。(DFSClient.java:570)at at   org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:147)     在   org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2596)     在org.apache.hadoop.fs.FileSystem.get(FileSystem.java:367)at   org.apache.hadoop.fs.FileSystem.get(FileSystem.java:169)工作   提交失败,但有异常   ' java.lang.RuntimeException(java.io.IOException:无法创建代理   提供者类org.apac \   he.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider)'

有人能告诉我为什么会这样吗?

1 个答案:

答案 0 :(得分:0)

我自己偶然发现了一个类似的异常,并且增加了hive客户端堆并没有帮助。我发现我能够通过在查询的where子句中添加一个分区列来清除OutOfMemory GC Overhead异常,因此我得出结论,有大量的分裂导致了这个异常。我没有深入研究代码,但我相信我已经看到这种情况发生在循环触发gc颠簸的字符串连接中,类似的东西可能会在CombineHiveInputFormat.getSplits方法中发生。