public final class DatastoreInput extends Input<V>
Constructor and Description |
---|
DatastoreInput(com.google.appengine.api.datastore.Query query,
int shardCount) |
DatastoreInput(String entityKind,
int shardCount) |
DatastoreInput(String entityKind,
int shardCount,
String namespace) |
Modifier and Type | Method and Description |
---|---|
protected DatastoreInputReader |
createReader(com.google.appengine.api.datastore.Query query) |
List<InputReader<V>> |
createReaders()
Returns a list of readers for this input.
|
int |
getShardCount() |
getContext
public DatastoreInput(String entityKind, int shardCount)
entityKind
- entity kind to read from the datastore.shardCount
- number of parallel shards for the input.public DatastoreInput(String entityKind, int shardCount, String namespace)
entityKind
- entity kind to read from the datastore.shardCount
- number of parallel shards for the input.namespace
- the namespace of the entities (if null will use current).public DatastoreInput(com.google.appengine.api.datastore.Query query, int shardCount)
query
- the query to read from the datastore.shardCount
- the number for parallel shards for the input.protected DatastoreInputReader 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.