Class SparkDataWriterTaskTracker
java.lang.Object
com.linkedin.venice.spark.datawriter.task.SparkDataWriterTaskTracker
- All Implemented Interfaces:
DataWriterTaskTracker,TaskTracker
This class is used to track the metrics for the Spark Data Writer task.
-
Field Summary
Fields inherited from interface com.linkedin.venice.hadoop.task.TaskTracker
PROGRESS_COMPLETED, PROGRESS_NOT_SUPPORTED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglongReturns the set of regions whose external writers exhausted retries and were reported by one or more data-writer tasks.longintThis accumulator performs a 'max' operation, which is not natively supported by either Spark or Hadoop.longlongReturns per-partition record counts collected during the data writer job.longlonglonglonglonglonglonglonglonglonglongvoidsetExternalStorageWriteTimeMs(long timeMs) Sets the total external-storage write time summed on the driver from the successful task-output rows.voidsetFailedExternalStorageRegions(Set<String> failedRegions) Sets the deduplicated failed external-storage regions collected from successful Spark task output.voidsetPerPartitionRecordCounts(Map<Integer, Long> counts) Sets the per-partition record counts collected from the Spark DAG output viacollect().voidsetVeniceWriteTimeMs(long timeMs) Sets the total Venice write time summed on the driver from the successful task-output rows.voidtrackCompressedValueSize(int size) voidtrackDuplicateKeyWithDistinctValue(int count) voidtrackDuplicateKeyWithIdenticalValue(int count) voidvoidtrackExternalStorageWriteTime(long timeMs) Report elapsed wall-clock time this task spent inside the external-storage write path.voidtrackFailedExternalStorageRegion(String regionName) Report that the external writer forregionNameexhausted its retry budget and was disabled for the remainder of the task.voidtrackGzipCompressedValueSize(int size) voidtrackIncrementalPushThrottledTime(long timeMs) voidtrackKeySize(int size) voidtrackLargestUncompressedValueSize(int size) This accumulator performs a 'max' operation, which is not natively supported by either Spark or Hadoop.voidvoidvoidvoidvoidvoidvoidtrackUncompressedValueSize(int size) voidtrackVeniceWriteTime(long timeMs) Report elapsed wall-clock time this task spent invoking the Venice/Kafka write path: theVeniceWriter.putinvocations plus flushing and closing the Venice writer.voidvoidtrackZstdCompressedValueSize(int size) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linkedin.venice.hadoop.task.datawriter.DataWriterTaskTracker
getTotalPutOrDeleteRecordsCount, trackPutOrDeleteRecordMethods inherited from interface com.linkedin.venice.hadoop.task.TaskTracker
getProgress, heartbeat
-
Constructor Details
-
SparkDataWriterTaskTracker
-
-
Method Details
-
trackSprayAllPartitions
public void trackSprayAllPartitions()- Specified by:
trackSprayAllPartitionsin interfaceDataWriterTaskTracker
-
trackEmptyRecord
public void trackEmptyRecord()- Specified by:
trackEmptyRecordin interfaceDataWriterTaskTracker
-
trackKeySize
public void trackKeySize(int size) - Specified by:
trackKeySizein interfaceDataWriterTaskTracker
-
trackUncompressedValueSize
public void trackUncompressedValueSize(int size) - Specified by:
trackUncompressedValueSizein interfaceDataWriterTaskTracker
-
trackLargestUncompressedValueSize
public void trackLargestUncompressedValueSize(int size) Description copied from interface:DataWriterTaskTrackerThis accumulator performs a 'max' operation, which is not natively supported by either Spark or Hadoop. It is implemented using a custom accumulator in Spark.- Specified by:
trackLargestUncompressedValueSizein interfaceDataWriterTaskTracker
-
trackCompressedValueSize
public void trackCompressedValueSize(int size) - Specified by:
trackCompressedValueSizein interfaceDataWriterTaskTracker
-
trackGzipCompressedValueSize
public void trackGzipCompressedValueSize(int size) - Specified by:
trackGzipCompressedValueSizein interfaceDataWriterTaskTracker
-
trackZstdCompressedValueSize
public void trackZstdCompressedValueSize(int size) - Specified by:
trackZstdCompressedValueSizein interfaceDataWriterTaskTracker
-
trackWriteAclAuthorizationFailure
public void trackWriteAclAuthorizationFailure()- Specified by:
trackWriteAclAuthorizationFailurein interfaceDataWriterTaskTracker
-
trackRecordTooLargeFailure
public void trackRecordTooLargeFailure()- Specified by:
trackRecordTooLargeFailurein interfaceDataWriterTaskTracker
-
trackUncompressedRecordTooLargeFailure
public void trackUncompressedRecordTooLargeFailure()- Specified by:
trackUncompressedRecordTooLargeFailurein interfaceDataWriterTaskTracker
-
trackRecordSentToPubSub
public void trackRecordSentToPubSub()- Specified by:
trackRecordSentToPubSubin interfaceDataWriterTaskTracker
-
trackDuplicateKeyWithDistinctValue
public void trackDuplicateKeyWithDistinctValue(int count) - Specified by:
trackDuplicateKeyWithDistinctValuein interfaceDataWriterTaskTracker
-
trackDuplicateKeyWithIdenticalValue
public void trackDuplicateKeyWithIdenticalValue(int count) - Specified by:
trackDuplicateKeyWithIdenticalValuein interfaceDataWriterTaskTracker
-
trackRepushTtlFilteredRecord
public void trackRepushTtlFilteredRecord()- Specified by:
trackRepushTtlFilteredRecordin interfaceDataWriterTaskTracker
-
trackIncrementalPushThrottledTime
public void trackIncrementalPushThrottledTime(long timeMs) - Specified by:
trackIncrementalPushThrottledTimein interfaceDataWriterTaskTracker
-
trackFailedExternalStorageRegion
Description copied from interface:DataWriterTaskTrackerReport that the external writer forregionNameexhausted its retry budget and was disabled for the remainder of the task. Callers should report each region at most once per task.- Specified by:
trackFailedExternalStorageRegionin interfaceDataWriterTaskTracker
-
trackExternalStorageWriteTime
public void trackExternalStorageWriteTime(long timeMs) Description copied from interface:DataWriterTaskTrackerReport elapsed wall-clock time this task spent inside the external-storage write path. This covers the complete external leg: the per-region write throttling wait, theExternalStorageWriter.batchPutcalls including their retries and retry backoff sleeps, the externalflush, and the externalclose. It excludes anything spent producing to Venice/Kafka.Callers report monotonic deltas as they accrue, so the aggregate is the sum of per-task durations, not the push's wall-clock duration: with N concurrent data-writer tasks the total can be up to N times the push's elapsed time.
- Specified by:
trackExternalStorageWriteTimein interfaceDataWriterTaskTracker
-
trackVeniceWriteTime
public void trackVeniceWriteTime(long timeMs) Description copied from interface:DataWriterTaskTrackerReport elapsed wall-clock time this task spent invoking the Venice/Kafka write path: theVeniceWriter.putinvocations plus flushing and closing the Venice writer. It excludes anything spent in the external-storage path.Same aggregation semantics as
DataWriterTaskTracker.trackExternalStorageWriteTime(long): summed task durations, not push wall-clock time.- Specified by:
trackVeniceWriteTimein interfaceDataWriterTaskTracker
-
trackPartitionWriterClose
public void trackPartitionWriterClose()- Specified by:
trackPartitionWriterClosein interfaceDataWriterTaskTracker
-
getSprayAllPartitionsCount
public long getSprayAllPartitionsCount()- Specified by:
getSprayAllPartitionsCountin interfaceDataWriterTaskTracker
-
getTotalKeySize
public long getTotalKeySize()- Specified by:
getTotalKeySizein interfaceDataWriterTaskTracker
-
getTotalValueSize
public long getTotalValueSize()- Specified by:
getTotalValueSizein interfaceDataWriterTaskTracker
-
getTotalUncompressedValueSize
public long getTotalUncompressedValueSize()- Specified by:
getTotalUncompressedValueSizein interfaceDataWriterTaskTracker
-
getLargestUncompressedValueSize
public int getLargestUncompressedValueSize()Description copied from interface:DataWriterTaskTrackerThis accumulator performs a 'max' operation, which is not natively supported by either Spark or Hadoop. It is implemented using a custom accumulator in Spark.- Specified by:
getLargestUncompressedValueSizein interfaceDataWriterTaskTracker
-
getTotalGzipCompressedValueSize
public long getTotalGzipCompressedValueSize()- Specified by:
getTotalGzipCompressedValueSizein interfaceDataWriterTaskTracker
-
getTotalZstdCompressedValueSize
public long getTotalZstdCompressedValueSize()- Specified by:
getTotalZstdCompressedValueSizein interfaceDataWriterTaskTracker
-
getRecordTooLargeFailureCount
public long getRecordTooLargeFailureCount()- Specified by:
getRecordTooLargeFailureCountin interfaceDataWriterTaskTracker
-
getUncompressedRecordTooLargeFailureCount
public long getUncompressedRecordTooLargeFailureCount()- Specified by:
getUncompressedRecordTooLargeFailureCountin interfaceDataWriterTaskTracker
-
getWriteAclAuthorizationFailureCount
public long getWriteAclAuthorizationFailureCount()- Specified by:
getWriteAclAuthorizationFailureCountin interfaceDataWriterTaskTracker
-
getDuplicateKeyWithDistinctValueCount
public long getDuplicateKeyWithDistinctValueCount()- Specified by:
getDuplicateKeyWithDistinctValueCountin interfaceDataWriterTaskTracker
-
getOutputRecordsCount
public long getOutputRecordsCount()- Specified by:
getOutputRecordsCountin interfaceDataWriterTaskTracker
-
getPartitionWriterCloseCount
public long getPartitionWriterCloseCount()- Specified by:
getPartitionWriterCloseCountin interfaceDataWriterTaskTracker
-
getRepushTtlFilterCount
public long getRepushTtlFilterCount()- Specified by:
getRepushTtlFilterCountin interfaceDataWriterTaskTracker
-
getIncrementalPushThrottledTimeMs
public long getIncrementalPushThrottledTimeMs()- Specified by:
getIncrementalPushThrottledTimeMsin interfaceDataWriterTaskTracker
-
setPerPartitionRecordCounts
Sets the per-partition record counts collected from the Spark DAG output viacollect(). -
setFailedExternalStorageRegions
Sets the deduplicated failed external-storage regions collected from successful Spark task output. -
setExternalStorageWriteTimeMs
public void setExternalStorageWriteTimeMs(long timeMs) Sets the total external-storage write time summed on the driver from the successful task-output rows. -
setVeniceWriteTimeMs
public void setVeniceWriteTimeMs(long timeMs) Sets the total Venice write time summed on the driver from the successful task-output rows. -
getExternalStorageWriteTimeMs
public long getExternalStorageWriteTimeMs()- Specified by:
getExternalStorageWriteTimeMsin interfaceDataWriterTaskTracker- Returns:
- the summed per-task duration (ms) spent in the external-storage write path across all successful
task outputs of this push. See
DataWriterTaskTracker.trackExternalStorageWriteTime(long)for exactly what is included; this is not the push's wall-clock time.
-
getVeniceWriteTimeMs
public long getVeniceWriteTimeMs()- Specified by:
getVeniceWriteTimeMsin interfaceDataWriterTaskTracker- Returns:
- the summed per-task duration (ms) spent in the Venice/Kafka write path across all successful task
outputs of this push. See
DataWriterTaskTracker.trackVeniceWriteTime(long); this is not the push's wall-clock time.
-
getPerPartitionRecordCounts
Description copied from interface:DataWriterTaskTrackerReturns per-partition record counts collected during the data writer job. For the Spark path, these are collected viacollect()on the DAG output- Specified by:
getPerPartitionRecordCountsin interfaceDataWriterTaskTracker- Returns:
- Map of partition ID to record count, or empty map if not available.
-
getFailedExternalStorageRegions
Description copied from interface:DataWriterTaskTrackerReturns the set of regions whose external writers exhausted retries and were reported by one or more data-writer tasks. Implementations should return an immutable or defensive-copy snapshot.- Specified by:
getFailedExternalStorageRegionsin interfaceDataWriterTaskTracker
-