Uses of Class
org.apache.avro.Schema

Packages that use Schema
org.apache.avro Avro kernel classes. 
org.apache.avro.compiler.idl   
org.apache.avro.compiler.specific   
org.apache.avro.file A container file for Avro data. 
org.apache.avro.generic A generic representation for Avro data. 
org.apache.avro.io Utilities for Encoding and Decoding Avro data. 
org.apache.avro.io.parsing Implementation of Avro schemas as LL(1) grammars. 
org.apache.avro.ipc Support for inter-process calls. 
org.apache.avro.ipc.generic   
org.apache.avro.ipc.reflect   
org.apache.avro.ipc.specific   
org.apache.avro.ipc.trace   
org.apache.avro.mapred Run Hadoop MapReduce jobs over Avro data, with map and reduce functions written in Java. 
org.apache.avro.mapred.tether Run Hadoop MapReduce jobs over Avro data, with map and reduce functions run in a sub-process. 
org.apache.avro.reflect Use Java reflection to generate schemas and protocols for existing classes. 
org.apache.avro.specific Generate specific Java classes for schemas and protocols. 
 

Uses of Schema in org.apache.avro
 

Fields in org.apache.avro declared as Schema
static Schema Protocol.SYSTEM_ERROR
          An error that can be thrown by any message.
static Schema Protocol.SYSTEM_ERRORS
          Union type for generating system errors.
 

Methods in org.apache.avro that return Schema
static Schema Schema.applyAliases(Schema writer, Schema reader)
          Rewrite a writer's schema using the aliases from a reader's schema.
static Schema Schema.create(Schema.Type type)
          Create a schema for a primitive type.
static Schema Schema.createArray(Schema elementType)
          Create an array schema.
static Schema Schema.createEnum(String name, String doc, String namespace, List<String> values)
          Create an enum schema.
static Schema Schema.createFixed(String name, String doc, String space, int size)
          Create a union schema.
static Schema Schema.createMap(Schema valueType)
          Create a map schema.
static Schema Schema.createRecord(List<Schema.Field> fields)
          Create an anonymous record schema.
static Schema Schema.createRecord(String name, String doc, String namespace, boolean isError)
          Create a named record schema.
static Schema Schema.createUnion(List<Schema> types)
          Create a union schema.
 Schema Schema.getElementType()
          If this is an array, returns its element type.
 Schema Protocol.Message.getErrors()
          Errors that might be thrown.
 Schema Protocol.Message.getRequest()
          The parameters of this message.
 Schema Protocol.Message.getResponse()
          The returned data.
 Schema Protocol.getType(String name)
          Returns the named type.
 Schema UnresolvedUnionException.getUnionSchema()
           
 Schema Schema.getValueType()
          If this is a map, returns its value type.
static Schema Schema.parse(File file)
          Constructs a Schema object from JSON schema file file.
static Schema Schema.parse(InputStream in)
          Constructs a Schema object from JSON schema stream in.
static Schema Schema.parse(String jsonSchema)
          Construct a schema from JSON text.
 Schema Schema.Field.schema()
          This field's Schema.
 

Methods in org.apache.avro that return types with arguments of type Schema
 Collection<Schema> Protocol.getTypes()
          The types of this protocol.
 List<Schema> Schema.getTypes()
          If this is a union, returns its types.
 

Methods in org.apache.avro with parameters of type Schema
static Schema Schema.applyAliases(Schema writer, Schema reader)
          Rewrite a writer's schema using the aliases from a reader's schema.
static Schema Schema.createArray(Schema elementType)
          Create an array schema.
static Schema Schema.createMap(Schema valueType)
          Create a map schema.
 Protocol.Message Protocol.createMessage(String name, String doc, Schema request)
          Create a one-way message.
 Protocol.Message Protocol.createMessage(String name, String doc, Schema request, Schema response, Schema errors)
          Create a two-way message.
 

Method parameters in org.apache.avro with type arguments of type Schema
static Schema Schema.createUnion(List<Schema> types)
          Create a union schema.
 void Protocol.setTypes(Collection<Schema> newTypes)
          Set the types of this protocol.
 

Constructors in org.apache.avro with parameters of type Schema
Schema.Field(String name, Schema schema, String doc, JsonNode defaultValue)
           
Schema.Field(String name, Schema schema, String doc, JsonNode defaultValue, Schema.Field.Order order)
           
UnresolvedUnionException(Schema unionSchema, Object unresolvedDatum)
           
 

Uses of Schema in org.apache.avro.compiler.idl
 

Methods in org.apache.avro.compiler.idl that return Schema
 Schema Idl.ArrayType()
           
 Schema Idl.EnumDeclaration()
           
 Schema Idl.FixedDeclaration()
           
 Schema Idl.FormalParameters()
           
 Schema Idl.ImportSchema()
           
 Schema Idl.MapType()
           
 Schema Idl.NamedSchemaDeclaration()
           
 Schema Idl.PrimitiveType()
           
 Schema Idl.RecordDeclaration()
           
 Schema Idl.ReferenceType()
          A reference to some other existing type
 Schema Idl.ResultType()
          Result types are like other types, except we provide "void" as an alias of "null"
 Schema Idl.Type()
           
 Schema Idl.UnionDefinition()
           
 

Methods in org.apache.avro.compiler.idl with parameters of type Schema
 void Idl.VariableDeclarator(Schema type, List<Schema.Field> fields)
           
 

Method parameters in org.apache.avro.compiler.idl with type arguments of type Schema
 void Idl.ErrorList(List<Schema> errors)
           
 

Uses of Schema in org.apache.avro.compiler.specific
 

Methods in org.apache.avro.compiler.specific with parameters of type Schema
static String SpecificCompiler.javaType(Schema schema)
          Utility for template use.
static String SpecificCompiler.javaUnbox(Schema schema)
          Utility for template use.
 

Constructors in org.apache.avro.compiler.specific with parameters of type Schema
SpecificCompiler(Schema schema)
           
 

Uses of Schema in org.apache.avro.file
 

Methods in org.apache.avro.file that return Schema
 Schema DataFileReader12.getSchema()
          Return the schema used in this file.
 Schema FileReader.getSchema()
          Return the schema for data in this file.
 Schema DataFileStream.getSchema()
          Return the schema used in this file.
 

Methods in org.apache.avro.file with parameters of type Schema
 DataFileWriter<D> DataFileWriter.create(Schema schema, File file)
          Open a new file for data matching a schema.
 DataFileWriter<D> DataFileWriter.create(Schema schema, OutputStream outs)
          Open a new file for data matching a schema.
 

Uses of Schema in org.apache.avro.generic
 

Methods in org.apache.avro.generic that return Schema
protected  Schema GenericData.getEnumSchema(Object enu)
          Called to obtain the schema of a enum.
protected  Schema GenericData.getFixedSchema(Object fixed)
          Called to obtain the schema of a fixed.
protected  Schema GenericData.getRecordSchema(Object record)
          Called to obtain the schema of a record.
 Schema GenericContainer.getSchema()
          The schema of this instance.
 Schema GenericData.Record.getSchema()
           
 Schema GenericData.Array.getSchema()
           
 Schema GenericData.Fixed.getSchema()
           
 Schema GenericData.EnumSymbol.getSchema()
           
 Schema GenericData.induce(Object datum)
          Create a schema given an example datum.
 

Methods in org.apache.avro.generic with parameters of type Schema
 int GenericData.compare(Object o1, Object o2, Schema s)
          Compare objects according to their schema.
protected  int GenericData.compare(Object o1, Object o2, Schema s, boolean equals)
          Comparison implementation.
protected  Object GenericDatumReader.createEnum(String symbol, Schema schema)
          Called to create an enum value.
protected  Object GenericDatumReader.createFixed(Object old, byte[] bytes, Schema schema)
          Called to create an fixed value.
protected  Object GenericDatumReader.createFixed(Object old, Schema schema)
          Called to create an fixed value.
protected  ResolvingDecoder GenericDatumReader.getResolver(Schema actual, Schema expected)
          Gets a resolving decoder for use by this GenericDatumReader.
 int GenericData.hashCode(Object o, Schema s)
          Compute a hash code according to a schema, consistent with GenericData.compare(Object,Object,Schema).
protected  int GenericData.hashCodeAdd(int hashCode, Object o, Schema s)
          Add the hash code for an object into an accumulated hash code.
protected  boolean GenericData.instanceOf(Schema schema, Object datum)
          Called by GenericData.resolveUnion(Schema,Object).
protected  Object GenericDatumReader.newArray(Object old, int size, Schema schema)
          Called to create new array instances.
protected  Object GenericDatumReader.newRecord(Object old, Schema schema)
          Called to create new record instances.
protected  Object GenericDatumReader.read(Object old, Schema expected, ResolvingDecoder in)
          Called to read data.
protected  Object GenericDatumReader.readArray(Object old, Schema expected, ResolvingDecoder in)
          Called to read an array instance.
protected  Object GenericDatumReader.readEnum(Schema expected, Decoder in)
          Called to read an enum value.
protected  Object GenericDatumReader.readFixed(Object old, Schema expected, Decoder in)
          Called to read a fixed value.
protected  Object GenericDatumReader.readInt(Object old, Schema expected, Decoder in)
          Called to read integers.
protected  Object GenericDatumReader.readMap(Object old, Schema expected, ResolvingDecoder in)
          Called to read a map instance.
protected  Object GenericDatumReader.readRecord(Object old, Schema expected, ResolvingDecoder in)
          Called to read a record instance.
protected  Object GenericDatumReader.readString(Object old, Schema expected, Decoder in)
          Called to read strings.
 int GenericData.resolveUnion(Schema union, Object datum)
          Return the index for a datum within a union.
 void GenericDatumReader.setExpected(Schema reader)
          Set the reader's schema.
 void GenericDatumWriter.setSchema(Schema root)
           
protected  void GenericData.Fixed.setSchema(Schema schema)
           
 void GenericDatumReader.setSchema(Schema writer)
           
static void GenericDatumReader.skip(Schema schema, Decoder in)
          Skip an instance of a schema.
 boolean GenericData.validate(Schema schema, Object datum)
          Returns true if a Java datum matches a schema.
protected  void GenericDatumWriter.write(Schema schema, Object datum, Encoder out)
          Called to write data.
protected  void GenericDatumWriter.writeArray(Schema schema, Object datum, Encoder out)
          Called to write a array.
protected  void GenericDatumWriter.writeEnum(Schema schema, Object datum, Encoder out)
          Called to write an enum value.
protected  void GenericDatumWriter.writeFixed(Schema schema, Object datum, Encoder out)
          Called to write a fixed value.
protected  void GenericDatumWriter.writeMap(Schema schema, Object datum, Encoder out)
          Called to write a map.
protected  void GenericDatumWriter.writeRecord(Schema schema, Object datum, Encoder out)
          Called to write a record.
protected  void GenericDatumWriter.writeString(Schema schema, Object datum, Encoder out)
          Called to write a string.
 

Constructors in org.apache.avro.generic with parameters of type Schema
GenericData.Array(int capacity, Schema schema)
           
GenericData.EnumSymbol(Schema schema, String symbol)
           
GenericData.Fixed(Schema schema)
           
GenericData.Fixed(Schema schema, byte[] bytes)
           
GenericData.Record(Schema schema)
           
GenericDatumReader(Schema schema)
          Construct where the writer's and reader's schemas are the same.
GenericDatumReader(Schema writer, Schema reader)
          Construct given writer's and reader's schema.
GenericDatumReader(Schema writer, Schema reader, GenericData data)
           
GenericDatumWriter(Schema root)
           
GenericDatumWriter(Schema root, GenericData data)
           
 

Uses of Schema in org.apache.avro.io
 

Methods in org.apache.avro.io with parameters of type Schema
static int BinaryData.compare(byte[] b1, int s1, byte[] b2, int s2, Schema schema)
          Compare binary encoded data.
static int BinaryData.compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2, Schema schema)
          Compare binary encoded data.
static int BinaryData.hashCode(byte[] bytes, int start, int length, Schema schema)
          Hash binary encoded data.
 JsonDecoder DecoderFactory.jsonDecoder(Schema schema, InputStream input)
          Creates a JsonDecoder using the InputStrim provided for reading data that conforms to the Schema provided.
 JsonDecoder DecoderFactory.jsonDecoder(Schema schema, String input)
          Creates a JsonDecoder using the String provided for reading data that conforms to the Schema provided.
 JsonEncoder EncoderFactory.jsonEncoder(Schema schema, JsonGenerator gen)
          Creates a JsonEncoder using the JsonGenerator provided for output of data conforming to the Schema provided.
 JsonEncoder EncoderFactory.jsonEncoder(Schema schema, OutputStream out)
          Creates a JsonEncoder using the OutputStream provided for writing data conforming to the Schema provided.
static Object ResolvingDecoder.resolve(Schema writer, Schema reader)
          Produces an opaque resolver that can be used to construct a new ResolvingDecoder.ResolvingDecoder(Object, Decoder).
 ResolvingDecoder DecoderFactory.resolvingDecoder(Schema writer, Schema reader, Decoder wrapped)
          Creates a ResolvingDecoder wrapping the Decoder provided.
 void DatumReader.setSchema(Schema schema)
          Set the writer's schema.
 void DatumWriter.setSchema(Schema schema)
          Set the schema.
 ValidatingDecoder DecoderFactory.validatingDecoder(Schema schema, Decoder wrapped)
          Creates a ValidatingDecoder wrapping the Decoder provided.
 ValidatingEncoder EncoderFactory.validatingEncoder(Schema schema, Encoder encoder)
          Creates a ValidatingEncoder that wraps the Encoder provided.
 

Uses of Schema in org.apache.avro.io.parsing
 

Methods in org.apache.avro.io.parsing with parameters of type Schema
 Symbol ValidatingGrammarGenerator.generate(Schema schema)
          Returns the non-terminal that is the start symbol for the grammar for the given schema sc.
 Symbol JsonGrammarGenerator.generate(Schema schema)
          Returns the non-terminal that is the start symbol for the grammar for the grammar for the given schema sc.
 Symbol ValidatingGrammarGenerator.generate(Schema sc, Map<org.apache.avro.io.parsing.ValidatingGrammarGenerator.LitS,Symbol> seen)
          Returns the non-terminal that is the start symbol for the grammar for the given schema sc.
 Symbol JsonGrammarGenerator.generate(Schema sc, Map<org.apache.avro.io.parsing.ValidatingGrammarGenerator.LitS,Symbol> seen)
          Returns the non-terminal that is the start symbol for grammar of the given schema sc.
 Symbol ResolvingGrammarGenerator.generate(Schema writer, Schema reader)
          Resolves the writer schema writer and the reader schema reader and returns the start symbol for the grammar generated.
 Symbol ResolvingGrammarGenerator.generate(Schema writer, Schema reader, Map<org.apache.avro.io.parsing.ValidatingGrammarGenerator.LitS,Symbol> seen)
          Resolves the writer schema writer and the reader schema reader and returns the start symbol for the grammar generated.
 

Uses of Schema in org.apache.avro.ipc
 

Fields in org.apache.avro.ipc declared as Schema
static Schema HandshakeRequest.SCHEMA$
           
static Schema HandshakeMatch.SCHEMA$
           
static Schema HandshakeResponse.SCHEMA$
           
static Schema MD5.SCHEMA$
           
 

Methods in org.apache.avro.ipc that return Schema
 Schema HandshakeRequest.getSchema()
           
 Schema HandshakeResponse.getSchema()
           
 

Methods in org.apache.avro.ipc with parameters of type Schema
abstract  Exception Requestor.readError(Schema schema, Decoder in)
          Reads an error message.
abstract  Object Responder.readRequest(Schema actual, Schema expected, Decoder in)
          Reads a request message.
abstract  Object Requestor.readResponse(Schema schema, Decoder in)
          Reads a response message.
abstract  void Responder.writeError(Schema schema, Object error, Encoder out)
          Writes an error message.
abstract  void Requestor.writeRequest(Schema schema, Object request, Encoder out)
          Writes a request message.
abstract  void Responder.writeResponse(Schema schema, Object response, Encoder out)
          Writes a response message.
 

Uses of Schema in org.apache.avro.ipc.generic
 

Methods in org.apache.avro.ipc.generic with parameters of type Schema
protected  DatumReader<Object> GenericResponder.getDatumReader(Schema actual, Schema expected)
           
protected  DatumWriter<Object> GenericResponder.getDatumWriter(Schema schema)
           
 Exception GenericRequestor.readError(Schema schema, Decoder in)
           
 Object GenericResponder.readRequest(Schema actual, Schema expected, Decoder in)
           
 Object GenericRequestor.readResponse(Schema schema, Decoder in)
           
 void GenericResponder.writeError(Schema schema, Object error, Encoder out)
           
 void GenericRequestor.writeRequest(Schema schema, Object request, Encoder out)
           
 void GenericResponder.writeResponse(Schema schema, Object response, Encoder out)
           
 

Uses of Schema in org.apache.avro.ipc.reflect
 

Methods in org.apache.avro.ipc.reflect with parameters of type Schema
protected  DatumReader<Object> ReflectRequestor.getDatumReader(Schema schema)
           
protected  DatumReader<Object> ReflectResponder.getDatumReader(Schema actual, Schema expected)
           
protected  DatumWriter<Object> ReflectResponder.getDatumWriter(Schema schema)
           
protected  DatumWriter<Object> ReflectRequestor.getDatumWriter(Schema schema)
           
 void ReflectResponder.writeError(Schema schema, Object error, Encoder out)
           
 

Uses of Schema in org.apache.avro.ipc.specific
 

Methods in org.apache.avro.ipc.specific with parameters of type Schema
protected  DatumReader<Object> SpecificRequestor.getDatumReader(Schema schema)
           
protected  DatumReader<Object> SpecificResponder.getDatumReader(Schema actual, Schema expected)
           
protected  DatumWriter<Object> SpecificResponder.getDatumWriter(Schema schema)
           
protected  DatumWriter<Object> SpecificRequestor.getDatumWriter(Schema schema)
           
 Exception SpecificRequestor.readError(Schema schema, Decoder in)
           
 Object SpecificRequestor.readResponse(Schema schema, Decoder in)
           
 void SpecificResponder.writeError(Schema schema, Object error, Encoder out)
           
 void SpecificRequestor.writeRequest(Schema schema, Object request, Encoder out)
           
 

Uses of Schema in org.apache.avro.ipc.trace
 

Fields in org.apache.avro.ipc.trace declared as Schema
static Schema ID.SCHEMA$
           
static Schema SpanEvent.SCHEMA$
           
static Schema TimestampedEvent.SCHEMA$
           
static Schema Span.SCHEMA$
           
 

Methods in org.apache.avro.ipc.trace that return Schema
 Schema TimestampedEvent.getSchema()
           
 Schema Span.getSchema()
           
 

Uses of Schema in org.apache.avro.mapred
 

Methods in org.apache.avro.mapred that return Schema
static Schema AvroJob.getInputSchema(Configuration job)
          Return a job's map input schema.
static Schema Pair.getKeySchema(Schema pair)
          Return a pair's key schema.
static Schema AvroJob.getMapOutputSchema(Configuration job)
          Return a job's map output key schema.
static Schema AvroJob.getOutputSchema(Configuration job)
          Return a job's output key schema.
static Schema Pair.getPairSchema(Schema key, Schema value)
          Get a pair schema.
 Schema SequenceFileReader.getSchema()
           
 Schema Pair.getSchema()
           
static Schema Pair.getValueSchema(Schema pair)
          Return a pair's value schema.
 

Methods in org.apache.avro.mapred with parameters of type Schema
static Schema Pair.getKeySchema(Schema pair)
          Return a pair's key schema.
static Schema Pair.getPairSchema(Schema key, Schema value)
          Get a pair schema.
static Schema Pair.getValueSchema(Schema pair)
          Return a pair's value schema.
static void AvroJob.setInputSchema(JobConf job, Schema s)
          Configure a job's map input schema.
static void AvroJob.setMapOutputSchema(JobConf job, Schema s)
          Configure a job's map output schema.
static void AvroJob.setOutputSchema(JobConf job, Schema s)
          Configure a job's output schema.
 

Constructors in org.apache.avro.mapred with parameters of type Schema
Pair(K key, Schema keySchema, V value, Schema valueSchema)
           
Pair(Schema schema)
           
 

Uses of Schema in org.apache.avro.mapred.tether
 

Fields in org.apache.avro.mapred.tether declared as Schema
static Schema TaskType.SCHEMA$
           
 

Uses of Schema in org.apache.avro.reflect
 

Methods in org.apache.avro.reflect that return Schema
protected  Schema ReflectData.createFieldSchema(Field field, Map<String,Schema> names)
          Create a schema for a field.
protected  Schema ReflectData.AllowNull.createFieldSchema(Field field, Map<String,Schema> names)
           
protected  Schema ReflectData.createSchema(Type type, Map<String,Schema> names)
           
protected  Schema ReflectData.getRecordSchema(Object record)
           
static Schema ReflectData.makeNullable(Schema schema)
          Create and return a union of the null schema and the provided schema.
 

Methods in org.apache.avro.reflect with parameters of type Schema
protected  int ReflectData.compare(Object o1, Object o2, Schema s, boolean equals)
           
 Class ReflectData.getClass(Schema schema)
           
static Schema ReflectData.makeNullable(Schema schema)
          Create and return a union of the null schema and the provided schema.
protected  Object ReflectDatumReader.newArray(Object old, int size, Schema schema)
           
protected  Object ReflectDatumReader.readInt(Object old, Schema expected, Decoder in)
           
protected  Object ReflectDatumReader.readString(Object old, Schema s, Decoder in)
           
 boolean ReflectData.validate(Schema schema, Object datum)
           
protected  void ReflectDatumWriter.write(Schema schema, Object datum, Encoder out)
           
protected  void ReflectDatumWriter.writeString(Schema schema, Object datum, Encoder out)
           
 

Method parameters in org.apache.avro.reflect with type arguments of type Schema
protected  Schema ReflectData.createFieldSchema(Field field, Map<String,Schema> names)
          Create a schema for a field.
protected  Schema ReflectData.AllowNull.createFieldSchema(Field field, Map<String,Schema> names)
           
protected  Schema ReflectData.createSchema(Type type, Map<String,Schema> names)
           
 

Constructors in org.apache.avro.reflect with parameters of type Schema
ReflectDatumReader(Schema root)
          Construct where the writer's and reader's schemas are the same.
ReflectDatumReader(Schema writer, Schema reader)
          Construct given writer's and reader's schema.
ReflectDatumReader(Schema writer, Schema reader, ReflectData data)
           
ReflectDatumWriter(Schema root)
           
ReflectDatumWriter(Schema root, ReflectData reflectData)
           
 

Uses of Schema in org.apache.avro.specific
 

Methods in org.apache.avro.specific that return Schema
protected  Schema SpecificData.createSchema(Type type, Map<String,Schema> names)
          Create the schema for a Java type.
protected  Schema SpecificData.getEnumSchema(Object datum)
           
abstract  Schema SpecificRecordBase.getSchema()
           
abstract  Schema SpecificExceptionBase.getSchema()
           
 Schema SpecificData.getSchema(Type type)
          Find the schema for a Java type.
 

Methods in org.apache.avro.specific with parameters of type Schema
protected  int SpecificData.compare(Object o1, Object o2, Schema s, boolean eq)
           
protected  Object SpecificDatumReader.createEnum(String symbol, Schema schema)
           
protected  Object SpecificDatumReader.createFixed(Object old, Schema schema)
           
 Class SpecificData.getClass(Schema schema)
          Return the class that implements a schema, or null if none exists.
 String SpecificData.getClassName(Schema schema)
          Returns the Java class name indicated by a schema's name and namespace.
protected static Object SpecificDatumReader.newInstance(Class c, Schema s)
          Create an instance of a class.
protected  Object SpecificDatumReader.newRecord(Object old, Schema schema)
           
protected  void SpecificDatumWriter.writeEnum(Schema schema, Object datum, Encoder out)
           
 

Method parameters in org.apache.avro.specific with type arguments of type Schema
protected  Schema SpecificData.createSchema(Type type, Map<String,Schema> names)
          Create the schema for a Java type.
 

Constructors in org.apache.avro.specific with parameters of type Schema
SpecificDatumReader(Schema schema)
          Construct where the writer's and reader's schemas are the same.
SpecificDatumReader(Schema writer, Schema reader)
          Construct given writer's and reader's schema.
SpecificDatumReader(Schema writer, Schema reader, SpecificData data)
           
SpecificDatumWriter(Schema schema)
           
SpecificDatumWriter(Schema root, SpecificData specificData)
           
 



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