准备环境

(个人使用记录,方便下次使用查阅~~)

首先保证PAI是登陆状态:

进入GitHub项目所在地址:

https://github.com/Microsoft/pai/

然后切换分支到 

具体 使用文档再这里:

https://github.com/Microsoft/pai/tree/pai-0.5.y/pai-fs

将代码clone下来后执行:

`python pai-fs.py --config host=xxx.xxx.234.79 port=50070 user=root`(配置Server)

上传数据到HDFS

进到pai-fs.py目录下(也可以直接绝对路径),然后通过 :

python pai-fs.py + 参数 +路径

进行数据上传

具体使用方法:

(Github README.md)

example use:
pai-fs --config host=10.0.3.9 port=50070 user=root -- store hdfs config
pai-fs -ls hdfs:// -- list the contents of a root HDFS directory
pai-fs -ls hdfs:// --host 10.0.3.9 -- list the contents of a root HDFS directory with host specified
pai-fs -ls hdfs:// --host 10.0.3.9 --port 50070 --user root -- list the contents of a root HDFS directory with host, port and user specified
pai-fs -ls -r hdfs:// -- list the contents of a root HDFS directory, recursively
pai-fs -mkdir hdfs://mydir/mysubdir/mysubdir2 -- makes mysubdir2 and all directories along the way
pai-fs -rm hdfs://mydir/mysubdir/myfile -- removes myfile from mysubdir
pai-fs -rm hdfs://mydir/mysubdir -- removes mysubdir and all files and directories in it
pai-fs -cp c:\mylocalfile hdfs://mydir/myremotedir -- copy mylocalfile into myremotedir
pai-fs -cp -r c:\mylocaldir hdfs://mydir/myremotedir -- copy mylocaldir into myremotedir, recursively
pai-fs -cp -r c:\mylocaldir\* hdfs://mydir/myremotedir -- copy mylocaldir's contents into myremotedir, recursively
pai-fs -cp c:\mylocaldir\\a hdfs://mydir/myremotedir/b -- copy file a from mylocaldir to myremotedir and rename to b
pai-fs -cp -r hdfs://mydir/myremotedir c:\mylocaldir -- copy myremotedir into mylocaldir, recursively
pai-fs -cp -r hdfs://mydir/myremotedir/* c:\mylocaldir -- copy myremotedir's contents into mylocaldir, recursively
exit code:
0 -- Success
1 -- An exception happened during the operation including bad connection
2 -- PAI_VC environment variable not set to valid VC or insufficient/invalid command line argument(s)
3 -- Path not found
4 -- Unauthorized access
5 -- Path not empty
6 -- Check failed after operation
100 -- Failed to copy too many times
101 -- Failed to concat chunks into file

使用演示

执行命令后,开始上传

通过 微软 pai-fs 上传数据到HDFS (Microsoft OpenPAI)的更多相关文章

  1. sqoop上传数据到hdfs,并用hive管理数据。

    sqoop导入mysql数据表到HDFS中sqoop import --connect jdbc:mysql://master:3306/test --username root --password ...

  2. 重新想象 Windows 8.1 Store Apps (89) - 通信的新特性: 下载数据, 上传数据, 上传文件

    [源码下载] 重新想象 Windows 8.1 Store Apps (89) - 通信的新特性: 下载数据, 上传数据, 上传文件 作者:webabcd 介绍重新想象 Windows 8.1 Sto ...

  3. TortoiseGit和msysGit安装及使用笔记(windows下使用上传数据到GitHub)[转]

    TortoiseGit和msysGit安装及使用笔记(windows下使用上传数据到GitHub) Git-1.7.11-preview+GitExtensions244SetupComplete+T ...

  4. Amzon MWS API开发之 上传数据

    亚马逊上传数据,现有能操作的功能有很多:库存数量.跟踪号.价格.商品....... 我们可以设置FeedType值,根据需要,再上传对应的xml文件即可. 下面可以看看FeedType类型 这次我们拿 ...

  5. Amazon MWS 上传数据 (三) 提交请求

    前面介绍了设置服务和构造请求,现在介绍提交请求. 上传数据,查询上传操作的工作状态,和处理上传操作返回的报告操作使用的Amazon API 分别为:SubmitFeed(),FeedSubmissio ...

  6. Amazon MWS 上传数据 (二) 构造请求

    上一篇文章提到了Amazon 上传数据有三个步骤,但是每个步骤都需要构造服务和构造请求,服务是一样的,请求各不相同:这个很容易理解,这三个步骤都需要和Amazon服务器交互,所以他们的服务构造是一样的 ...

  7. Amazon MWS 上传数据 (一) 设置服务

    Amazon 上传数据的流程为: 通过 SubmitFeed 操作.加密标头和所有必需的元数据(包括 FeedType 的值在内),来提交 XML 或文本型数据文件.正如亚马逊 MWS的所有提交内容一 ...

  8. 说说ajax上传数据和接收数据

    我是一个脑袋不太灵光的人,所以遇到问题,厚着脸皮去请教大神的时候,害怕被大神鄙视,但是还是被鄙视了.我说自己不要点脸面,那是不可能的,但是,为了能让自己的技术生涯能走的更长远一些,受点白眼,受点嘲笑也 ...

  9. webclient上传数据到ashx服务

    1.上传参数 UploadData()方法可以上传数据参数,需要将所要上传的数据拼成字符. // 创建一个新的 WebClient 实例.    WebClient myWebClient = new ...

随机推荐

  1. MVC下载远程文件流(WebClient)

    public ActionResult DownLoad_File() { return File(ScLiu(PathUrl), "application/octet-stream&quo ...

  2. 【Java面试题】47 heap和stack有什么区别

    java的内存分为两类,一类是栈内存,一类是堆内存.栈内存是指程序进入一个方法时,会为这个方法单独分配一块私属存储空间,用于存储这个方法内部的局部变量,当这个方法结束时,分配给这个方法的栈会释放,这个 ...

  3. .net FrameWork各个版本之间的发展[转]

    上个星期看到了.NET 4.0框架退休日期逐渐临近文章,发现自己一直在使用NET  FrameWork,身为一个NET程序员,里面大概的区别自己还是知道的,但是自己要说出个所以然来了,发现还是有点力不 ...

  4. jQuery实现鼠标选中文字后弹出提示窗口效果

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/ ...

  5. linux 数据盘和系统盘的查看

    系统盘就像linux的c盘,使用df -l命令查看 如下所示: 可以看到根路径 / 都是位于系统盘.而/root,/home,/usr就如同c盘下的c:\windows,c:\usr这些目录 如果单独 ...

  6. [jquery] jQuery 选择器>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  7. ios 显示代码块(show the code snippet library)

    在项目的实际开发中,我们会重复的书写很多的代码,我经常是需要用到某一个功能,就从以前的项目中复制粘贴过来,很是麻烦 下面就为大家提供两种不错的方法, 一.宏定义,这个大家应该很熟悉,在这里就不做多的介 ...

  8. PHP-006

    Q:应用程序执行时的路径 "D:\*******\protected\runtime" 是无效的. 请确定它是一个可被 Web server process 写入资料的目录. A: ...

  9. 查看磁盘读写:iostat

    iostat命令用来查看磁盘IO的读写情况,用法如下: [root@localhost ~]$ yum install -y sysstat # 安装iostat命令 [root@localhost ...

  10. iOS - 布局重绘机制相关方法的研究

    iOS View布局重绘机制相关方法 布局 - (void)layoutSubviews - (void)layoutIfNeeded- (void)setNeedsLayout —————————— ...