|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crunch.types.avro.Avros
public class Avros
Defines static methods that are analogous to the methods defined in
AvroTypeFamily
for convenient static importing.
Field Summary | |
---|---|
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
|
Method Summary | ||
---|---|---|
static AvroType<Boolean> |
booleans()
|
|
static AvroType<ByteBuffer> |
bytes()
|
|
static void |
checkCombiningSpecificAndReflectionSchemas()
|
|
static
|
collections(PType<T> ptype)
|
|
static void |
configureReflectDataFactory(org.apache.hadoop.conf.Configuration conf)
|
|
static
|
containers(Class<T> clazz)
|
|
static
|
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
|
getPrimitiveType(Class<T> clazz)
|
|
static ReflectDataFactory |
getReflectDataFactory(org.apache.hadoop.conf.Configuration conf)
|
|
static AvroType<Integer> |
ints()
|
|
static
|
jsons(Class<T> clazz)
|
|
static AvroType<Long> |
longs()
|
|
static
|
maps(PType<T> ptype)
|
|
static AvroType<Void> |
nulls()
|
|
static
|
pairs(PType<V1> p1,
PType<V2> p2)
|
|
static
|
quads(PType<V1> p1,
PType<V2> p2,
PType<V3> p3,
PType<V4> p4)
|
|
static
|
records(Class<T> clazz)
|
|
static
|
reflects(Class<T> clazz)
|
|
static
|
register(Class<T> clazz,
AvroType<T> ptype)
|
|
static
|
specifics(Class<T> clazz)
|
|
static AvroType<String> |
strings()
|
|
static
|
tableOf(PType<K> key,
PType<V> value)
|
|
static
|
triples(PType<V1> p1,
PType<V2> p2,
PType<V3> p3)
|
|
static
|
tuples(Class<T> clazz,
PType... ptypes)
|
|
static AvroType<TupleN> |
tuples(PType... ptypes)
|
|
static
|
writables(Class<T> clazz)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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<String,org.apache.avro.util.Utf8> STRING_TO_UTF8
public static MapFn<Object,ByteBuffer> BYTES_IN
Method Detail |
---|
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 <T> void register(Class<T> clazz, AvroType<T> ptype)
public static <T> PType<T> getPrimitiveType(Class<T> clazz)
public static final AvroType<Void> nulls()
public static final AvroType<String> strings()
public static final AvroType<Long> longs()
public static final AvroType<Integer> ints()
public static final AvroType<Float> floats()
public static final AvroType<Double> doubles()
public static final AvroType<Boolean> booleans()
public static final AvroType<ByteBuffer> bytes()
public static final <T> AvroType<T> records(Class<T> clazz)
public static final AvroType<org.apache.avro.generic.GenericData.Record> generics(org.apache.avro.Schema schema)
public static final <T> AvroType<T> containers(Class<T> clazz)
public static final <T extends org.apache.avro.specific.SpecificRecord> AvroType<T> specifics(Class<T> clazz)
public static final <T> AvroType<T> reflects(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 <T> AvroType<Map<String,T>> maps(PType<T> ptype)
public static final <V1,V2> AvroType<Pair<V1,V2>> pairs(PType<V1> p1, PType<V2> p2)
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 AvroType<TupleN> tuples(PType... ptypes)
public static <T extends Tuple> AvroType<T> tuples(Class<T> clazz, PType... ptypes)
public static final <S,T> AvroType<T> derived(Class<T> clazz, MapFn<S,T> inputFn, MapFn<T,S> outputFn, PType<S> base)
public static <T> PType<T> jsons(Class<T> clazz)
public static final <K,V> org.apache.crunch.types.avro.AvroTableType<K,V> tableOf(PType<K> key, PType<V> value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |