public class HierarchyDataIndexReader
extends java.lang.Object
| Constructor and Description |
|---|
HierarchyDataIndexReader(int level, java.lang.String levelName, Configuration conf)
Creates a new reader for the specified hierarchy level index.
|
HierarchyDataIndexReader(Path path, int level, 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(Text parentId, RecordInfoArrayWritable records)
Finds the given parent's children records.
|
int |
getLevel()
Gets the hierarchy level of the current index
|
boolean |
nextParentRecords(Text parentId, RecordInfoArrayWritable records)
Gets the next key (parent id), value (parent's children records) pair
|
public HierarchyDataIndexReader(int level,
java.lang.String levelName,
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(Path path,
int level,
JobConf conf)
throws java.io.IOException
path - the path where the index islevel - the hierarchy level the index belongs toconf - the job configurationjava.io.IOException
public void close()
throws java.io.IOException
java.io.IOException
public boolean findParentRecords(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.IOExceptionpublic int getLevel()
public boolean nextParentRecords(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.IOExceptionCopyright © 2017 Oracle and/or its affiliates. All Rights Reserved.