summary.typeQuotaInfos.typeQuotaInfo[3].type

news/2024/5/20 4:29:29 标签: java, spring boot, maven, hdfs, hadoop

在这里插入图片描述

文章目录

  • 摘要
  • 原因一:
  • 解决方案:
  • 原因二:
  • 解决办法一:
  • 解决办法二:
  • 其他文章答案讨论

摘要

在使用工具方法==fs.getContentSummary(path)==方法获取hbase库表信息时报错,报错如下:

java">java.io.IOException: com.google.protobuf.ServiceException: com.google.protobuf.UninitializedMessageException: Message missing required fields: summary.typeQuotaInfos.typeQuotaInfo[3].type
	at org.apache.hadoop.ipc.ProtobufHelper.getRemoteException(ProtobufHelper.java:47) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getContentSummary(ClientNamenodeProtocolTranslatorPB.java:809) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source) ~[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_231]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_231]
	at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:191) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at com.sun.proxy.$Proxy213.getContentSummary(Unknown Source) ~[na:na]
	at org.apache.hadoop.hdfs.DFSClient.getContentSummary(DFSClient.java:3040) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.apache.hadoop.hdfs.DistributedFileSystem$15.doCall(DistributedFileSystem.java:725) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.apache.hadoop.hdfs.DistributedFileSystem$15.doCall(DistributedFileSystem.java:721) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.apache.hadoop.hdfs.DistributedFileSystem.getContentSummary(DistributedFileSystem.java:721) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at com.geespace.microservices.directory.assets.service.impl.DataAssetsScreenServiceImpl.updateAssetsSize(DataAssetsScreenServiceImpl.java:153) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at com.geespace.microservices.directory.assets.service.impl.DataAssetsScreenServiceImpl$$FastClassBySpringCGLIB$$cc83a803.invoke(<generated>) [api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) [api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749) [api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) [api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_231]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_231]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_231]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_231]
Caused by: com.google.protobuf.ServiceException: com.google.protobuf.UninitializedMessageException: Message missing required fields: summary.typeQuotaInfos.typeQuotaInfo[3].type
	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:271) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at com.sun.proxy.$Proxy212.getContentSummary(Unknown Source) ~[na:na]
	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getContentSummary(ClientNamenodeProtocolTranslatorPB.java:806) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	... 24 common frames omitted
Caused by: com.google.protobuf.UninitializedMessageException: Message missing required fields: summary.typeQuotaInfos.typeQuotaInfo[3].type
	at com.google.protobuf.AbstractMessage$Builder.newUninitializedMessageException(AbstractMessage.java:770) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$GetContentSummaryResponseProto$Builder.build(ClientNamenodeProtocolProtos.java) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$GetContentSummaryResponseProto$Builder.build(ClientNamenodeProtocolProtos.java) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:261) ~[api-gateway-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	... 26 common frames omitted

原因一:

服务器hadoop版本和springboot项目依赖的hadoop版本不一致,以服务器hadoop版本为主

解决方案:

修改pom相关的hadoop的version,确保一致即可


原因二:

springboot项目里引入多个依赖,甚至有隐藏依赖,导致出现多个版本,最终由于存在多版本导致服务器调用了不一致版本而报错,截图问题如下:
在这里插入图片描述

解决办法一:

依赖hadoop-common设置了3.1.1即可

java"><dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-common</artifactId>
    <version>3.1.1</version>
</dependency>

解决办法二:

还有一种情况是hadoop相关依赖已经设置3.1.1正确版本,但是其他hbase依赖内部包含了2.7.7的版本,所以需要找到它并排除掉,最终只保留一个3.1.1的版本即可,不然report后可能会还是出现两个版本,解决方案如下添加

说明:我偷懒了所以都拷贝排除了,正常只排除掉你需要排除的即可

java"><dependency>
    <groupId>org.apache.hbase</groupId>
    <artifactId>hbase-client</artifactId>
    <version>2.0.0</version>
    <exclusions>
        <exclusion>
            <artifactId>hadoop-hdfs</artifactId>
            <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
            <artifactId>hadoop-mapreduce-client-core</artifactId>
            <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
            <artifactId>hadoop-annotations</artifactId>
            <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
            <artifactId>hadoop-yarn-api</artifactId>
            <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
            <artifactId>hadoop-yarn-common</artifactId>
            <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
            <artifactId>hbase-hadoop-compat</artifactId>
            <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
            <artifactId>hbase-hadoop2-compat</artifactId>
            <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
            <artifactId>hadoop-common</artifactId>
            <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
            <artifactId>hadoop-client</artifactId>
            <groupId>org.apache.hadoop</groupId>
        </exclusion>
    </exclusions>
</dependency>

其他文章答案讨论

1.比如这个 http://mail-archives.apache.org/mod_mbox/hadoop-hdfs-issues/202012.mbox/%3CJIRA.13337627.1603879426000.278677.1607068440721@Atlassian.JIRA%3E
他说是nn和dn升级后版本不一致,这个针对能否单独对nn和dn升级我不清楚,所以需要你们去评论,当然如果有升级过的可以回复我,共同学习下


http://www.niftyadmin.cn/n/898252.html

相关文章

2021龙小丽高考成绩查询,2021北京新高考制度

高考对于每一个学子来说都是人生中一个重要路口&#xff0c;不要轻视它&#xff0c;要慎重的面对高考。而高考的结束接下来便是了解各地的高考制度&#xff0c;志愿填报等&#xff0c;以下是小编为大家准备了2021北京新高考制度_新高考模式的选拔标准大全&#xff0c;欢迎参阅。…

html三段式布局,移动端 三段式布局 (flex方式)

分享一种平时用的三段式布局(flex)主要思路是 上中下 header&footer 给高度 main 占其余部分html 部分css 部分.wrap{display: flex; //弹性盒子flex-direction: column; //垂直排列height: 100%; //容器盒子要有高度.header{height: .48rem;}.main{flex: 1;  …

java使用hbase、hadoop报错举例

文章目录摘要情况1&#xff1a;NoClassDefFoundError情况2&#xff1a;使用hbase报错&#xff1a;NullPointerException情况3&#xff1a;summary.typeQuotaInfos.typeQuotaInfo[3].type摘要 总结自己springboot项目使用hbase、hadoop中出现的莫名奇怪的依赖使用报错 hbase …

指定移动文字的循环延时的HTML代码是,指定移动文字的循环延时的HTML代码是 。...

_你参加的是哪一场次的第一次集中理论学习?It is proposed that the boss _____ salary for workers.生物-心理-社会医学模式的产生背景 是 。 (20.0分)土的塑性指数越大则土的粘粒含量越低土的塑性指数越大则土的粘粒含量越低听写共8个词(组)(音频中含例句)饱和脂肪酸较不饱和…

MyBatis如何关闭一级缓存(分注解和xml两种方式)

文章目录问题&#xff1a;为什么有缓存什么场景下必须需要关闭一级缓存关闭一级缓存方法&#xff08;针对使用MyBatis场景&#xff09;第1种&#xff1a;注解形式(可指定仅仅某个Mapper关闭注解)第2种&#xff1a;sql动态拼接传入的随机数问题&#xff1a;为什么有缓存 mybati…

vue比html快,vue对比与其他框架

一、ReactReact特点1.声明式设计−React采用声明范式&#xff0c;可以轻松描述应用。2.高效−React通过对DOM的模拟&#xff0c;最大限度地减少与DOM的交互。3.灵活−React可以与已知的库或框架很好地配合。4.JSX−JSX是 JavaScript比抖朋要插支一圈不者地语法的扩展。React开发…

JAVA 二叉树面试题

文章目录摘要代码Node节点main函数问题1&#xff1a;递归——求二叉树的最大深度问题2&#xff1a;求二叉树的最小深度问题3&#xff1a;求二叉树中节点的个数问题4&#xff1a;求二叉树中叶子节点的个数问题5&#xff1a;求二叉树中第k层节点的个数,不是求第k层叶子节点个数问…

mysql 5.7.x版本查看某张表、库的大小 思路方案说明

文章目录摘要&#xff08;推荐&#xff09;第一种方案&#xff1a;查询information_schema.TABLES的字段DATA_LENGTH使用场景优点&#xff1a;网上大多案例都是查询系统表的字段DATA_LENGTH去计算大小缺点&#xff1a;DATA_LENGTH不都是实时更新的&#xff0c;由表引擎决定&…