public class Avros extends Object
AvroTypeFamily
for convenient static importing.Modifier and Type | Field and Description |
---|---|
static MapFn<Object,ByteBuffer> |
BYTES_IN |
static boolean |
CAN_COMBINE_SPECIFIC_AND_REFLECT_SCHEMAS
Older versions of Avro (i.e., before 1.7.0) do not support schemas that are
composed of a mix of specific and reflection-based schemas.
|
static ReflectDataFactory |
REFLECT_DATA_FACTORY
The instance we use for generating reflected schemas.
|
static String |
REFLECT_DATA_FACTORY_CLASS
The name of the configuration parameter that tracks which reflection
factory to use.
|
static MapFn<String,org.apache.avro.util.Utf8> |
STRING_TO_UTF8 |
static MapFn<CharSequence,String> |
UTF8_TO_STRING |
Modifier and Type | Method and Description |
---|---|
static AvroType<Boolean> |
booleans() |
static AvroType<ByteBuffer> |
bytes() |
static void |
checkCombiningSpecificAndReflectionSchemas() |
static <T> AvroType<Collection<T>> |
collections(PType<T> ptype) |
static void |
configureReflectDataFactory(org.apache.hadoop.conf.Configuration conf) |
static <T> AvroType<T> |
containers(Class<T> clazz) |
static <S,T> AvroType<T> |
derived(Class<T> clazz,
MapFn<S,T> inputFn,
MapFn<T,S> outputFn,
PType<S> base) |
static AvroType<Double> |
doubles() |
static AvroType<Float> |
floats() |
static AvroType<org.apache.avro.generic.GenericData.Record> |
generics(org.apache.avro.Schema schema) |
static <T> PType<T> |
getPrimitiveType(Class<T> clazz) |
static ReflectDataFactory |
getReflectDataFactory(org.apache.hadoop.conf.Configuration conf) |
static AvroType<Integer> |
ints() |
static <T> PType<T> |
jsons(Class<T> clazz) |
static AvroType<Long> |
longs() |
static <T> AvroType<Map<String,T>> |
maps(PType<T> ptype) |
static AvroType<Void> |
nulls() |
static <V1,V2> AvroType<Pair<V1,V2>> |
pairs(PType<V1> p1,
PType<V2> p2) |
static <V1,V2,V3,V4> |
quads(PType<V1> p1,
PType<V2> p2,
PType<V3> p3,
PType<V4> p4) |
static <T> AvroType<T> |
records(Class<T> clazz) |
static <T> AvroType<T> |
reflects(Class<T> clazz) |
static <T> void |
register(Class<T> clazz,
AvroType<T> ptype) |
static <T extends org.apache.avro.specific.SpecificRecord> |
specifics(Class<T> clazz) |
static AvroType<String> |
strings() |
static <K,V> org.apache.crunch.types.avro.AvroTableType<K,V> |
tableOf(PType<K> key,
PType<V> value) |
static <V1,V2,V3> AvroType<Tuple3<V1,V2,V3>> |
triples(PType<V1> p1,
PType<V2> p2,
PType<V3> p3) |
static <T extends Tuple> |
tuples(Class<T> clazz,
PType... ptypes) |
static AvroType<TupleN> |
tuples(PType... ptypes) |
static <T extends org.apache.hadoop.io.Writable> |
writables(Class<T> clazz) |
public static final boolean CAN_COMBINE_SPECIFIC_AND_REFLECT_SCHEMAS
public static ReflectDataFactory REFLECT_DATA_FACTORY
public static final String REFLECT_DATA_FACTORY_CLASS
public static MapFn<CharSequence,String> UTF8_TO_STRING
public static MapFn<Object,ByteBuffer> BYTES_IN
public static void configureReflectDataFactory(org.apache.hadoop.conf.Configuration conf)
public static ReflectDataFactory getReflectDataFactory(org.apache.hadoop.conf.Configuration conf)
public static void checkCombiningSpecificAndReflectionSchemas()
public static final AvroType<ByteBuffer> bytes()
public static final AvroType<org.apache.avro.generic.GenericData.Record> generics(org.apache.avro.Schema schema)
public static final <T extends org.apache.avro.specific.SpecificRecord> AvroType<T> specifics(Class<T> clazz)
public static final <T extends org.apache.hadoop.io.Writable> AvroType<T> writables(Class<T> clazz)
public static final <T> AvroType<Collection<T>> collections(PType<T> ptype)
public static final <V1,V2,V3> AvroType<Tuple3<V1,V2,V3>> triples(PType<V1> p1, PType<V2> p2, PType<V3> p3)
public static final <V1,V2,V3,V4> AvroType<Tuple4<V1,V2,V3,V4>> quads(PType<V1> p1, PType<V2> p2, PType<V3> p3, PType<V4> p4)
public static final <S,T> AvroType<T> derived(Class<T> clazz, MapFn<S,T> inputFn, MapFn<T,S> outputFn, PType<S> base)
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.