public class HierarchyDataIndexWriter
extends java.lang.Object
HierarchyInfo.UNDEFINED_PARENT_ID
Constructor and Description |
---|
HierarchyDataIndexWriter(HierarchyInfo hierInfo, org.apache.hadoop.fs.Path indexPath, org.apache.hadoop.mapred.JobConf conf)
Creates a new instance and sets the
HierarchyInfo which contains the hierarchy to be indexed and the path where the generated indices will be stored. |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.fs.Path |
writeIndex(int level, org.apache.hadoop.mapred.JobConf conf)
Generates and writes an index for the specified hierarchy level.
|
org.apache.hadoop.fs.Path[] |
writeIndices(org.apache.hadoop.mapred.JobConf conf)
Creates and writes an index for each level of the current hierarchy defined by the
HierarchyInfo object set at creation time |
public HierarchyDataIndexWriter(HierarchyInfo hierInfo, org.apache.hadoop.fs.Path indexPath, org.apache.hadoop.mapred.JobConf conf) throws java.io.IOException
HierarchyInfo
which contains the hierarchy to be indexed and the path where the generated indices will be stored.hierInfo
- an instance of HierarchyInfo
. It is expected that the instance is already initialized and loaded with data.indexPath
- the base path where all the hierarchy indices will be stored. It must be a directory.conf
- the job configurationjava.io.IOException
public org.apache.hadoop.fs.Path[] writeIndices(org.apache.hadoop.mapred.JobConf conf) throws java.io.IOException
HierarchyInfo
object set at creation timeconf
- the job configurationjava.io.IOException
public org.apache.hadoop.fs.Path writeIndex(int level, org.apache.hadoop.mapred.JobConf conf) throws java.io.IOException
level
- the hierarchy level for which the index will be generatedconf
- the job configurationjava.io.IOException