[英]how to store XML files in hadoop?
I have installed hadoop-2.2.0 on ubuntu 12.04. 我已经在Ubuntu 12.04上安装了hadoop-2.2.0。 Now I want to store xml files of 2-4 KB.
现在,我想存储2-4 KB的xml文件。 Can anyone guide me that how should I do it?
谁能指导我该怎么做?
Formate your namenode...Start hadoop system and then... 格式化namenode ...启动hadoop系统,然后...
just to store file, you can use 只是存储文件,您可以使用
hadoop fs -copyFromLocal File.xml /
To check your file is stored on HDFS run this... or in web-browser type this URL "hostname:50070" - hostname==IP address of machine on which hadoop namenode is installed. 要检查文件是否存储在HDFS上,请运行此...或在Web浏览器中键入以下URL:“ hostname:50070”-hostname ==安装hadoop namenode的计算机的IP地址。 (if this is not a single node cluster).
(如果这不是单节点群集)。
hadoop fs -ls /
To read file on HDFS from shell 从外壳读取HDFS上的文件
hadoop fs -cat /file.xml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.