This project has retired. For details please refer to its Attic page.
AvroMode (Apache Crunch 0.9.0 API)

org.apache.crunch.types.avro
Enum AvroMode

java.lang.Object
  extended by java.lang.Enum<AvroMode>
      extended by org.apache.crunch.types.avro.AvroMode
All Implemented Interfaces:
Serializable, Comparable<AvroMode>, ReaderWriterFactory

public enum AvroMode
extends Enum<AvroMode>
implements ReaderWriterFactory


Enum Constant Summary
GENERIC
           
REFLECT
           
SPECIFIC
           
 
Field Summary
static String AVRO_MODE_PROPERTY
           
 
Method Summary
 void configure(org.apache.hadoop.conf.Configuration conf)
           
 void configure(FormatBundle bundle)
           
static AvroMode fromConfiguration(org.apache.hadoop.conf.Configuration conf)
           
static AvroMode fromType(AvroType<?> type)
           
 org.apache.avro.generic.GenericData getData()
           
<T> org.apache.avro.io.DatumReader<T>
getReader(org.apache.avro.Schema schema)
           
<T> org.apache.avro.io.DatumWriter<T>
getWriter(org.apache.avro.Schema schema)
           
 void override(ReaderWriterFactory factory)
           
static void setSpecificClassLoader(ClassLoader loader)
           
static AvroMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AvroMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

REFLECT

public static final AvroMode REFLECT

SPECIFIC

public static final AvroMode SPECIFIC

GENERIC

public static final AvroMode GENERIC
Field Detail

AVRO_MODE_PROPERTY

public static final String AVRO_MODE_PROPERTY
See Also:
Constant Field Values
Method Detail

values

public static AvroMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (AvroMode c : AvroMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static AvroMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromConfiguration

public static AvroMode fromConfiguration(org.apache.hadoop.conf.Configuration conf)

fromType

public static AvroMode fromType(AvroType<?> type)

setSpecificClassLoader

public static void setSpecificClassLoader(ClassLoader loader)

getData

public org.apache.avro.generic.GenericData getData()
Specified by:
getData in interface ReaderWriterFactory

getReader

public <T> org.apache.avro.io.DatumReader<T> getReader(org.apache.avro.Schema schema)
Specified by:
getReader in interface ReaderWriterFactory

getWriter

public <T> org.apache.avro.io.DatumWriter<T> getWriter(org.apache.avro.Schema schema)
Specified by:
getWriter in interface ReaderWriterFactory

override

public void override(ReaderWriterFactory factory)

configure

public void configure(org.apache.hadoop.conf.Configuration conf)

configure

public void configure(FormatBundle bundle)


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.