hdfs-ls:发生本地异常失败:com.google.protobuf.InvalidProtocolBufferException: [英] hdfs - ls: Failed on local exception: com.google.protobuf.InvalidProtocolBufferException:

查看:550
本文介绍了hdfs-ls:发生本地异常失败:com.google.protobuf.InvalidProtocolBufferException:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下内容在hdfs中列出我的目录:

I am trying to use the below to list my dirs in hdfs:

ubuntu@ubuntu:~$ hadoop fs -ls hdfs://127.0.0.1:50075/ 
ls: Failed on local exception: com.google.protobuf.InvalidProtocolBufferException: 
Protocol    message end-group tag did not match expected tag.; 
Host Details : local host is: "ubuntu/127.0.0.1"; destination host is: "ubuntu":50075; 

这是我的/ etc / hosts文件

Here is my /etc/hosts file

127.0.0.1       ubuntu localhost
#127.0.1.1      ubuntu

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

如何正确使用hdfs://列出我的目录?

How do I properly use hdfs:// to list my dirs?

我正在ubuntu 12.04上使用canera 4.3

I am using couldera 4.3 on ubuntu 12.04

推荐答案

HDFS不在50075上运行。
要检查您的hdfs端口,请在Linux中使用以下命令

HDFS is not running at 50075. To check your hdfs port use the following command in linux

hdfs getconf -confKey fs.default.name

您将获得类似输出

hdfs://hmaster:54310

并相应地更正您的URL

And correct your URL accordingly

这篇关于hdfs-ls:发生本地异常失败:com.google.protobuf.InvalidProtocolBufferException:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆