项目要求统计0点前一天的统计量,每天定时进行spark任务,代码如下:
代码语言:javascript复制val calendar: Calendar = Calendar.getInstance()
calendar.set(Calendar.SECOND, 0)
calendar.set(Calendar.MINUTE, 0)
calendar.set(Calendar.HOUR_OF_DAY, 0)
calendar.set(Calendar.MILLISECOND, 0)
val hbaseTimeStopRow: Long = calendar.getTimeInMillis