This project has retired. For details please refer to its Attic page.
ShardedJoinStrategy.ShardingStrategy (Apache Crunch 0.10.0 API)

org.apache.crunch.lib.join
Interface ShardedJoinStrategy.ShardingStrategy<K>

All Superinterfaces:
Serializable
Enclosing class:
ShardedJoinStrategy<K,U,V>

public static interface ShardedJoinStrategy.ShardingStrategy<K>
extends Serializable

Determines over how many shards a key will be split in a sharded join.

It is essential that implementations of this class are deterministic.


Method Summary
 int getNumShards(K key)
          Retrieve the number of shards over which the given key should be split.
 

Method Detail

getNumShards

int getNumShards(K key)
Retrieve the number of shards over which the given key should be split.

Parameters:
key - key for which shards are to be determined
Returns:
number of shards for the given key, must be greater than 0


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.