Skip navigation links

Oracle® Big Data Appliance Perfect Balance Java API Reference
Release 1.1

E49335-01


oracle.hadoop.balancer.examples.invindx
Class InvertedIndex.InvertedIndexKey

java.lang.Object
  extended by oracle.hadoop.balancer.examples.invindx.InvertedIndex.InvertedIndexKey

All Implemented Interfaces:
org.apache.hadoop.io.Writable
Enclosing class:
InvertedIndex

public static class InvertedIndex.InvertedIndexKey
extends java.lang.Object
implements org.apache.hadoop.io.Writable

Key class for the inverted index application. Since we want Hadoop to do a secondary-sort (produce a sorted list of reduce-values per key), we have a composite key class that contains both key and value elements.


Nested Class Summary
static class InvertedIndex.InvertedIndexKey.GroupingComparator
          This comparator compares only the key element (the word) of this composite key class.
static class InvertedIndex.InvertedIndexKey.SortingComparator
          This comparator extends the InvertedIndex.InvertedIndexKey.GroupingComparator and compares the value elements (location and offset) of this composite key.
static class InvertedIndex.InvertedIndexKey.WordPartitioner<V>
          Partition on the word's hashcode.

 

Constructor Summary
InvertedIndex.InvertedIndexKey()
           

 

Method Summary
 int hashCode()
           
 void readFields(java.io.DataInput in)
           
 java.lang.String toString()
          TextOutputFormat calls this to print the key
 void write(java.io.DataOutput out)
           

 

Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

InvertedIndex.InvertedIndexKey

public InvertedIndex.InvertedIndexKey()

Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
java.io.IOException

toString

public java.lang.String toString()
TextOutputFormat calls this to print the key
Overrides:
toString in class java.lang.Object
Returns:
the word for this key

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
java.io.IOException

Skip navigation links

Oracle® Big Data Appliance Perfect Balance Java API Reference
Release 1.1

E49335-01


Copyright © 2013, Oracle and/or its affiliates. All rights reserved.