edu.yale.cs.hadoopdb.dataloader
Class LocalHasher

java.lang.Object
  extended by edu.yale.cs.hadoopdb.dataloader.LocalHasher

public class LocalHasher
extends java.lang.Object

Hash-partitions a local file into the specified number of partitions. Each line of text is assumed to be a record with fields delimited with character given as a param. The fields on which record is hashed is expected to be an index (0 = the first field in a record).


Field Summary
static int COUNT_WINDOW
           
static java.lang.String NEW_LINE
           
 
Constructor Summary
LocalHasher()
           
 
Method Summary
private static int hash(java.lang.String s)
           
static void main(java.lang.String[] args)
           
private static int process(java.lang.String filename, int partNo, java.lang.String delimiter, int hashFieldPos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COUNT_WINDOW

public static int COUNT_WINDOW

NEW_LINE

public static final java.lang.String NEW_LINE
Constructor Detail

LocalHasher

public LocalHasher()
Method Detail

hash

private static int hash(java.lang.String s)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Parameters:
args -
Throws:
java.lang.Exception

process

private static int process(java.lang.String filename,
                           int partNo,
                           java.lang.String delimiter,
                           int hashFieldPos)
                    throws java.lang.Exception
Throws:
java.lang.Exception