public class Encoders
extends Object
Encoder
.
Constructor and Description |
---|
Encoders() |
Modifier and Type | Method and Description |
---|---|
static <T> Encoder<T> |
bean(Class<T> beanClass)
Creates an encoder for Java Bean of type T.
|
static Encoder<byte[]> |
BINARY()
An encoder for arrays of bytes.
|
static Encoder<Boolean> |
BOOLEAN()
An encoder for nullable boolean type.
|
static Encoder<Byte> |
BYTE()
An encoder for nullable byte type.
|
static Encoder<java.sql.Date> |
DATE()
An encoder for nullable date type.
|
static Encoder<java.math.BigDecimal> |
DECIMAL()
An encoder for nullable decimal type.
|
static Encoder<Double> |
DOUBLE()
An encoder for nullable double type.
|
static Encoder<java.time.Duration> |
DURATION()
Creates an encoder that serializes instances of the
java.time.Duration class
to the internal representation of nullable Catalyst's DayTimeIntervalType. |
static Encoder<Float> |
FLOAT()
An encoder for nullable float type.
|
static Encoder<java.time.Instant> |
INSTANT()
Creates an encoder that serializes instances of the
java.time.Instant class
to the internal representation of nullable Catalyst's TimestampType. |
static Encoder<Integer> |
INT()
An encoder for nullable int type.
|
static <T> Encoder<T> |
javaSerialization(Class<T> clazz)
Creates an encoder that serializes objects of type T using generic Java serialization.
|
static <T> Encoder<T> |
javaSerialization(scala.reflect.ClassTag<T> evidence$2)
(Scala-specific) Creates an encoder that serializes objects of type T using generic Java
serialization.
|
static <T> Encoder<T> |
kryo(Class<T> clazz)
Creates an encoder that serializes objects of type T using Kryo.
|
static <T> Encoder<T> |
kryo(scala.reflect.ClassTag<T> evidence$1)
(Scala-specific) Creates an encoder that serializes objects of type T using Kryo.
|
static Encoder<java.time.LocalDate> |
LOCALDATE()
Creates an encoder that serializes instances of the
java.time.LocalDate class
to the internal representation of nullable Catalyst's DateType. |
static Encoder<java.time.LocalDateTime> |
LOCALDATETIME()
Creates an encoder that serializes instances of the
java.time.LocalDateTime class
to the internal representation of nullable Catalyst's TimestampNTZType. |
static Encoder<Long> |
LONG()
An encoder for nullable long type.
|
static Encoder<java.time.Period> |
PERIOD()
Creates an encoder that serializes instances of the
java.time.Period class
to the internal representation of nullable Catalyst's YearMonthIntervalType. |
static <T extends scala.Product> |
product(scala.reflect.api.TypeTags.TypeTag<T> evidence$5)
An encoder for Scala's product type (tuples, case classes, etc).
|
static Encoder<Object> |
scalaBoolean()
An encoder for Scala's primitive boolean type.
|
static Encoder<Object> |
scalaByte()
An encoder for Scala's primitive byte type.
|
static Encoder<Object> |
scalaDouble()
An encoder for Scala's primitive double type.
|
static Encoder<Object> |
scalaFloat()
An encoder for Scala's primitive float type.
|
static Encoder<Object> |
scalaInt()
An encoder for Scala's primitive int type.
|
static Encoder<Object> |
scalaLong()
An encoder for Scala's primitive long type.
|
static Encoder<Object> |
scalaShort()
An encoder for Scala's primitive short type.
|
static Encoder<Short> |
SHORT()
An encoder for nullable short type.
|
static Encoder<String> |
STRING()
An encoder for nullable string type.
|
static Encoder<java.sql.Timestamp> |
TIMESTAMP()
An encoder for nullable timestamp type.
|
static <T1,T2> Encoder<scala.Tuple2<T1,T2>> |
tuple(Encoder<T1> e1,
Encoder<T2> e2)
An encoder for 2-ary tuples.
|
static <T1,T2,T3> Encoder<scala.Tuple3<T1,T2,T3>> |
tuple(Encoder<T1> e1,
Encoder<T2> e2,
Encoder<T3> e3)
An encoder for 3-ary tuples.
|
static <T1,T2,T3,T4> |
tuple(Encoder<T1> e1,
Encoder<T2> e2,
Encoder<T3> e3,
Encoder<T4> e4)
An encoder for 4-ary tuples.
|
static <T1,T2,T3,T4,T5> |
tuple(Encoder<T1> e1,
Encoder<T2> e2,
Encoder<T3> e3,
Encoder<T4> e4,
Encoder<T5> e5)
An encoder for 5-ary tuples.
|
public static Encoder<Boolean> BOOLEAN()
scalaBoolean
.public static Encoder<Byte> BYTE()
scalaByte
.public static Encoder<Short> SHORT()
scalaShort
.public static Encoder<Integer> INT()
scalaInt
.public static Encoder<Long> LONG()
scalaLong
.public static Encoder<Float> FLOAT()
scalaFloat
.public static Encoder<Double> DOUBLE()
scalaDouble
.public static Encoder<String> STRING()
public static Encoder<java.math.BigDecimal> DECIMAL()
public static Encoder<java.sql.Date> DATE()
public static Encoder<java.time.LocalDate> LOCALDATE()
java.time.LocalDate
class
to the internal representation of nullable Catalyst's DateType.
public static Encoder<java.time.LocalDateTime> LOCALDATETIME()
java.time.LocalDateTime
class
to the internal representation of nullable Catalyst's TimestampNTZType.
public static Encoder<java.sql.Timestamp> TIMESTAMP()
public static Encoder<java.time.Instant> INSTANT()
java.time.Instant
class
to the internal representation of nullable Catalyst's TimestampType.
public static Encoder<byte[]> BINARY()
public static Encoder<java.time.Duration> DURATION()
java.time.Duration
class
to the internal representation of nullable Catalyst's DayTimeIntervalType.
public static Encoder<java.time.Period> PERIOD()
java.time.Period
class
to the internal representation of nullable Catalyst's YearMonthIntervalType.
public static <T> Encoder<T> bean(Class<T> beanClass)
T must be publicly accessible.
supported types for java bean field: - primitive types: boolean, int, double, etc. - boxed types: Boolean, Integer, Double, etc. - String - java.math.BigDecimal, java.math.BigInteger - time related: java.sql.Date, java.sql.Timestamp, java.time.LocalDate, java.time.Instant - collection types: array, java.util.List, and map - nested java bean.
beanClass
- (undocumented)public static <T> Encoder<T> kryo(scala.reflect.ClassTag<T> evidence$1)
T must be publicly accessible.
evidence$1
- (undocumented)public static <T> Encoder<T> kryo(Class<T> clazz)
T must be publicly accessible.
clazz
- (undocumented)public static <T> Encoder<T> javaSerialization(scala.reflect.ClassTag<T> evidence$2)
T must be publicly accessible.
evidence$2
- (undocumented)public static <T> Encoder<T> javaSerialization(Class<T> clazz)
T must be publicly accessible.
clazz
- (undocumented)public static <T1,T2> Encoder<scala.Tuple2<T1,T2>> tuple(Encoder<T1> e1, Encoder<T2> e2)
e1
- (undocumented)e2
- (undocumented)public static <T1,T2,T3> Encoder<scala.Tuple3<T1,T2,T3>> tuple(Encoder<T1> e1, Encoder<T2> e2, Encoder<T3> e3)
e1
- (undocumented)e2
- (undocumented)e3
- (undocumented)public static <T1,T2,T3,T4> Encoder<scala.Tuple4<T1,T2,T3,T4>> tuple(Encoder<T1> e1, Encoder<T2> e2, Encoder<T3> e3, Encoder<T4> e4)
e1
- (undocumented)e2
- (undocumented)e3
- (undocumented)e4
- (undocumented)public static <T1,T2,T3,T4,T5> Encoder<scala.Tuple5<T1,T2,T3,T4,T5>> tuple(Encoder<T1> e1, Encoder<T2> e2, Encoder<T3> e3, Encoder<T4> e4, Encoder<T5> e5)
e1
- (undocumented)e2
- (undocumented)e3
- (undocumented)e4
- (undocumented)e5
- (undocumented)public static <T extends scala.Product> Encoder<T> product(scala.reflect.api.TypeTags.TypeTag<T> evidence$5)
evidence$5
- (undocumented)public static Encoder<Object> scalaInt()
public static Encoder<Object> scalaLong()
public static Encoder<Object> scalaDouble()
public static Encoder<Object> scalaFloat()
public static Encoder<Object> scalaByte()
public static Encoder<Object> scalaShort()
public static Encoder<Object> scalaBoolean()