准备环境

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

首先保证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. asp.net mvc中用angularJs写的增删改查的demo。初学者,求指点。。

    直接给个代码下载链接.... http://pan.baidu.com/s/1FfVgq 本人刚刚学习angularJs,感觉双向数据绑定蛮爽的... 之前的代码存在点问题,已修复

  2. link with editor

    在左侧explore上,有个双向的箭头,点一下,就会把路径和当前文件自动对应

  3. 什么是mysql的元数据呢?

    需求描述: 什么是mysql的元数据?metadata? 概念解释: 简单来说:任何描述数据库的数据就是数据库的元数据库(与数据库中存在的内容相对) 比如,用于描述一个冰箱是如何构成,怎么使用的就是冰 ...

  4. mysql中,如何查看数据库中当前可用的校勘?字符集默认的collation?

    需求描述: mysql的字符集在使用的过程中会有一些规则,这些规则就组成了校勘, 也就是通过什么规则做什么事,比如,如何比较两个字符的大小,后台都是有一些 规则,这些规则就是校勘的一部分. 那么,查看 ...

  5. Android开发相关

    在用红米4X进行真机调试的时候,出现此问题,问题描述如下: DELETE_FAILED_INTERNAL_ERROR Error while Installing APK 一直调试不成功,百度了下,因 ...

  6. api数据接口

    阿凡达数据 http://www.avatardata.cn/ 聚合数据 https://www.juhe.cn/

  7. angularjs基础——变量绑定

    1)弄一个ng-app(angularjs 应用) 2)在里面用ng-model(angularjs 模型)就可以定义一个模型变量 3)使用模版方法就可以输出变量了(例如:{{name}}) 示例: ...

  8. @property装饰器的用法【python】

    转自:http://www.jb51.net/article/65052.htm python官方介绍:https://docs.python.org/release/2.6/library/func ...

  9. UE4 Run On Server与Run on owning client

  10. idea & datagrip 注册码

    CNEKJPQZEX-eyJsaWNlbnNlSWQiOiJDTkVLSlBRWkVYIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYXNzaWduZWVOYW1lIjoiI ...