public final class DatastoreKeyInput extends Input<V>
Constructor and Description |
---|
DatastoreKeyInput(com.google.appengine.api.datastore.Query query,
int shardCount) |
DatastoreKeyInput(String entityKind,
int shardCount) |
DatastoreKeyInput(String entityKind,
int shardCount,
String namespace) |
Modifier and Type | Method and Description |
---|---|
protected DatastoreKeyInputReader |
createReader(com.google.appengine.api.datastore.Query query) |
List<InputReader<V>> |
createReaders()
Returns a list of readers for this input.
|
int |
getShardCount() |
getContext
public DatastoreKeyInput(String entityKind, int shardCount)
entityKind
- entity kind to read from the datastore.shardCount
- number of parallel shards for the input.public DatastoreKeyInput(String entityKind, int shardCount, String namespace)
entityKind
- entity kind to read from the datastore.shardCount
- the number of parallel shards to divide the input into.namespace
- the namespace of the entities (if null will use current).public DatastoreKeyInput(com.google.appengine.api.datastore.Query query, int shardCount)
query
- The query to map read from the datastoreshardCount
- the number of parallel shards to divide the input into.protected DatastoreKeyInputReader createReader(com.google.appengine.api.datastore.Query query)
public List<InputReader<V>> createReaders()
Input
Input
's
responsibility to determine an appropriate number of readers to split into.
This could be specified by the user or determined algorithmically.
The number of input readers returned determines the number of map shards.createReaders
in class Input<V>
public int getShardCount()
Copyright © 2015 Google. All rights reserved.