Package com.linkedin.venice.jobs
Class DataWriterComputeJob
java.lang.Object
com.linkedin.venice.jobs.DataWriterComputeJob
- All Implemented Interfaces:
ComputeJob,Closeable,AutoCloseable
- Direct Known Subclasses:
AbstractDataWriterSparkJob,DataWriterMRJob
An abstraction for executing and monitoring a data writer compute job running on any batch compute engine
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.linkedin.venice.jobs.ComputeJob
ComputeJob.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionPass-through the properties whose names start with:VeniceWriter.VENICE_WRITER_CONFIG_PREFIXConfigKeys.KAFKA_CONFIG_PREFIXVenicePushJobConstants.KIF_RECORD_READER_KAFKA_CONFIG_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(VeniceProperties properties) abstract voidconfigure(VeniceProperties props, PushJobSetting pushJobSetting) protected LongSupplierprotected abstract PushJobSettingReturns an immutable snapshot of per-stage diagnostic metrics, or empty if not supported by this compute engine.abstract DataWriterTaskTrackervoidkill()booleanWhether this engine validates the storage quota before writing any data (see the Spark data writer's pre-write intermediary stage, which measures the serialized input size and fails the job before writing if it exceeds the quota).static voidpopulateWithPassThroughConfigs(VeniceProperties props, DataWriterComputeJob.ConfigSetter configSetter) static voidpopulateWithPassThroughConfigs(VeniceProperties props, DataWriterComputeJob.ConfigSetter configSetter, List<String> passThroughConfigPrefix, String overridePrefix) Override the configs following the rules: Pass-through the properties whose names start with the prefixes defined in `passThroughConfigPrefix`. Pass-through the properties whose names starts with the prefix defined by another special propertyConfigKeys.PASS_THROUGH_CONFIG_PREFIXES_LIST_KEY. Override the properties that are specified with a particular `overridePrefix`.abstract voidvoidrunJob()voidsetCurrentStorageQuotaSupplier(LongSupplier currentStorageQuotaSupplier) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linkedin.venice.jobs.ComputeJob
close
-
Field Details
-
PASS_THROUGH_CONFIG_PREFIXES
Pass-through the properties whose names start with:
-
-
Constructor Details
-
DataWriterComputeJob
public DataWriterComputeJob()
-
-
Method Details
-
populateWithPassThroughConfigs
public static void populateWithPassThroughConfigs(VeniceProperties props, DataWriterComputeJob.ConfigSetter configSetter, List<String> passThroughConfigPrefix, String overridePrefix) Override the configs following the rules:- Pass-through the properties whose names start with the prefixes defined in `passThroughConfigPrefix`.
- Pass-through the properties whose names starts with the prefix defined by another special property
ConfigKeys.PASS_THROUGH_CONFIG_PREFIXES_LIST_KEY. - Override the properties that are specified with a particular `overridePrefix`.
-
populateWithPassThroughConfigs
public static void populateWithPassThroughConfigs(VeniceProperties props, DataWriterComputeJob.ConfigSetter configSetter) -
getTaskTracker
-
getStageMetricsSnapshot
Returns an immutable snapshot of per-stage diagnostic metrics, or empty if not supported by this compute engine. Overridden by Spark-based implementations. -
performsPreWriteQuotaCheck
public boolean performsPreWriteQuotaCheck()Whether this engine validates the storage quota before writing any data (see the Spark data writer's pre-write intermediary stage, which measures the serialized input size and fails the job before writing if it exceeds the quota). When this returnstrue, the driver-side post-write quota check inVenicePushJobis redundant and is skipped. The default isfalse(e.g. MapReduce), which keeps the driver-side post-write check as the authoritative quota gate. -
setCurrentStorageQuotaSupplier
-
getCurrentStorageQuotaSupplier
-
validateJob
public void validateJob() -
runComputeJob
public abstract void runComputeJob() -
configure
- Specified by:
configurein interfaceComputeJob
-
getPushJobSetting
-
configure
-
runJob
public void runJob()- Specified by:
runJobin interfaceComputeJob
-
kill
public void kill()- Specified by:
killin interfaceComputeJob
-
getStatus
- Specified by:
getStatusin interfaceComputeJob
-
getFailureReason
- Specified by:
getFailureReasonin interfaceComputeJob
-