case class Mutation(schema: StructType = null, before: Array[Any] = null, after: Array[Any] = null) extends Product with Serializable
MUTATION vs. EVENT
Mutation is the general case of an Event Imagine a user impression/view stream - impressions/views are immutable events Imagine a stream of changes to a credit card transaction stream.
- transactions can be "corrected"/updated & deleted, besides being "inserted"
- This is one of the core difference between entity and event sources. Events are insert-only.
- (The other difference is Entites are stored in the warehouse typically as snapshots of the table as of midnight) In case of an update - one must produce both before and after values In case of a delete - only before is populated & after is left as null In case of a insert - only after is populated & before is left as null
TIME ASSUMPTIONS
The schema needs to contain a ts
(milliseconds as a java Long)
For the entities case, mutation_ts
when absent will use ts
as a replacement
TYPE CONVERSIONS
Java types corresponding to the schema types. StreamDecoder should produce mutations that comply. NOTE: everything is nullable (hence boxed) IntType java.lang.Integer LongType java.lang.Long DoubleType java.lang.Double FloatType java.lang.Float ShortType java.lang.Short BooleanType java.lang.Boolean ByteType java.lang.Byte StringType java.lang.String BinaryType Array[Byte] ListType java.util.List[Byte] MapType java.util.Map[Byte] StructType Array[Any]
- Alphabetic
- By Inheritance
- Mutation
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Mutation(schema: StructType = null, before: Array[Any] = null, after: Array[Any] = null)
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
- val after: Array[Any]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val before: Array[Any]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
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()
-
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()
- val schema: StructType
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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()