public class HierarchyDataIndexReader
extends java.lang.Object
| Constructor and Description |
|---|
HierarchyDataIndexReader(int level, java.lang.String levelName, org.apache.hadoop.conf.Configuration conf)
Creates a new reader for the specified hierarchy level index.
|
HierarchyDataIndexReader(org.apache.hadoop.fs.Path path, int level, org.apache.hadoop.mapred.JobConf conf)
Creates a new reader for the specified hierarchy level index.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the reader
|
boolean |
findParentRecords(org.apache.hadoop.io.Text parentId, RecordInfoArrayWritable records)
Finds the given parent's children records.
|
int |
getLevel()
Gets the hierarchy level of the current index
|
boolean |
nextParentRecords(org.apache.hadoop.io.Text parentId, RecordInfoArrayWritable records)
Gets the next key (parent id), value (parent's children records) pair
|
public HierarchyDataIndexReader(int level,
java.lang.String levelName,
org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
level - the hierarchy level the index belongs tolevelName - the hierarchy level nameconf - the job configurationjava.io.IOException
public HierarchyDataIndexReader(org.apache.hadoop.fs.Path path,
int level,
org.apache.hadoop.mapred.JobConf conf)
throws java.io.IOException
path - the path where the index islevel - the hierarchy level the index belongs toconf - the job configurationjava.io.IOExceptionpublic int getLevel()
public boolean nextParentRecords(org.apache.hadoop.io.Text parentId,
RecordInfoArrayWritable records)
throws java.io.IOException
parentId - a Text to store the the next parent idrecords - a RecordInfo to store the next childred recordsjava.io.IOException
public boolean findParentRecords(org.apache.hadoop.io.Text parentId,
RecordInfoArrayWritable records)
throws java.io.IOException
parentId - the parent id to be searched.records - a RecordInfoArrayWritable where the results will be stored (if any)java.io.IOException
public void close()
throws java.io.IOException
java.io.IOExceptionCopyright © 2016 Oracle and/or its affiliates. All Rights Reserved.