spark小文件合并
package spark99 import java.io.IOException import org.apache.hadoop.fs.{FileSystem, Path} import org.apache.log4j.Logger import org.apache.spark.sql.hive.HiveContext import org.apache.spark.{SparkConf, SparkContext} import org.apache.spark.sql.{SQLContext, SaveMode} /** * Created by hadoop on 下午11:54. */ object FilesManage { def main(args: Array[String]): Unit = { val sparkConf = new SparkConf().setMaster("local[2]").setAppName("mergefile") val sc = new SparkContext(sparkConf) val sqlContext = new HiveContext(sc) val logger = Logger.getLogger("org") val fileSystem = FileSystem.get(sc