org.apache.hadoop.hive.ql.plan
Class FileSinkDesc

java.lang.Object
  extended by org.apache.hadoop.hive.ql.plan.AbstractOperatorDesc
      extended by org.apache.hadoop.hive.ql.plan.FileSinkDesc
All Implemented Interfaces:
Serializable, Cloneable, OperatorDesc

public class FileSinkDesc
extends AbstractOperatorDesc

FileSinkDesc.

See Also:
Serialized Form

Nested Class Summary
static class FileSinkDesc.DPSortState
           
 
Constructor Summary
FileSinkDesc()
           
FileSinkDesc(org.apache.hadoop.fs.Path dirName, TableDesc tableInfo, boolean compressed)
           
FileSinkDesc(org.apache.hadoop.fs.Path dirName, TableDesc tableInfo, boolean compressed, int destTableId, boolean multiFileSpray, boolean canBeMerged, int numFiles, int totalFiles, ArrayList<ExprNodeDesc> partitionCols, DynamicPartitionCtx dpCtx)
           
 
Method Summary
 boolean canBeMerged()
           
 Object clone()
           
 String getCompressCodec()
           
 boolean getCompressed()
           
 String getCompressType()
           
 int getDestTableId()
           
 org.apache.hadoop.fs.Path getDirName()
           
 FileSinkDesc.DPSortState getDpSortState()
           
 DynamicPartitionCtx getDynPartCtx()
           
 org.apache.hadoop.fs.Path getFinalDirName()
           
 ListBucketingCtx getLbCtx()
           
 List<FileSinkDesc> getLinkedFileSinkDesc()
           
 int getMaxStatsKeyPrefixLength()
           
 int getNumFiles()
           
 org.apache.hadoop.fs.Path getParentDir()
           
 ArrayList<ExprNodeDesc> getPartitionCols()
           
 String getStaticSpec()
           
 String getStatsAggPrefix()
          Construct the key prefix used as (intermediate) statistics publishing and aggregation.
 TableDesc getTableInfo()
           
 int getTotalFiles()
           
 boolean isGatherStats()
           
 boolean isLinkedFileSink()
           
 boolean isMultiFileSpray()
           
 boolean isRemovedReduceSinkBucketSort()
           
 boolean isStatsCollectRawDataSize()
           
 boolean isStatsReliable()
           
 void setCanBeMerged(boolean canBeMerged)
           
 void setCompressCodec(String intermediateCompressorCodec)
           
 void setCompressed(boolean compressed)
           
 void setCompressType(String intermediateCompressType)
           
 void setDestTableId(int destTableId)
           
 void setDirName(org.apache.hadoop.fs.Path dirName)
           
 void setDpSortState(FileSinkDesc.DPSortState dpSortState)
           
 void setDynPartCtx(DynamicPartitionCtx dpc)
           
 void setGatherStats(boolean gatherStats)
           
 void setLbCtx(ListBucketingCtx lbCtx)
           
 void setLinkedFileSink(boolean linkedFileSink)
           
 void setLinkedFileSinkDesc(List<FileSinkDesc> linkedFileSinkDesc)
           
 void setMaxStatsKeyPrefixLength(int maxStatsKeyPrefixLength)
           
 void setMultiFileSpray(boolean multiFileSpray)
           
 void setNumFiles(int numFiles)
           
 void setParentDir(org.apache.hadoop.fs.Path parentDir)
           
 void setPartitionCols(ArrayList<ExprNodeDesc> partitionCols)
           
 void setRemovedReduceSinkBucketSort(boolean removedReduceSinkBucketSort)
           
 void setStaticSpec(String staticSpec)
           
 void setStatsAggPrefix(String k)
          Set the stats aggregation key.
 void setStatsCollectRawDataSize(boolean statsCollectRawDataSize)
           
 void setStatsReliable(boolean statsReliable)
           
 void setTableInfo(TableDesc tableInfo)
           
 void setTotalFiles(int totalFiles)
           
 
Methods inherited from class org.apache.hadoop.hive.ql.plan.AbstractOperatorDesc
getOpTraits, getStatistics, setOpTraits, setStatistics, setVectorMode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSinkDesc

public FileSinkDesc()

FileSinkDesc

public FileSinkDesc(org.apache.hadoop.fs.Path dirName,
                    TableDesc tableInfo,
                    boolean compressed,
                    int destTableId,
                    boolean multiFileSpray,
                    boolean canBeMerged,
                    int numFiles,
                    int totalFiles,
                    ArrayList<ExprNodeDesc> partitionCols,
                    DynamicPartitionCtx dpCtx)

FileSinkDesc

public FileSinkDesc(org.apache.hadoop.fs.Path dirName,
                    TableDesc tableInfo,
                    boolean compressed)
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Specified by:
clone in interface OperatorDesc
Overrides:
clone in class AbstractOperatorDesc
Throws:
CloneNotSupportedException

getDirName

public org.apache.hadoop.fs.Path getDirName()

setDirName

public void setDirName(org.apache.hadoop.fs.Path dirName)

getFinalDirName

public org.apache.hadoop.fs.Path getFinalDirName()

getTableInfo

public TableDesc getTableInfo()

setTableInfo

public void setTableInfo(TableDesc tableInfo)

getCompressed

public boolean getCompressed()

setCompressed

public void setCompressed(boolean compressed)

getDestTableId

public int getDestTableId()

setDestTableId

public void setDestTableId(int destTableId)

getCompressCodec

public String getCompressCodec()

setCompressCodec

public void setCompressCodec(String intermediateCompressorCodec)

getCompressType

public String getCompressType()

setCompressType

public void setCompressType(String intermediateCompressType)

isMultiFileSpray

public boolean isMultiFileSpray()
Returns:
the multiFileSpray

setMultiFileSpray

public void setMultiFileSpray(boolean multiFileSpray)
Parameters:
multiFileSpray - the multiFileSpray to set

canBeMerged

public boolean canBeMerged()

setCanBeMerged

public void setCanBeMerged(boolean canBeMerged)

getTotalFiles

public int getTotalFiles()
Returns:
the totalFiles

setTotalFiles

public void setTotalFiles(int totalFiles)
Parameters:
totalFiles - the totalFiles to set

getPartitionCols

public ArrayList<ExprNodeDesc> getPartitionCols()
Returns:
the partitionCols

setPartitionCols

public void setPartitionCols(ArrayList<ExprNodeDesc> partitionCols)
Parameters:
partitionCols - the partitionCols to set

getNumFiles

public int getNumFiles()
Returns:
the numFiles

setNumFiles

public void setNumFiles(int numFiles)
Parameters:
numFiles - the numFiles to set

setDynPartCtx

public void setDynPartCtx(DynamicPartitionCtx dpc)

getDynPartCtx

public DynamicPartitionCtx getDynPartCtx()

setStaticSpec

public void setStaticSpec(String staticSpec)

getStaticSpec

public String getStaticSpec()

setGatherStats

public void setGatherStats(boolean gatherStats)

isGatherStats

public boolean isGatherStats()

getStatsAggPrefix

public String getStatsAggPrefix()
Construct the key prefix used as (intermediate) statistics publishing and aggregation. During stats publishing phase, this key prefix will be appended with the optional dynamic partition spec and the task ID. The whole key uniquely identifies the output of a task for this job. In the stats aggregation phase, all rows with the same prefix plus dynamic partition specs (obtained at run-time after MR job finishes) will be serving as the prefix: all rows with the same prefix (output of all tasks for this job) will be aggregated.

Returns:
key prefix used for stats publishing and aggregation.

setStatsAggPrefix

public void setStatsAggPrefix(String k)
Set the stats aggregation key. If the input string is not terminated by Path.SEPARATOR aggregation key will add one to make it as a directory name.

Parameters:
k - input directory name.

isLinkedFileSink

public boolean isLinkedFileSink()

setLinkedFileSink

public void setLinkedFileSink(boolean linkedFileSink)

getParentDir

public org.apache.hadoop.fs.Path getParentDir()

setParentDir

public void setParentDir(org.apache.hadoop.fs.Path parentDir)

isStatsReliable

public boolean isStatsReliable()

setStatsReliable

public void setStatsReliable(boolean statsReliable)

getLbCtx

public ListBucketingCtx getLbCtx()
Returns:
the lbCtx

setLbCtx

public void setLbCtx(ListBucketingCtx lbCtx)
Parameters:
lbCtx - the lbCtx to set

getLinkedFileSinkDesc

public List<FileSinkDesc> getLinkedFileSinkDesc()

setLinkedFileSinkDesc

public void setLinkedFileSinkDesc(List<FileSinkDesc> linkedFileSinkDesc)

getMaxStatsKeyPrefixLength

public int getMaxStatsKeyPrefixLength()

setMaxStatsKeyPrefixLength

public void setMaxStatsKeyPrefixLength(int maxStatsKeyPrefixLength)

isStatsCollectRawDataSize

public boolean isStatsCollectRawDataSize()

setStatsCollectRawDataSize

public void setStatsCollectRawDataSize(boolean statsCollectRawDataSize)

isRemovedReduceSinkBucketSort

public boolean isRemovedReduceSinkBucketSort()

setRemovedReduceSinkBucketSort

public void setRemovedReduceSinkBucketSort(boolean removedReduceSinkBucketSort)

getDpSortState

public FileSinkDesc.DPSortState getDpSortState()

setDpSortState

public void setDpSortState(FileSinkDesc.DPSortState dpSortState)


Copyright © 2014 The Apache Software Foundation. All rights reserved.