public class HBasePartitioningFunction extends Object implements PartitioningFunction
PartitioningFunction.Evaluator
Constructor and Description |
---|
HBasePartitioningFunction() |
HBasePartitioningFunction(ModuleConfiguration moduleConfiguration,
String tableName,
HadoopConfiguration configuration,
Set<String> families,
List<String> keys) |
Modifier and Type | Method and Description |
---|---|
HadoopConfiguration |
getConfiguration() |
PartitioningFunction.Evaluator |
getEvaluator(PartitioningFunctionContext ctx)
Create an Evaluator bound to the specified context.
|
Set<String> |
getFamilies() |
List<String> |
getKeys() |
ModuleConfiguration |
getModuleConfiguration() |
String |
getTableName() |
boolean |
isEquivalentPartitioning(PartitioningFunction other)
Returns true iff, given a single row of input, this function is guaranteed to produce the same
partitioning as the other function.
|
boolean |
isFunctionOfInput()
Returns true iff, given two identical rows of input, this function will
return the same value.
|
static List<NodeAllocationPlan.AssignmentPlan> |
localizeAssignments(NodeAllocationPlan nodeAlloc,
List<String> serverNames,
boolean balance) |
PartitioningFunction |
remapFieldReferences(Map<String,String> oldToNewMapping)
Creates a new function, equivalent to the given function, but with all field references
renamed according to the given mapping.
|
void |
setConfiguration(HadoopConfiguration configuration) |
void |
setFamilies(Set<String> families) |
void |
setKeys(List<String> keys) |
void |
setModuleConfiguration(ModuleConfiguration moduleConfiguration) |
void |
setTableName(String tableName) |
void |
validateForType(RecordTokenType type)
Performs validation of the specified input type
|
public HBasePartitioningFunction(ModuleConfiguration moduleConfiguration, String tableName, HadoopConfiguration configuration, Set<String> families, List<String> keys)
public HBasePartitioningFunction()
public ModuleConfiguration getModuleConfiguration()
public void setModuleConfiguration(ModuleConfiguration moduleConfiguration)
public String getTableName()
public void setTableName(String tableName)
public HadoopConfiguration getConfiguration()
public void setConfiguration(HadoopConfiguration configuration)
public PartitioningFunction.Evaluator getEvaluator(PartitioningFunctionContext ctx)
PartitioningFunction
getEvaluator
in interface PartitioningFunction
ctx
- the partitioning contextpublic void validateForType(RecordTokenType type)
PartitioningFunction
validateForType
in interface PartitioningFunction
type
- the input typepublic boolean isEquivalentPartitioning(PartitioningFunction other)
PartitioningFunction
PartitioningFunction.isFunctionOfInput()
, this function must
return false if PartitioningFunction.isFunctionOfInput()
returns false.isEquivalentPartitioning
in interface PartitioningFunction
other
- the other functionpublic boolean isFunctionOfInput()
PartitioningFunction
isFunctionOfInput
in interface PartitioningFunction
public PartitioningFunction remapFieldReferences(Map<String,String> oldToNewMapping)
PartitioningFunction
remapFieldReferences
in interface PartitioningFunction
oldToNewMapping
- a mapping from old names to new names. If a name is not present in the
given mapping, it will remain as-is.public static List<NodeAllocationPlan.AssignmentPlan> localizeAssignments(NodeAllocationPlan nodeAlloc, List<String> serverNames, boolean balance)
Copyright © 2024 Actian Corporation. All rights reserved.