T
- public class NestedGroupCentroidAssignment<T> extends Object
If the starting level does match the specified level, then the centroid tree is 'walked' down. Walking up to higher levels is not supported.
Levels are number 1 to n where 1 is the top tier. The current tier being computed may have a different batch ID (temporary) than all upper level tiers. In this case, a parent batch id is provided to resolve groups for those tiers. This approach is often used in speculative computation at each tier.
Parameters include:
"NestedGroupCentroidAssignment.Global.ParentBatchId" -> Parent Tier Batch IDs. If not present then assume value NestedGroupCentroidAssignment.Global.BatchId
"NestedGroupCentroidAssignment.Global.BatchId" -> batch id for current tier.
"NestedGroupCentroidAssignment.Global.ZoomLevel" -> current tier (level)
"NestedGroupCentroidAssignment.Common.DistanceFunctionClass" -> distance function used for association of data points to centroid.
Constructor and Description |
---|
NestedGroupCentroidAssignment(CentroidManager<T> centroidManager,
int endZoomLevel,
String parentBatchID,
DistanceFn<T> distanceFunction) |
NestedGroupCentroidAssignment(org.apache.hadoop.mapreduce.JobContext context,
Class<?> scope,
org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
double |
findCentroidForLevel(AnalyticItemWrapper<T> item,
AssociationNotification<T> associationNotification) |
List<AnalyticItemWrapper<T>> |
getCentroidsForGroup(String groupID) |
String |
getGroupForLevel(AnalyticItemWrapper<T> item)
Get the associated group id from the current zoom level
|
static Collection<ParameterEnum<?>> |
getParameters() |
static void |
setParameters(org.apache.hadoop.conf.Configuration config,
Class<?> scope,
PropertyManagement runTimeProperties) |
static void |
setParentBatchID(org.apache.hadoop.conf.Configuration config,
Class<?> scope,
String parentID)
Override parent batch ID from parameters
|
static void |
setZoomLevel(org.apache.hadoop.conf.Configuration config,
Class<?> scope,
int zoomLevel)
Override zoomLevel from parameters
|
public NestedGroupCentroidAssignment(CentroidManager<T> centroidManager, int endZoomLevel, String parentBatchID, DistanceFn<T> distanceFunction)
public NestedGroupCentroidAssignment(org.apache.hadoop.mapreduce.JobContext context, Class<?> scope, org.slf4j.Logger logger) throws InstantiationException, IllegalAccessException, IOException
public static void setZoomLevel(org.apache.hadoop.conf.Configuration config, Class<?> scope, int zoomLevel)
public static void setParentBatchID(org.apache.hadoop.conf.Configuration config, Class<?> scope, String parentID)
public static Collection<ParameterEnum<?>> getParameters()
public List<AnalyticItemWrapper<T>> getCentroidsForGroup(String groupID) throws IOException
IOException
public String getGroupForLevel(AnalyticItemWrapper<T> item) throws IOException
IOException
public double findCentroidForLevel(AnalyticItemWrapper<T> item, AssociationNotification<T> associationNotification) throws IOException
IOException
public static void setParameters(org.apache.hadoop.conf.Configuration config, Class<?> scope, PropertyManagement runTimeProperties)
Copyright © 2013–2022. All rights reserved.