通过http访问存储在HDFS中的视频 [英] Accessing video stored in HDFS over http

查看:767
本文介绍了通过http访问存储在HDFS中的视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想访问存储在HDFS&在网页浏览器中显示它们。我发现这个项目( https://github.com/yeleaveszi/Play-Videos-In- HDFS )在github上正是这样做,但无法使其工作。

任何人都可以提供一些信息或方式,让我可以在网络浏览器上显示HDFS中存储的视频。
也有可能获得存储在HDFS中的视频的HTTP链接,我读过关于WebHDFS& HTTPFS,但不理解太多。



任何帮助将不胜感激。提前致谢!使用WebHDFS,您可以获取存储在HDFS中的数据的HTTP链接。请参阅此链接 https: //www.linkedin.com/pulse/20140717115238-176301000-accessing-hdfs-using-the-webhdfs-rest-api-vs-httpfs 在您的hadoop配置中启用WebHDFS。



因此,如果您的视频在HDFS中的/user/test.mp4位置显示test.mp4,则打开它的相应HTTP链接将会是 http:// HOST:PORT / webhdfs / v1 / PATH? op = OPEN& user.name = aawasthi 在HOST填写您的主机地址,PORT处的端口号(默认值为50070),PATH处的视频HDFS路径(这里是'/user/test.mp4' )和用户名

只要将上述HTTP链接放在任何具有VLC插件&您可以看到存储在HDFS播放中的视频。

I want to access videos which are stored in HDFS & show them in a web browser. I found this project ( https://github.com/yeleaveszi/Play-Videos-In-HDFS ) on github which exactly does this, but couldn't make it work.

Can anyone provide me some information or ways in which I could show the video stored in HDFS on a web browser. Also is it possible to get a HTTP link of the video which is stored in HDFS, I read about WebHDFS & HTTPFS but didn't understand much.

Any help would be appreciated. Thanks in advance!

解决方案

Using WebHDFS you can get a HTTP link of the data stored in HDFS. See this link https://www.linkedin.com/pulse/20140717115238-176301000-accessing-hdfs-using-the-webhdfs-rest-api-vs-httpfs to enable WebHDFS in your hadoop configuration.

So if your video say "test.mp4" is at the location "/user/test.mp4" in HDFS, then the corresponding HTTP link to open it would be "http://HOST:PORT/webhdfs/v1/PATH?op=OPEN&user.name=aawasthi" where fill your host address at HOST, port number at PORT (default 50070), HDFS path of video at PATH (here it would be '/user/test.mp4') and username in user.name

Just put the above HTTP link in any web browser having VLC Plugin & you can see the video which is stored in HDFS playing.

这篇关于通过http访问存储在HDFS中的视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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