in gitcommits/src/main/scala/com/gerritforge/analytics/gitcommits/engine/GerritAnalyticsTransformations.scala [218:237]
def longDateToISO(in: Number): String =
ZonedDateTime.ofInstant(
LocalDateTime.ofEpochSecond(in.longValue() / 1000L, 0, ZoneOffset.UTC),
ZoneOffset.UTC,
ZoneId.of("Z")
) format DateTimeFormatter.ISO_OFFSET_DATE_TIME
def getContributorStats(
projects: RDD[GerritProject],
projectToContributorsAnalyticsUrlFactory: String => Option[String],
gerritApiConnection: GerritConnectivity
)(implicit spark: SparkSession) = {
import spark.sqlContext.implicits._ // toDF
projects
.enrichWithSource(projectToContributorsAnalyticsUrlFactory)
.fetchRawContributors(gerritApiConnection)
.toDF("project", "json")
.transformCommitterInfo
}