Package alluxio.job.plan.transform
Class CompactConfig
- java.lang.Object
-
- alluxio.job.plan.transform.CompactConfig
-
- All Implemented Interfaces:
JobConfig,PlanConfig,java.io.Serializable
@ThreadSafe public final class CompactConfig extends java.lang.Object implements PlanConfig
Configuration for a job to compact files directly under a directory. Files will be compacted into a certain number of files, if the number of existing files is less than the specified number, then no compaction happens, otherwise, assume we want to compact 100 files to 10 files, then every 10 files will be compacted into one file. The original order of rows is preserved.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CompactConfig(PartitionInfo inputPartitionInfo, java.lang.String input, PartitionInfo outputPartitionInfo, java.lang.String output, java.lang.Integer maxNumFiles, java.lang.Long minFileSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<java.lang.String>affectedPaths()booleanequals(java.lang.Object obj)java.lang.StringgetInput()PartitionInfogetInputPartitionInfo()intgetMaxNumFiles()longgetMinFileSize()java.lang.StringgetName()java.lang.StringgetOutput()PartitionInfogetOutputPartitionInfo()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
CompactConfig
public CompactConfig(PartitionInfo inputPartitionInfo, java.lang.String input, PartitionInfo outputPartitionInfo, java.lang.String output, java.lang.Integer maxNumFiles, java.lang.Long minFileSize)
- Parameters:
inputPartitionInfo- the input partition infoinput- the input directoryoutputPartitionInfo- the output partition infooutput- the output directorymaxNumFiles- the maximum number of files after compactionminFileSize- the minimum file size for coalescing
-
-
Method Detail
-
getInputPartitionInfo
public PartitionInfo getInputPartitionInfo()
- Returns:
- the input partition info
-
getOutputPartitionInfo
public PartitionInfo getOutputPartitionInfo()
- Returns:
- the output partition info
-
getInput
public java.lang.String getInput()
- Returns:
- the input directory
-
getOutput
public java.lang.String getOutput()
- Returns:
- the output directory
-
getMaxNumFiles
public int getMaxNumFiles()
- Returns:
- the number of files after compaction
-
getMinFileSize
public long getMinFileSize()
- Returns:
- the file size
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getName
public java.lang.String getName()
-
affectedPaths
public java.util.Collection<java.lang.String> affectedPaths()
- Specified by:
affectedPathsin interfaceJobConfig- Returns:
- list of affected paths
-
-