org.unigram.likelike.lsh
Class LSHRecommendations

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.unigram.likelike.lsh.LSHRecommendations
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public class LSHRecommendations
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

Extract recommendations for input examples.


Field Summary
protected  LikelikeLogger logger
          logger.
 
Constructor Summary
LSHRecommendations()
           
 
Method Summary
protected  boolean getRecommendations(java.lang.String inputDir, java.lang.String outputFile, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs)
          Get items to be recommended.
static void main(java.lang.String[] args)
          Main method.
 int run(java.lang.String[] args)
          Run from ToolRunner.
 int run(java.lang.String[] args, org.apache.hadoop.conf.Configuration conf)
          Run.
protected  void setResultConf(org.apache.hadoop.mapreduce.Counters counters, org.apache.hadoop.conf.Configuration conf)
          Add the configuration information from the result of extract candidates to conf.
protected  void showParameters()
          Show parameters for FreqentNGramExtraction.
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Field Detail

logger

protected final LikelikeLogger logger
logger.

Constructor Detail

LSHRecommendations

public LSHRecommendations()
Method Detail

run

public final int run(java.lang.String[] args)
              throws java.io.IOException,
                     java.lang.InterruptedException,
                     java.lang.ClassNotFoundException,
                     java.lang.Exception
Run from ToolRunner.

Specified by:
run in interface org.apache.hadoop.util.Tool
Parameters:
args - contains arguments
Returns:
0 when succeeded.
Throws:
java.io.IOException - -
java.lang.InterruptedException - -
java.lang.ClassNotFoundException - -
java.lang.Exception - -

run

public int run(java.lang.String[] args,
               org.apache.hadoop.conf.Configuration conf)
        throws java.lang.Exception
Run.

Parameters:
args - arguments
conf - configuration
Returns:
0 when succeeded.
Throws:
java.lang.Exception - -

setResultConf

protected void setResultConf(org.apache.hadoop.mapreduce.Counters counters,
                             org.apache.hadoop.conf.Configuration conf)
Add the configuration information from the result of extract candidates to conf.

Parameters:
counters - contains counter
conf - configuration

getRecommendations

protected boolean getRecommendations(java.lang.String inputDir,
                                     java.lang.String outputFile,
                                     org.apache.hadoop.conf.Configuration conf,
                                     org.apache.hadoop.fs.FileSystem fs)
                              throws java.io.IOException,
                                     java.lang.InterruptedException,
                                     java.lang.ClassNotFoundException
Get items to be recommended.

Parameters:
inputDir - input
outputFile - output
conf - configuration
fs - file system
Returns:
true when succeeded otherwise false
Throws:
java.io.IOException - -
java.lang.InterruptedException - -
java.lang.ClassNotFoundException - -

showParameters

protected void showParameters()
Show parameters for FreqentNGramExtraction.


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method.

Parameters:
args - argument strings which contain input and output files
Throws:
java.lang.Exception - -