准备环境

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

首先保证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. MyBatis-使用mybatis-generator-core.jar生成POJO和Mapper文件

    Demo: http://pan.baidu.com/s/1pLeyVv9 1.pom.xml <dependencies> <!-- 用于生成日志 --> <depen ...

  2. _mysql_exceptions.ProgrammingError:(2014, "commands out of sync; you can't run this command now")

    今天,测试dashboard上的一些graph, 发现,当多个graph同时向后台请求数据(异步)的时候, 出现了上述错误.而且,三个bug交替出现,另外两个bug分别是:python stop re ...

  3. nginx 杂谈

    http://blog.sina.com.cn/s/articlelist_1834459124_0_1.html

  4. ubuntu压缩

    .tar解包:tar xvf FileName.tar打包:tar cvf FileName.tar DirName(注:tar是打包,不是压缩!)-------------------------- ...

  5. Mike Gancarz:Linux/Unix设计思想

           Mike Gancarz是一位技术布道者. 他是Linux/Unix最基本的倡导者之中的一个,也是最早开发X Window System的先驱.他把一些在Unix/Linux社区里口口相 ...

  6. JBPM4.4_jBPM4.4应用(与Spring集成&自行控制事务等)

    1. jBPM4.4应用 1.1. 与Spring集成(jBPM4.4 Developers Guide, Chapter 17. Spring Integration) 1.1.1. 在jbpm.c ...

  7. MySQL<多表操作>

    多表操作 外键 什么是外键 外键是指引用另一个表中的一列或多列,被引用的列应该具有主键约束或唯一性约束. 外键用于建立和加强两个表数据之间的链接. 为表添加外键约束 想要真正连接两个表的数据,就需要为 ...

  8. Java精选笔记_面向对象(包、访问控制、内存机制、垃圾回收机制)

    包 包的定义与使用 专门用来存放类的,通常功能相同的类存放在相同的包中. 包的声明只能位于Java源文件的第一行 Java语言中的常用包 java.lang:包含Java语言的核心类,如String. ...

  9. docker中文、手册、教程

    Docker资源 Docker官方英文资源: docker官网:http://www.docker.com Docker windows入门:https://docs.docker.com/windo ...

  10. Spring AOP教程及实例

    1.教程转载==>>:http://blog.csdn.net/wangpeng047/article/details/8556800 2.实例转载==>>:http://bl ...