spark 编写规范及技巧

博客提到为凸显规范及逼格,采用入口类的做法,这与信息技术领域的程序设计相关,入口类在程序中可起到规范和引导作用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.为了凸显规范及逼格,使用入口类。

/**
  * @Author: Houzhq
  * @Date: 2019/6/11 15:37
  * @Version 1.0
  * @Note
  */
object EntranceA {
  def main(args:Array[String]): Unit ={
    args.toList match {
      case task :: a => task match {
//        case "temprise" => TempRise(a.toArray)
//        case "volt_temp_diff" => VTdiff(a.toArray)
//        case "nocurrent" => NoCurrent(a.toArray)
//        case "batteryact" => BatteryActive(a.toArray)
//        case "historydistance" => HistoryDistance(a.toArray)
//        case "absolutehistorydistance" => HistoryDistance(a.toArray)
//        case "tempchange" => TempChange(a.toArray)
//        case "tempchange2" => TempChange2(a.toArray)
//        case "coolcharge" => CoolCharge(a.toArray)
//        case "tempdraw" => TempDrawData(a.toArray)
        case "geo" => ChargeGeoInfo(a.toArray)
        case "daily" => DailyStatA(a.toArray)
        case "tempchange3" => TempChange3(a.toArray)
        case "temprise2" => TempRise2(a.toArray)
        case _ => print("Invalid task")
      }
      case Nil => print("no args!")
    }
  }

}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值