org.apache.lens.driver.hive.priority
Class DurationBasedQueryPriorityDecider

java.lang.Object
  extended by org.apache.lens.driver.hive.priority.DurationBasedQueryPriorityDecider
All Implemented Interfaces:
QueryPriorityDecider

public class DurationBasedQueryPriorityDecider
extends Object
implements QueryPriorityDecider


Field Summary
 
Fields inherited from interface org.apache.lens.server.api.priority.QueryPriorityDecider
LOG
 
Constructor Summary
DurationBasedQueryPriorityDecider(String ranges, float monthlyPartitoinWeight, float dailyPartitionWeight, float hourlyPartitionWeight)
          Constructor.
 
Method Summary
 Priority decidePriority(AbstractQueryContext abstractQueryContext)
          The Implementation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DurationBasedQueryPriorityDecider

public DurationBasedQueryPriorityDecider(String ranges,
                                         float monthlyPartitoinWeight,
                                         float dailyPartitionWeight,
                                         float hourlyPartitionWeight)
Constructor. Takes three weights for partitions.

Parameters:
ranges -
monthlyPartitoinWeight -
dailyPartitionWeight -
hourlyPartitionWeight -
Method Detail

decidePriority

public Priority decidePriority(AbstractQueryContext abstractQueryContext)
                        throws LensException
The Implementation

Specified by:
decidePriority in interface QueryPriorityDecider
Parameters:
abstractQueryContext -
Returns:
decided Priority
Throws:
LensException - Exception occurs mostly when one of drivers/explained queries/plans is null


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.