write down,forget

hadoop thrift client

<Category: Hadoop> 查看评论

http://code.google.com/p/-sharp/
貌似不给力,pass

http://wiki.apache.org/hadoop/-APIs
http://wiki.apache.org/hadoop/MountableHDFS
http://wiki.apache.org/hadoop/Hbase/Stargate
http://hadoop.apache.org/hdfs/docs/r0.21.0/hdfsproxy.html

统统不给力啊,走thrift吧,看了下svn,cocoa之类的都有现成的了,为啥没有c#,faint

先试试python的吧

hafs服务端

修改成如下:

启动thrift_server

启动成功,监听端口33543(注意:默认每次启动的端口都是不一样的)

cygwin下
新建你的python工程
客户端需要获取如下几个文件:
hdfs client
http://svn.apache.org/repos/asf/hadoop/hdfs/trunk/src/contrib/thriftfs/scripts/*
http://svn.apache.org/repos/asf/hadoop/hdfs/trunk/src/contrib/thriftfs/gen-py/*

thrift lib
easy_install thrift
easy_install readline

OR

wget http://pypi.python.org/packages/source/t/thrift/Thrift-0.5.0.tar.gz

修改hdfs.py
替换成目标服务器的ip和端口

python hdfs.py

好像操作的是目标服务器的文件系统,不是我的HDFS cluster,还有哪里要配啊?

最新的thrift定义
http://svn.apache.org/repos/asf/hadoop/hdfs/trunk/src/contrib/thriftfs/if/hadoopfs.thrift

获取thriftCompiler(window下,貌似刚提供不久,回想当初的编译痛苦….)
http://www.apache.org/dyn/closer.cgi?path=/thrift/0.6.0/thrift-0.6.0.exe
有空整个csharp的client

本文来自: hadoop thrift client