|
||||||||||
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 |
getBinarySortableTableDesc(List<FieldSchema> fieldSchemas,
String order)
Generate the table descriptor of DynamicSerDe and TBinarySortableProtocol. |
static tableDesc |
getBinaryTableDesc(List<FieldSchema> fieldSchemas)
Generate the table descriptor of DynamicSerDe and TBinaryProtocol. |
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 List<FieldSchema> |
getFieldSchemasFromColumnInfo(Vector<ColumnInfo> cols,
String fieldPrefix)
Convert the ColumnInfo to FieldSchema. |
static List<FieldSchema> |
getFieldSchemasFromColumnList(ArrayList<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 |
getLazySimpleSerDeTableDesc(List<FieldSchema> fieldSchemas)
Generate the table descriptor of LazySimpleSerDe. |
static mapredWork |
getMapRedWork()
|
static reduceSinkDesc |
getReduceSinkDesc(ArrayList<exprNodeDesc> keyCols,
ArrayList<exprNodeDesc> valueCols,
int tag,
ArrayList<exprNodeDesc> partitionCols,
String order,
int numReducers)
Create the reduce sink descriptor. |
static reduceSinkDesc |
getReduceSinkDesc(ArrayList<exprNodeDesc> keyCols,
ArrayList<exprNodeDesc> valueCols,
int tag,
int numPartitionFields,
int numReducers)
Create the reduce sink descriptor. |
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 getDefaultTableDesc(String separatorCode, String columns, boolean lastColumnTakesRestOfTheLine)
public static tableDesc getDefaultTableDesc(String separatorCode)
public static tableDesc getBinarySortableTableDesc(List<FieldSchema> fieldSchemas, String order)
public static tableDesc getBinaryTableDesc(List<FieldSchema> fieldSchemas)
public static tableDesc getLazySimpleSerDeTableDesc(List<FieldSchema> fieldSchemas)
public static List<FieldSchema> getFieldSchemasFromColumnList(ArrayList<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 reduceSinkDesc getReduceSinkDesc(ArrayList<exprNodeDesc> keyCols, ArrayList<exprNodeDesc> valueCols, 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 valuetag
- 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, int tag, int numPartitionFields, int numReducers)
keyCols
- The columns to be stored in the keyvalueCols
- The columns to be stored in the valuetag
- 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 |