public class HCatFieldSchema
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
HCatFieldSchema.Category |
static class |
HCatFieldSchema.Type |
Constructor and Description |
---|
HCatFieldSchema(java.lang.String fieldName,
HCatFieldSchema.Type type,
HCatFieldSchema.Type mapKeyType,
HCatSchema mapValueSchema,
java.lang.String comment)
Constructor for constructing a MAP type HCatFieldSchema, passing type of key and value
|
HCatFieldSchema(java.lang.String fieldName,
HCatFieldSchema.Type type,
HCatSchema subSchema,
java.lang.String comment)
Constructor for constructing a ARRAY type or STRUCT type HCatFieldSchema, passing type and subschema
|
HCatFieldSchema(java.lang.String fieldName,
HCatFieldSchema.Type type,
java.lang.String comment)
Constructor constructing a primitive datatype HCatFieldSchema
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
HCatSchema |
getArrayElementSchema() |
HCatFieldSchema.Category |
getCategory()
Returns category of the field
|
java.lang.String |
getComment() |
HCatFieldSchema.Type |
getMapKeyType() |
HCatSchema |
getMapValueSchema() |
java.lang.String |
getName()
Returns name of the field
|
HCatSchema |
getStructSubSchema() |
HCatFieldSchema.Type |
getType()
Returns type of the field
|
java.lang.String |
getTypeString() |
int |
hashCode() |
boolean |
isComplex() |
java.lang.String |
toString() |
public HCatFieldSchema(java.lang.String fieldName, HCatFieldSchema.Type type, java.lang.String comment) throws HCatException
fieldName
- Name of the primitive fieldtype
- Type of the primitive fieldHCatException
- if call made on non-primitive typespublic HCatFieldSchema(java.lang.String fieldName, HCatFieldSchema.Type type, HCatSchema subSchema, java.lang.String comment) throws HCatException
fieldName
- Name of the array or struct fieldtype
- Type of the field - either Type.ARRAY or Type.STRUCTsubSchema
- - subschema of the struct, or element schema of the elements in the arrayHCatException
- if call made on Primitive or Map typespublic HCatFieldSchema(java.lang.String fieldName, HCatFieldSchema.Type type, HCatFieldSchema.Type mapKeyType, HCatSchema mapValueSchema, java.lang.String comment) throws HCatException
fieldName
- Name of the array or struct fieldtype
- Type of the field - must be Type.MAPmapKeyType
- - key type of the MapmapValueSchema
- - subschema of the value of the MapHCatException
- if call made on non-Map typespublic boolean isComplex()
public HCatFieldSchema.Type getType()
public HCatFieldSchema.Category getCategory()
public java.lang.String getName()
public java.lang.String getComment()
public HCatSchema getStructSubSchema() throws HCatException
HCatException
public HCatSchema getArrayElementSchema() throws HCatException
HCatException
public HCatFieldSchema.Type getMapKeyType() throws HCatException
HCatException
public HCatSchema getMapValueSchema() throws HCatException
HCatException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getTypeString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2012 The Apache Software Foundation