Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,11 @@ class KuduContext(val kuduMaster: String, sc: SparkContext, val socketReadTimeou
val timestampAccumulator = new TimestampAccumulator()
sc.register(timestampAccumulator)

val durationHistogram = new HdrHistogramAccumulator()
sc.register(durationHistogram, "kudu.write_duration")
lazy val durationHistogram = {
val acc = new HdrHistogramAccumulator()
sc.register(acc, "kudu.write_duration")
acc
}

@deprecated("Use KuduContext constructor", "1.4.0")
def this(kuduMaster: String) {
Expand Down Expand Up @@ -374,6 +377,8 @@ class KuduContext(val kuduMaster: String, sc: SparkContext, val socketReadTimeou
rdd = repartitionRows(rdd, tableName, schema, writeOptions)
}

// materialize durationHistogram
durationHistogram
// Write the rows for each Spark partition.
rdd.foreachPartition(iterator => {
val pendingErrors = writePartitionRows(
Expand Down