abstract class BroadcastCompiler[T] extends InputLayers with InputOptPartitioner
Offers the interface for the data compilation supposed to be stored on a Spark org.apache.spark.broadcast.Broadcast variable.
Compiled data is an object instance of type T. The suggested use of this functionality is to: - perform the broadcast creations during the driver setting up. - send the broadcast variables to the compiler which is under creation as a parameter.
- T
the type of the object to be stored in the broadcast variable
- Alphabetic
- By Inheritance
- BroadcastCompiler
- InputOptPartitioner
- InputLayers
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
BroadcastCompiler(context: DriverContext, clazz: Class[T], id: String)
BroadcastCompiler constructor that specifies the compiler ID.
BroadcastCompiler constructor that specifies the compiler ID.
- context
The com.here.platform.data.processing.java.driver.DriverContext object that the compiler is running in.
- clazz
The class of type T.
- id
The ID for the compiler. Used to stored the fingerprint of the broadcast variable with an ID, which makes it independent of creation order.
-
new
BroadcastCompiler(context: DriverContext, clazz: Class[T])
BroadcastCompiler constructor.
BroadcastCompiler constructor.
- context
The com.here.platform.data.processing.java.driver.DriverContext object that the compiler is running in.
- clazz
The class of type T.
Abstract Value Members
-
abstract
def
calculateFingerprint(t: T): Int
Calculate the fingerprint of the compiled data.
Calculate the fingerprint of the compiled data.
- t
the data to calculate the fingerprint of
- returns
the fingerprint
- Attributes
- protected
- Note
fingerprint calculation needs to be stable to not compromise incremental compilation.
-
abstract
def
compile(input: JavaPairRDD[InKey, InMeta], parallelism: Int): T
Compiles an input metadata RDD into an object of data T.
Compiles an input metadata RDD into an object of data T.
This function needs to be overridden to perform the compilation of the input meta RDD.
- input
the input metadata RDD
- parallelism
the parallelism of the RDDs. This parameter is normally needed to get partitioners from com.here.platform.data.processing.java.compiler.InputOptPartitioner and/or from com.here.platform.data.processing.java.compiler.OutputOptPartitioner traits
- returns
the compilation result
- Attributes
- protected
-
abstract
def
inLayers: Map[String, Set[String]]
Layers of the input catalogs that should be queried and provided to the compiler, grouped by input catalog and identified by catalog id and layer ID.
Layers of the input catalogs that should be queried and provided to the compiler, grouped by input catalog and identified by catalog id and layer ID.
- Definition Classes
- InputLayers
-
abstract
def
inPartitioner(parallelism: Int): Option[PartitionerOfKey]
If the returned com.here.platform.data.processing.java.Java.Option is Empty, the Executor will use a default partitioner, if it is defined then the given partitioner will be applied when querying the input catalogs.
If the returned com.here.platform.data.processing.java.Java.Option is Empty, the Executor will use a default partitioner, if it is defined then the given partitioner will be applied when querying the input catalogs.
- parallelism
the parallelism of the partitioner
- returns
the input optional partitioner with the given parallelism
- Definition Classes
- InputOptPartitioner
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
compileBroadcast(parallelism: Int): Broadcast[T]
Performs the compilation and the related operations to create the broadcast variable and to update the fingerprints.
Performs the compilation and the related operations to create the broadcast variable and to update the fingerprints. The id passed to the constructor, if specified, is used as fingerprint ID.
This is the method to be called by the class users. Please note that it updates a mutable content in the com.here.platform.data.processing.java.driver.DriverContext object: it changes a shared status. Multiple calls to this functionality should then happen in a deterministic order.
- parallelism
the parallelism of the RDDs. This parameter is normally needed to get partitioners from com.here.platform.data.processing.java.compiler.InputOptPartitioner and/or from com.here.platform.data.processing.java.compiler.OutputOptPartitioner traits
- returns
the broadcast variable
-
final
def
compileBroadcastNoUpdateFingerprints(parallelism: Int): Broadcast[T]
Performs the compilation and the related operations to create the broadcast variable without updating the fingerprints.
Performs the compilation and the related operations to create the broadcast variable without updating the fingerprints. WARNING: the recompilation won't be triggered if a change of the broadcast object is detected.
- parallelism
the parallelism of the RDDs. This parameter is normally needed to get partitioners from com.here.platform.data.processing.java.compiler.InputOptPartitioner and/or from com.here.platform.data.processing.java.compiler.OutputOptPartitioner traits
- returns
the broadcast variable
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()