sparkR操作HDFS上面的CSV文件
./bin/sparkR --packages com.databricks:spark-csv_2.10:1.3.0 --master yarn
hdfs://master:9000/tmp/demo.cvs 替换你的hdfs路径
>sc = sparkR.init(master = "yarn″, appName="SparkR")
>sqlContext = sparkRSQL.init(sc)
>demo = read.df(sqlContext,'hdfs://master:9000/tmp/demo.cvs',source ='com.databricks.spark.csv')
>head(demo)