话不多说上代码:
======idea 部分代码======begin=====
import org.apache.hadoop.security.UserGroupInformation
import org.apache.spark.sql.SparkSession
import java.io.File
import java.util.Properties
import scala.io.{BufferedSource, Source}
/**
* ods层数据清洗落地到dwd层
*/
object Ods2DwdFilterSql {
def main(args: Array[String]): Unit = {
val filePath: String = args(0)
//读取集群配置文件
val prop: Properties = PropertieUtil.load("config.properties")
//本地测试读文件
// val prop: Properties = PropertieUtil.getProperties("/config.properties")
System.setProperty("java.security.krb5.conf", prop.getProperty(PropConstants.KRB5_CONF_PATH))
System.setProperty("HADOOP_USER_NAME", prop.getProperty(PropConstants.HADOOP_USER_NAME))
Syst