@InterfaceAudience.Public @InterfaceStability.Evolving public class HCatSchema extends Object implements Serializable
Constructor and Description |
---|
HCatSchema(List<HCatFieldSchema> fieldSchemas) |
Modifier and Type | Method and Description |
---|---|
void |
append(HCatFieldSchema hfs) |
boolean |
equals(Object obj) |
HCatFieldSchema |
get(int position) |
HCatFieldSchema |
get(String fieldName) |
List<String> |
getFieldNames() |
List<HCatFieldSchema> |
getFields()
Users are not allowed to modify the list directly, since HCatSchema
maintains internal state.
|
Integer |
getPosition(String fieldName)
Note : The position will be re-numbered when one of the preceding columns are removed.
|
String |
getSchemaAsTypeString() |
int |
hashCode() |
void |
remove(HCatFieldSchema hcatFieldSchema) |
int |
size() |
String |
toString() |
public HCatSchema(List<HCatFieldSchema> fieldSchemas)
fieldSchemas
- is now owned by HCatSchema. Any subsequent modifications
on fieldSchemas won't get reflected in HCatSchema. Each fieldSchema's name
in the list must be unique, otherwise throws IllegalArgumentException.public void append(HCatFieldSchema hfs) throws HCatException
HCatException
public List<HCatFieldSchema> getFields()
public Integer getPosition(String fieldName)
fieldName
- public HCatFieldSchema get(String fieldName) throws HCatException
HCatException
public HCatFieldSchema get(int position)
public int size()
public void remove(HCatFieldSchema hcatFieldSchema) throws HCatException
HCatException
public String getSchemaAsTypeString()
Copyright © 2017 The Apache Software Foundation. All rights reserved.