|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.plan.PlanUtils
public class PlanUtils
Nested Class Summary | |
---|---|
static class |
PlanUtils.ExpressionTypes
|
Constructor Summary | |
---|---|
PlanUtils()
|
Method Summary | |
---|---|
static tableDesc |
getDefaultTableDesc(String separatorCode)
Generate the table descriptor of MetadataTypedColumnsetSerDe with the separatorCode. |
static tableDesc |
getDefaultTableDesc(String separatorCode,
String columns)
Generate the table descriptor of MetadataTypedColumnsetSerDe with the separatorCode and column names (comma separated string). |
static tableDesc |
getDefaultTableDesc(String separatorCode,
String columns,
boolean lastColumnTakesRestOfTheLine)
Generate the table descriptor of MetadataTypedColumnsetSerDe with the separatorCode and column names (comma separated string), and whether the last column should take the rest of the line. |
static tableDesc |
getDefaultTableDesc(String separatorCode,
String columns,
String columnTypes,
boolean lastColumnTakesRestOfTheLine)
Generate the table descriptor of MetadataTypedColumnsetSerDe with the separatorCode and column names (comma separated string), and whether the last column should take the rest of the line. |
static List<FieldSchema> |
getFieldSchemasFromColumnInfo(Vector<ColumnInfo> cols,
String fieldPrefix)
Convert the ColumnInfo to FieldSchema. |
static List<FieldSchema> |
getFieldSchemasFromColumnList(List<exprNodeDesc> cols,
List<String> outputColumnNames,
int start,
String fieldPrefix)
Convert the ColumnList to FieldSchema list. |
static List<FieldSchema> |
getFieldSchemasFromColumnList(List<exprNodeDesc> cols,
String fieldPrefix)
Convert the ColumnList to FieldSchema list. |
static List<FieldSchema> |
getFieldSchemasFromRowSchema(RowSchema row,
String fieldPrefix)
Convert the RowSchema to FieldSchema list. |
static tableDesc |
getIntermediateFileTableDesc(List<FieldSchema> fieldSchemas)
Generate the table descriptor for intermediate files. |
static tableDesc |
getMapJoinKeyTableDesc(List<FieldSchema> fieldSchemas)
Generate the table descriptor for Map-side join key. |
static tableDesc |
getMapJoinValueTableDesc(List<FieldSchema> fieldSchemas)
Generate the table descriptor for Map-side join key. |
static mapredWork |
getMapRedWork()
|
static tableDesc |
getReduceKeyTableDesc(List<FieldSchema> fieldSchemas,
String order)
Generate the table descriptor for reduce key. |
static reduceSinkDesc |
getReduceSinkDesc(ArrayList<exprNodeDesc> keyCols,
ArrayList<exprNodeDesc> valueCols,
List<String> outputColumnNames,
boolean includeKeyCols,
int tag,
ArrayList<exprNodeDesc> partitionCols,
String order,
int numReducers)
Create the reduce sink descriptor. |
static reduceSinkDesc |
getReduceSinkDesc(ArrayList<exprNodeDesc> keyCols,
ArrayList<exprNodeDesc> valueCols,
List<String> outputColumnNames,
boolean includeKey,
int tag,
int numPartitionFields,
int numReducers)
Create the reduce sink descriptor. |
static tableDesc |
getReduceValueTableDesc(List<FieldSchema> fieldSchemas)
Generate the table descriptor for intermediate files. |
static tableDesc |
getTableDesc(Class<? extends Deserializer> serdeClass,
String separatorCode,
String columns)
Generate the table descriptor of given serde with the separatorCode and column names (comma separated string). |
static tableDesc |
getTableDesc(Class<? extends Deserializer> serdeClass,
String separatorCode,
String columns,
boolean lastColumnTakesRestOfTheLine)
Generate the table descriptor of the serde specified with the separatorCode and column names (comma separated string), and whether the last column should take the rest of the line. |
static tableDesc |
getTableDesc(Class<? extends Deserializer> serdeClass,
String separatorCode,
String columns,
String columnTypes,
boolean lastColumnTakesRestOfTheLine)
|
static List<FieldSchema> |
sortFieldSchemas(List<FieldSchema> schema)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlanUtils()
Method Detail |
---|
public static mapredWork getMapRedWork()
public static tableDesc getDefaultTableDesc(String separatorCode, String columns)
public static tableDesc getTableDesc(Class<? extends Deserializer> serdeClass, String separatorCode, String columns)
public static tableDesc getDefaultTableDesc(String separatorCode, String columns, boolean lastColumnTakesRestOfTheLine)
public static tableDesc getTableDesc(Class<? extends Deserializer> serdeClass, String separatorCode, String columns, boolean lastColumnTakesRestOfTheLine)
public static tableDesc getDefaultTableDesc(String separatorCode, String columns, String columnTypes, boolean lastColumnTakesRestOfTheLine)
public static tableDesc getTableDesc(Class<? extends Deserializer> serdeClass, String separatorCode, String columns, String columnTypes, boolean lastColumnTakesRestOfTheLine)
public static tableDesc getDefaultTableDesc(String separatorCode)
public static tableDesc getReduceKeyTableDesc(List<FieldSchema> fieldSchemas, String order)
public static tableDesc getMapJoinKeyTableDesc(List<FieldSchema> fieldSchemas)
public static tableDesc getMapJoinValueTableDesc(List<FieldSchema> fieldSchemas)
public static tableDesc getIntermediateFileTableDesc(List<FieldSchema> fieldSchemas)
public static tableDesc getReduceValueTableDesc(List<FieldSchema> fieldSchemas)
public static List<FieldSchema> getFieldSchemasFromColumnList(List<exprNodeDesc> cols, List<String> outputColumnNames, int start, String fieldPrefix)
public static List<FieldSchema> getFieldSchemasFromColumnList(List<exprNodeDesc> cols, String fieldPrefix)
public static List<FieldSchema> getFieldSchemasFromRowSchema(RowSchema row, String fieldPrefix)
public static List<FieldSchema> getFieldSchemasFromColumnInfo(Vector<ColumnInfo> cols, String fieldPrefix)
public static List<FieldSchema> sortFieldSchemas(List<FieldSchema> schema)
public static reduceSinkDesc getReduceSinkDesc(ArrayList<exprNodeDesc> keyCols, ArrayList<exprNodeDesc> valueCols, List<String> outputColumnNames, boolean includeKeyCols, int tag, ArrayList<exprNodeDesc> partitionCols, String order, int numReducers)
keyCols
- The columns to be stored in the keyvalueCols
- The columns to be stored in the valueoutputColumnNames
- The output columns namestag
- The tag for this reducesinkpartitionCols
- The columns for partitioning.numReducers
- The number of reducers, set to -1 for automatic inference
based on input data size.
public static reduceSinkDesc getReduceSinkDesc(ArrayList<exprNodeDesc> keyCols, ArrayList<exprNodeDesc> valueCols, List<String> outputColumnNames, boolean includeKey, int tag, int numPartitionFields, int numReducers)
keyCols
- The columns to be stored in the keyvalueCols
- The columns to be stored in the valueoutputColumnNames
- The output columns namestag
- The tag for this reducesinknumPartitionFields
- The first numPartitionFields of keyCols will be partition columns.
If numPartitionFields=-1, then partition randomly.numReducers
- The number of reducers, set to -1 for automatic inference
based on input data size.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |