設置以下便可訪問遠程hdfs文件並連接yarn的resourcemanagerjava
SparkConf conf = new SparkConf(); conf = conf.set("fs.defaultFS", "hdfs://test-master.flashdragon.com"); conf = conf.set("spark.hadoop.yarn.resourcemanager.address", "test-master.flashdragon.com:8032")