gr.uoa.di.madgik.searchlibrary.operatorlibrary.partition
Class PartitionOp

java.lang.Object
  extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.Unary
      extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.partition.PartitionOp

public class PartitionOp
extends Unary

Operator class used to perform partitioning on its input org.gcube.searchservice.searchlibrary.resultset.ResultSet based on a specified field and produce a new org.gcube.searchservice.searchlibrary.resultset.ResultSet output holding the locators of the produced org.gcube.searchservice.searchlibrary.resultset.ResultSets, one for each different value of that field.

Author:
john.gerbesiotis - DI NKUA

Field Summary
 
Fields inherited from class gr.uoa.di.madgik.searchlibrary.operatorlibrary.Unary
inLocator, operatorParameters, stats, timeout, TimeoutDef, timeUnit, TimeUnitDef
 
Constructor Summary
PartitionOp(URI inLocator, Map<String,String> operatorParameters, StatsContainer stats)
          Creates a new PartitionOp with the default timeout for the reader and the writer
PartitionOp(URI inLocator, Map<String,String> operatorParameters, StatsContainer stats, long timeout, TimeUnit timeUnit)
          Creates a new PartitionOp with configurable timeout for the reader and the writer
 
Method Summary
 URI compute()
          Performs the partitioning operation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartitionOp

public PartitionOp(URI inLocator,
                   Map<String,String> operatorParameters,
                   StatsContainer stats)
            throws Exception
Creates a new PartitionOp with the default timeout for the reader and the writer

Parameters:
inLocator - The locator of the input
operatorParameters - The field that the partition will be applied upon ("clusterBy")
stats - Statistics
Throws:
Exception

PartitionOp

public PartitionOp(URI inLocator,
                   Map<String,String> operatorParameters,
                   StatsContainer stats,
                   long timeout,
                   TimeUnit timeUnit)
            throws Exception
Creates a new PartitionOp with configurable timeout for the reader and the writer

Parameters:
inLocator - The locator of the input
operatorParameters - The field that the partition will be applied upon ("clusterBy")
stats - Statistics
timeout - The timeout to be used both by the reader and the writer
timeUnit - The time unit of the timeout used
Throws:
Exception
Method Detail

compute

public URI compute()
            throws Exception
Performs the partitioning operation

Specified by:
compute in class Unary
Returns:
The locator of the produced output
Throws:
Exception - An unrecoverable error for the operation occurred


Copyright © 2013. All Rights Reserved.