repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
stratosphere/stratosphere
stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/VertexCentricIteration.java
VertexCentricIteration.addBroadcastSetForUpdateFunction
public void addBroadcastSetForUpdateFunction(String name, DataSet<?> data) { this.bcVarsUpdate.add(new Tuple2<String, DataSet<?>>(name, data)); }
java
public void addBroadcastSetForUpdateFunction(String name, DataSet<?> data) { this.bcVarsUpdate.add(new Tuple2<String, DataSet<?>>(name, data)); }
[ "public", "void", "addBroadcastSetForUpdateFunction", "(", "String", "name", ",", "DataSet", "<", "?", ">", "data", ")", "{", "this", ".", "bcVarsUpdate", ".", "add", "(", "new", "Tuple2", "<", "String", ",", "DataSet", "<", "?", ">", ">", "(", "name", ...
Adds a data set as a broadcast set to the vertex update function. @param name The name under which the broadcast data is available in the vertex update function. @param data The data set to be broadcasted.
[ "Adds", "a", "data", "set", "as", "a", "broadcast", "set", "to", "the", "vertex", "update", "function", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/VertexCentricIteration.java#L190-L192
train
stratosphere/stratosphere
stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/VertexCentricIteration.java
VertexCentricIteration.setInput
@Override public void setInput(DataSet<Tuple2<VertexKey, VertexValue>> inputData) { // sanity check that we really have two tuples TypeInformation<Tuple2<VertexKey, VertexValue>> inputType = inputData.getType(); Validate.isTrue(inputType.isTupleType() && inputType.getArity() == 2, "The input data set (the initia...
java
@Override public void setInput(DataSet<Tuple2<VertexKey, VertexValue>> inputData) { // sanity check that we really have two tuples TypeInformation<Tuple2<VertexKey, VertexValue>> inputType = inputData.getType(); Validate.isTrue(inputType.isTupleType() && inputType.getArity() == 2, "The input data set (the initia...
[ "@", "Override", "public", "void", "setInput", "(", "DataSet", "<", "Tuple2", "<", "VertexKey", ",", "VertexValue", ">", ">", "inputData", ")", "{", "// sanity check that we really have two tuples", "TypeInformation", "<", "Tuple2", "<", "VertexKey", ",", "VertexVal...
Sets the input data set for this operator. In the case of this operator this input data set represents the set of vertices with their initial state. @param inputData The input data set, which in the case of this operator represents the set of vertices with their initial state. @see eu.stratosphere.api.java.operators....
[ "Sets", "the", "input", "data", "set", "for", "this", "operator", ".", "In", "the", "case", "of", "this", "operator", "this", "input", "data", "set", "represents", "the", "set", "of", "vertices", "with", "their", "initial", "state", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/VertexCentricIteration.java#L244-L260
train
stratosphere/stratosphere
stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/VertexCentricIteration.java
VertexCentricIteration.withPlainEdges
public static final <VertexKey extends Comparable<VertexKey>, VertexValue, Message> VertexCentricIteration<VertexKey, VertexValue, Message, ?> withPlainEdges( DataSet<Tuple2<VertexKey, VertexKey>> edgesWithoutValue, VertexUpdateFunction<VertexKey, VertexValue, Message> vertexUpdateFunction, Messagin...
java
public static final <VertexKey extends Comparable<VertexKey>, VertexValue, Message> VertexCentricIteration<VertexKey, VertexValue, Message, ?> withPlainEdges( DataSet<Tuple2<VertexKey, VertexKey>> edgesWithoutValue, VertexUpdateFunction<VertexKey, VertexValue, Message> vertexUpdateFunction, Messagin...
[ "public", "static", "final", "<", "VertexKey", "extends", "Comparable", "<", "VertexKey", ">", ",", "VertexValue", ",", "Message", ">", "VertexCentricIteration", "<", "VertexKey", ",", "VertexValue", ",", "Message", ",", "?", ">", "withPlainEdges", "(", "DataSet...
Creates a new vertex-centric iteration operator for graphs where the edges are not associated with a value. @param edgesWithoutValue The data set containing edges. Edges are represented as 2-tuples: (source-id, target-id) @param vertexUpdateFunction The function that updates the state of the vertices from the incoming...
[ "Creates", "a", "new", "vertex", "-", "centric", "iteration", "operator", "for", "graphs", "where", "the", "edges", "are", "not", "associated", "with", "a", "value", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/VertexCentricIteration.java#L346-L358
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/accumulators/AccumulatorManager.java
AccumulatorManager.processIncomingAccumulators
public void processIncomingAccumulators(JobID jobID, Map<String, Accumulator<?, ?>> newAccumulators) { synchronized (this.jobAccumulators) { // System.out.println("JobManager: Received accumulator result for job " // + jobID.toString()); // System.out.println(AccumulatorHelper.getAccumulatorsFormated(n...
java
public void processIncomingAccumulators(JobID jobID, Map<String, Accumulator<?, ?>> newAccumulators) { synchronized (this.jobAccumulators) { // System.out.println("JobManager: Received accumulator result for job " // + jobID.toString()); // System.out.println(AccumulatorHelper.getAccumulatorsFormated(n...
[ "public", "void", "processIncomingAccumulators", "(", "JobID", "jobID", ",", "Map", "<", "String", ",", "Accumulator", "<", "?", ",", "?", ">", ">", "newAccumulators", ")", "{", "synchronized", "(", "this", ".", "jobAccumulators", ")", "{", "//\t\t\tSystem.out...
Merges the new accumulators with the existing accumulators collected for the job.
[ "Merges", "the", "new", "accumulators", "with", "the", "existing", "accumulators", "collected", "for", "the", "job", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/accumulators/AccumulatorManager.java#L49-L65
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/accumulators/AccumulatorManager.java
AccumulatorManager.getJobAccumulators
public Map<String, Accumulator<?, ?>> getJobAccumulators(JobID jobID) { JobAccumulators jobAccumulators = this.jobAccumulators.get(jobID); if (jobAccumulators == null) { return new HashMap<String, Accumulator<?, ?>>(); } return jobAccumulators.getAccumulators(); }
java
public Map<String, Accumulator<?, ?>> getJobAccumulators(JobID jobID) { JobAccumulators jobAccumulators = this.jobAccumulators.get(jobID); if (jobAccumulators == null) { return new HashMap<String, Accumulator<?, ?>>(); } return jobAccumulators.getAccumulators(); }
[ "public", "Map", "<", "String", ",", "Accumulator", "<", "?", ",", "?", ">", ">", "getJobAccumulators", "(", "JobID", "jobID", ")", "{", "JobAccumulators", "jobAccumulators", "=", "this", ".", "jobAccumulators", ".", "get", "(", "jobID", ")", ";", "if", ...
Returns all collected accumulators for the job. For efficiency the internal accumulator is returned, so please use it read-only.
[ "Returns", "all", "collected", "accumulators", "for", "the", "job", ".", "For", "efficiency", "the", "internal", "accumulator", "is", "returned", "so", "please", "use", "it", "read", "-", "only", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/accumulators/AccumulatorManager.java#L71-L77
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/accumulators/AccumulatorManager.java
AccumulatorManager.cleanup
private void cleanup(JobID jobId) { if (!lru.contains(jobId)) { lru.addFirst(jobId); } if (lru.size() > this.maxEntries) { JobID toRemove = lru.removeLast(); this.jobAccumulators.remove(toRemove); } }
java
private void cleanup(JobID jobId) { if (!lru.contains(jobId)) { lru.addFirst(jobId); } if (lru.size() > this.maxEntries) { JobID toRemove = lru.removeLast(); this.jobAccumulators.remove(toRemove); } }
[ "private", "void", "cleanup", "(", "JobID", "jobId", ")", "{", "if", "(", "!", "lru", ".", "contains", "(", "jobId", ")", ")", "{", "lru", ".", "addFirst", "(", "jobId", ")", ";", "}", "if", "(", "lru", ".", "size", "(", ")", ">", "this", ".", ...
Cleanup data for the oldest jobs if the maximum number of entries is reached.
[ "Cleanup", "data", "for", "the", "oldest", "jobs", "if", "the", "maximum", "number", "of", "entries", "is", "reached", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/accumulators/AccumulatorManager.java#L83-L91
train
stratosphere/stratosphere
stratosphere-clients/src/main/java/eu/stratosphere/client/WebFrontend.java
WebFrontend.main
public static void main(String[] args) { try { // get the config directory first String configDir = null; if (args.length >= 2 && args[0].equals("-configDir")) { configDir = args[1]; } if (configDir == null) { System.err .println("Error: Configuration directory must be specified.\nWebFro...
java
public static void main(String[] args) { try { // get the config directory first String configDir = null; if (args.length >= 2 && args[0].equals("-configDir")) { configDir = args[1]; } if (configDir == null) { System.err .println("Error: Configuration directory must be specified.\nWebFro...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "try", "{", "// get the config directory first", "String", "configDir", "=", "null", ";", "if", "(", "args", ".", "length", ">=", "2", "&&", "args", "[", "0", "]", ".", "equ...
Main method. accepts a single parameter, which is the config directory. @param args The parameters to the entry point.
[ "Main", "method", ".", "accepts", "a", "single", "parameter", "which", "is", "the", "config", "directory", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-clients/src/main/java/eu/stratosphere/client/WebFrontend.java#L41-L76
train
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/configuration/GlobalConfiguration.java
GlobalConfiguration.getLongInternal
private long getLongInternal(final String key, final long defaultValue) { long retVal = defaultValue; try { synchronized (this.confData) { if (this.confData.containsKey(key)) { retVal = Long.parseLong(this.confData.get(key)); } } } catch (NumberFormatException e) { if (LOG.isDebugEnabled...
java
private long getLongInternal(final String key, final long defaultValue) { long retVal = defaultValue; try { synchronized (this.confData) { if (this.confData.containsKey(key)) { retVal = Long.parseLong(this.confData.get(key)); } } } catch (NumberFormatException e) { if (LOG.isDebugEnabled...
[ "private", "long", "getLongInternal", "(", "final", "String", "key", ",", "final", "long", "defaultValue", ")", "{", "long", "retVal", "=", "defaultValue", ";", "try", "{", "synchronized", "(", "this", ".", "confData", ")", "{", "if", "(", "this", ".", "...
Returns the value associated with the given key as a long integer. @param key the key pointing to the associated value @param defaultValue the default value which is returned in case there is no value associated with the given key @return the (default) value associated with the given key
[ "Returns", "the", "value", "associated", "with", "the", "given", "key", "as", "a", "long", "integer", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/configuration/GlobalConfiguration.java#L147-L166
train
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/configuration/GlobalConfiguration.java
GlobalConfiguration.getConfigurationInternal
private Configuration getConfigurationInternal(final String[] keys) { Configuration conf = new Configuration(); synchronized (this.confData) { final Iterator<String> it = this.confData.keySet().iterator(); while (it.hasNext()) { final String key = it.next(); boolean found = false; if (keys !=...
java
private Configuration getConfigurationInternal(final String[] keys) { Configuration conf = new Configuration(); synchronized (this.confData) { final Iterator<String> it = this.confData.keySet().iterator(); while (it.hasNext()) { final String key = it.next(); boolean found = false; if (keys !=...
[ "private", "Configuration", "getConfigurationInternal", "(", "final", "String", "[", "]", "keys", ")", "{", "Configuration", "conf", "=", "new", "Configuration", "(", ")", ";", "synchronized", "(", "this", ".", "confData", ")", "{", "final", "Iterator", "<", ...
Internal non-static method to return configuration. @param keys array of keys specifying the subset of pairs to copy. @return the {@link Configuration} object including the key/value pairs
[ "Internal", "non", "-", "static", "method", "to", "return", "configuration", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/configuration/GlobalConfiguration.java#L579-L609
train
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/configuration/GlobalConfiguration.java
GlobalConfiguration.includeConfigurationInternal
private void includeConfigurationInternal(final Configuration conf) { if (conf == null) { LOG.error("Given configuration object is null, ignoring it..."); return; } synchronized (this.confData) { final Iterator<String> it = conf.keySet().iterator(); while (it.hasNext()) { final String key = i...
java
private void includeConfigurationInternal(final Configuration conf) { if (conf == null) { LOG.error("Given configuration object is null, ignoring it..."); return; } synchronized (this.confData) { final Iterator<String> it = conf.keySet().iterator(); while (it.hasNext()) { final String key = i...
[ "private", "void", "includeConfigurationInternal", "(", "final", "Configuration", "conf", ")", "{", "if", "(", "conf", "==", "null", ")", "{", "LOG", ".", "error", "(", "\"Given configuration object is null, ignoring it...\"", ")", ";", "return", ";", "}", "synchr...
Internal non-static method to include configuration. @param conf the {@link Configuration} object to merge into the global configuration
[ "Internal", "non", "-", "static", "method", "to", "include", "configuration", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/configuration/GlobalConfiguration.java#L631-L648
train
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/api/common/operators/base/GenericDataSinkBase.java
GenericDataSinkBase.setRangePartitioned
public void setRangePartitioned(Ordering partitionOrdering, DataDistribution distribution) { if (partitionOrdering.getNumberOfFields() != distribution.getNumberOfFields()) { throw new IllegalArgumentException("The number of keys in the distribution must match number of ordered fields."); } // TODO: check co...
java
public void setRangePartitioned(Ordering partitionOrdering, DataDistribution distribution) { if (partitionOrdering.getNumberOfFields() != distribution.getNumberOfFields()) { throw new IllegalArgumentException("The number of keys in the distribution must match number of ordered fields."); } // TODO: check co...
[ "public", "void", "setRangePartitioned", "(", "Ordering", "partitionOrdering", ",", "DataDistribution", "distribution", ")", "{", "if", "(", "partitionOrdering", ".", "getNumberOfFields", "(", ")", "!=", "distribution", ".", "getNumberOfFields", "(", ")", ")", "{", ...
Sets the sink to partition the records into ranges over the given ordering. The bucket boundaries are determined using the given data distribution. @param partitionOrdering The record ordering over which to partition in ranges. @param distribution The distribution to use for the range partitioning.
[ "Sets", "the", "sink", "to", "partition", "the", "records", "into", "ranges", "over", "the", "given", "ordering", ".", "The", "bucket", "boundaries", "are", "determined", "using", "the", "given", "data", "distribution", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/api/common/operators/base/GenericDataSinkBase.java#L221-L231
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/InstanceRequestMap.java
InstanceRequestMap.setMinimumNumberOfInstances
public void setMinimumNumberOfInstances(final InstanceType instanceType, final int number) { this.minimumMap.put(instanceType, Integer.valueOf(number)); }
java
public void setMinimumNumberOfInstances(final InstanceType instanceType, final int number) { this.minimumMap.put(instanceType, Integer.valueOf(number)); }
[ "public", "void", "setMinimumNumberOfInstances", "(", "final", "InstanceType", "instanceType", ",", "final", "int", "number", ")", "{", "this", ".", "minimumMap", ".", "put", "(", "instanceType", ",", "Integer", ".", "valueOf", "(", "number", ")", ")", ";", ...
Sets the minimum number of instances to be requested from the given instance type. @param instanceType the type of instance to request @param number the minimum number of instances to request
[ "Sets", "the", "minimum", "number", "of", "instances", "to", "be", "requested", "from", "the", "given", "instance", "type", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/InstanceRequestMap.java#L53-L56
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/InstanceRequestMap.java
InstanceRequestMap.setMaximumNumberOfInstances
public void setMaximumNumberOfInstances(final InstanceType instanceType, final int number) { this.maximumMap.put(instanceType, Integer.valueOf(number)); }
java
public void setMaximumNumberOfInstances(final InstanceType instanceType, final int number) { this.maximumMap.put(instanceType, Integer.valueOf(number)); }
[ "public", "void", "setMaximumNumberOfInstances", "(", "final", "InstanceType", "instanceType", ",", "final", "int", "number", ")", "{", "this", ".", "maximumMap", ".", "put", "(", "instanceType", ",", "Integer", ".", "valueOf", "(", "number", ")", ")", ";", ...
Sets the maximum number of instances to be requested from the given instance type. @param instanceType the type of instance to request @param number the maximum number of instances to request
[ "Sets", "the", "maximum", "number", "of", "instances", "to", "be", "requested", "from", "the", "given", "instance", "type", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/InstanceRequestMap.java#L66-L69
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/InstanceRequestMap.java
InstanceRequestMap.setNumberOfInstances
public void setNumberOfInstances(final InstanceType instanceType, final int number) { setMinimumNumberOfInstances(instanceType, number); setMaximumNumberOfInstances(instanceType, number); }
java
public void setNumberOfInstances(final InstanceType instanceType, final int number) { setMinimumNumberOfInstances(instanceType, number); setMaximumNumberOfInstances(instanceType, number); }
[ "public", "void", "setNumberOfInstances", "(", "final", "InstanceType", "instanceType", ",", "final", "int", "number", ")", "{", "setMinimumNumberOfInstances", "(", "instanceType", ",", "number", ")", ";", "setMaximumNumberOfInstances", "(", "instanceType", ",", "numb...
Sets both the minimum and the maximum number of instances to be requested from the given instance type. @param instanceType the type of instance to request @param number the minimum and the maximum number of instances to request
[ "Sets", "both", "the", "minimum", "and", "the", "maximum", "number", "of", "instances", "to", "be", "requested", "from", "the", "given", "instance", "type", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/InstanceRequestMap.java#L79-L83
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/InstanceRequestMap.java
InstanceRequestMap.getMinimumNumberOfInstances
public int getMinimumNumberOfInstances(final InstanceType instanceType) { final Integer val = this.minimumMap.get(instanceType); if (val != null) { return val.intValue(); } return 0; }
java
public int getMinimumNumberOfInstances(final InstanceType instanceType) { final Integer val = this.minimumMap.get(instanceType); if (val != null) { return val.intValue(); } return 0; }
[ "public", "int", "getMinimumNumberOfInstances", "(", "final", "InstanceType", "instanceType", ")", "{", "final", "Integer", "val", "=", "this", ".", "minimumMap", ".", "get", "(", "instanceType", ")", ";", "if", "(", "val", "!=", "null", ")", "{", "return", ...
Returns the minimum number of instances to be requested from the given instance type. @param instanceType the type of instance to request @return the minimum number of instances to be requested from the given instance type
[ "Returns", "the", "minimum", "number", "of", "instances", "to", "be", "requested", "from", "the", "given", "instance", "type", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/InstanceRequestMap.java#L92-L100
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/InstanceRequestMap.java
InstanceRequestMap.getMaximumNumberOfInstances
public int getMaximumNumberOfInstances(final InstanceType instanceType) { final Integer val = this.maximumMap.get(instanceType); if (val != null) { return val.intValue(); } return 0; }
java
public int getMaximumNumberOfInstances(final InstanceType instanceType) { final Integer val = this.maximumMap.get(instanceType); if (val != null) { return val.intValue(); } return 0; }
[ "public", "int", "getMaximumNumberOfInstances", "(", "final", "InstanceType", "instanceType", ")", "{", "final", "Integer", "val", "=", "this", ".", "maximumMap", ".", "get", "(", "instanceType", ")", ";", "if", "(", "val", "!=", "null", ")", "{", "return", ...
Returns the maximum number of instances to be requested from the given instance type. @param instanceType the type of instance to request @return the maximum number of instances to be requested from the given instance type
[ "Returns", "the", "maximum", "number", "of", "instances", "to", "be", "requested", "from", "the", "given", "instance", "type", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/InstanceRequestMap.java#L109-L117
train
stratosphere/stratosphere
stratosphere-compiler/src/main/java/eu/stratosphere/compiler/dataproperties/RequestedGlobalProperties.java
RequestedGlobalProperties.filterByNodesConstantSet
public RequestedGlobalProperties filterByNodesConstantSet(OptimizerNode node, int input) { // check if partitioning survives if (this.ordering != null) { for (int col : this.ordering.getInvolvedIndexes()) { if (!node.isFieldConstant(input, col)) { return null; } } } else if (this.partitioningFi...
java
public RequestedGlobalProperties filterByNodesConstantSet(OptimizerNode node, int input) { // check if partitioning survives if (this.ordering != null) { for (int col : this.ordering.getInvolvedIndexes()) { if (!node.isFieldConstant(input, col)) { return null; } } } else if (this.partitioningFi...
[ "public", "RequestedGlobalProperties", "filterByNodesConstantSet", "(", "OptimizerNode", "node", ",", "int", "input", ")", "{", "// check if partitioning survives", "if", "(", "this", ".", "ordering", "!=", "null", ")", "{", "for", "(", "int", "col", ":", "this", ...
Filters these properties by what can be preserved by the given node when propagated down to the given input. @param node The node representing the contract. @param input The index of the input. @return True, if any non-default value is preserved, false otherwise.
[ "Filters", "these", "properties", "by", "what", "can", "be", "preserved", "by", "the", "given", "node", "when", "propagated", "down", "to", "the", "given", "input", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/dataproperties/RequestedGlobalProperties.java#L166-L187
train
stratosphere/stratosphere
stratosphere-compiler/src/main/java/eu/stratosphere/compiler/dataproperties/RequestedGlobalProperties.java
RequestedGlobalProperties.parameterizeChannel
public void parameterizeChannel(Channel channel, boolean globalDopChange, boolean localDopChange) { // if we request nothing, then we need no special strategy. forward, if the number of instances remains // the same, randomly repartition otherwise if (isTrivial()) { channel.setShipStrategy(globalDopChange ? Sh...
java
public void parameterizeChannel(Channel channel, boolean globalDopChange, boolean localDopChange) { // if we request nothing, then we need no special strategy. forward, if the number of instances remains // the same, randomly repartition otherwise if (isTrivial()) { channel.setShipStrategy(globalDopChange ? Sh...
[ "public", "void", "parameterizeChannel", "(", "Channel", "channel", ",", "boolean", "globalDopChange", ",", "boolean", "localDopChange", ")", "{", "// if we request nothing, then we need no special strategy. forward, if the number of instances remains", "// the same, randomly repartiti...
Parameterizes the ship strategy fields of a channel such that the channel produces the desired global properties. @param channel The channel to parameterize. @param globalDopChange @param localDopChange
[ "Parameterizes", "the", "ship", "strategy", "fields", "of", "a", "channel", "such", "that", "the", "channel", "produces", "the", "desired", "global", "properties", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/dataproperties/RequestedGlobalProperties.java#L223-L268
train
stratosphere/stratosphere
stratosphere-addons/hbase/src/main/java/eu/stratosphere/addons/hbase/common/HBaseUtil.java
HBaseUtil.convertScanToString
static String convertScanToString(Scan scan) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(out); scan.write(dos); return Base64.encodeBytes(out.toByteArray()); }
java
static String convertScanToString(Scan scan) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(out); scan.write(dos); return Base64.encodeBytes(out.toByteArray()); }
[ "static", "String", "convertScanToString", "(", "Scan", "scan", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "out", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "DataOutputStream", "dos", "=", "new", "DataOutputStream", "(", "out", ")", ";", ...
Writes the given scan into a Base64 encoded string. @param scan The scan to write out. @return The scan saved in a Base64 encoded string. @throws IOException When writing the scan fails.
[ "Writes", "the", "given", "scan", "into", "a", "Base64", "encoded", "string", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-addons/hbase/src/main/java/eu/stratosphere/addons/hbase/common/HBaseUtil.java#L39-L44
train
stratosphere/stratosphere
stratosphere-addons/hbase/src/main/java/eu/stratosphere/addons/hbase/common/HBaseUtil.java
HBaseUtil.convertStringToScan
public static Scan convertStringToScan(String base64) throws IOException { ByteArrayInputStream bis = new ByteArrayInputStream(Base64.decode(base64)); DataInputStream dis = new DataInputStream(bis); Scan scan = new Scan(); scan.readFields(dis); return scan; }
java
public static Scan convertStringToScan(String base64) throws IOException { ByteArrayInputStream bis = new ByteArrayInputStream(Base64.decode(base64)); DataInputStream dis = new DataInputStream(bis); Scan scan = new Scan(); scan.readFields(dis); return scan; }
[ "public", "static", "Scan", "convertStringToScan", "(", "String", "base64", ")", "throws", "IOException", "{", "ByteArrayInputStream", "bis", "=", "new", "ByteArrayInputStream", "(", "Base64", ".", "decode", "(", "base64", ")", ")", ";", "DataInputStream", "dis", ...
Converts the given Base64 string back into a Scan instance. @param base64 The scan details. @return The newly created Scan instance. @throws IOException When reading the scan instance fails.
[ "Converts", "the", "given", "Base64", "string", "back", "into", "a", "Scan", "instance", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-addons/hbase/src/main/java/eu/stratosphere/addons/hbase/common/HBaseUtil.java#L55-L61
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java
LibraryCacheManager.incrementReferenceCounter
private int incrementReferenceCounter(final JobID jobID) { while (true) { AtomicInteger ai = this.libraryReferenceCounter.get(jobID); if (ai == null) { ai = new AtomicInteger(1); if (this.libraryReferenceCounter.putIfAbsent(jobID, ai) == null) { return 1; } // We had a race, try again ...
java
private int incrementReferenceCounter(final JobID jobID) { while (true) { AtomicInteger ai = this.libraryReferenceCounter.get(jobID); if (ai == null) { ai = new AtomicInteger(1); if (this.libraryReferenceCounter.putIfAbsent(jobID, ai) == null) { return 1; } // We had a race, try again ...
[ "private", "int", "incrementReferenceCounter", "(", "final", "JobID", "jobID", ")", "{", "while", "(", "true", ")", "{", "AtomicInteger", "ai", "=", "this", ".", "libraryReferenceCounter", ".", "get", "(", "jobID", ")", ";", "if", "(", "ai", "==", "null", ...
Increments the reference counter for the library manager entry with the given job ID. @param jobID the job ID identifying the library manager entry @return the increased reference counter
[ "Increments", "the", "reference", "counter", "for", "the", "library", "manager", "entry", "with", "the", "given", "job", "ID", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java#L168-L185
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java
LibraryCacheManager.decrementReferenceCounter
private int decrementReferenceCounter(final JobID jobID) { final AtomicInteger ai = this.libraryReferenceCounter.get(jobID); if (ai == null) { throw new IllegalStateException("Cannot find reference counter entry for job " + jobID); } int retVal = ai.decrementAndGet(); if (retVal == 0) { this.library...
java
private int decrementReferenceCounter(final JobID jobID) { final AtomicInteger ai = this.libraryReferenceCounter.get(jobID); if (ai == null) { throw new IllegalStateException("Cannot find reference counter entry for job " + jobID); } int retVal = ai.decrementAndGet(); if (retVal == 0) { this.library...
[ "private", "int", "decrementReferenceCounter", "(", "final", "JobID", "jobID", ")", "{", "final", "AtomicInteger", "ai", "=", "this", ".", "libraryReferenceCounter", ".", "get", "(", "jobID", ")", ";", "if", "(", "ai", "==", "null", ")", "{", "throw", "new...
Decrements the reference counter for the library manager entry with the given job ID. @param jobID the job ID identifying the library manager entry @return the decremented reference counter
[ "Decrements", "the", "reference", "counter", "for", "the", "library", "manager", "entry", "with", "the", "given", "job", "ID", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java#L194-L209
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java
LibraryCacheManager.register
public static void register(final JobID id, final String[] requiredJarFiles) throws IOException { final LibraryCacheManager lib = get(); lib.registerInternal(id, requiredJarFiles); }
java
public static void register(final JobID id, final String[] requiredJarFiles) throws IOException { final LibraryCacheManager lib = get(); lib.registerInternal(id, requiredJarFiles); }
[ "public", "static", "void", "register", "(", "final", "JobID", "id", ",", "final", "String", "[", "]", "requiredJarFiles", ")", "throws", "IOException", "{", "final", "LibraryCacheManager", "lib", "=", "get", "(", ")", ";", "lib", ".", "registerInternal", "(...
Registers a job ID with a set of library paths that are required to run the job. For every registered job the library cache manager creates a class loader that is used to instantiate the job's environment later on. @param id the ID of the job to be registered. @param clientPaths the client path's of the required libra...
[ "Registers", "a", "job", "ID", "with", "a", "set", "of", "library", "paths", "that", "are", "required", "to", "run", "the", "job", ".", "For", "every", "registered", "job", "the", "library", "cache", "manager", "creates", "a", "class", "loader", "that", ...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java#L274-L278
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java
LibraryCacheManager.registerInternal
private void registerInternal(final JobID id, final String[] requiredJarFiles) throws IOException { // Use spin lock here while (this.lockMap.putIfAbsent(id, LOCK_OBJECT) != null); try { if (incrementReferenceCounter(id) > 1) { return; } // Check if library manager entry for this id already exists...
java
private void registerInternal(final JobID id, final String[] requiredJarFiles) throws IOException { // Use spin lock here while (this.lockMap.putIfAbsent(id, LOCK_OBJECT) != null); try { if (incrementReferenceCounter(id) > 1) { return; } // Check if library manager entry for this id already exists...
[ "private", "void", "registerInternal", "(", "final", "JobID", "id", ",", "final", "String", "[", "]", "requiredJarFiles", ")", "throws", "IOException", "{", "// Use spin lock here", "while", "(", "this", ".", "lockMap", ".", "putIfAbsent", "(", "id", ",", "LOC...
Registers a job ID with a set of library paths that are required to run the job. For every registered job the library cache manager creates a class loader that is used to instantiate the vertex's environment later on. @param id the ID of the job to be registered. @param clientPaths the client path's of the required li...
[ "Registers", "a", "job", "ID", "with", "a", "set", "of", "library", "paths", "that", "are", "required", "to", "run", "the", "job", ".", "For", "every", "registered", "job", "the", "library", "cache", "manager", "creates", "a", "class", "loader", "that", ...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java#L292-L335
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java
EventCollector.getEventsForJob
public void getEventsForJob(final JobID jobID, final List<AbstractEvent> eventList, final boolean includeManagementEvents) { synchronized (this.collectedEvents) { List<AbstractEvent> eventsForJob = this.collectedEvents.get(jobID); if (eventsForJob != null) { final Iterator<AbstractEvent> it = eventsFo...
java
public void getEventsForJob(final JobID jobID, final List<AbstractEvent> eventList, final boolean includeManagementEvents) { synchronized (this.collectedEvents) { List<AbstractEvent> eventsForJob = this.collectedEvents.get(jobID); if (eventsForJob != null) { final Iterator<AbstractEvent> it = eventsFo...
[ "public", "void", "getEventsForJob", "(", "final", "JobID", "jobID", ",", "final", "List", "<", "AbstractEvent", ">", "eventList", ",", "final", "boolean", "includeManagementEvents", ")", "{", "synchronized", "(", "this", ".", "collectedEvents", ")", "{", "List"...
Retrieves and adds the collected events for the job with the given job ID to the provided list. @param jobID the ID of the job to retrieve the events for @param eventList the list to which the events shall be added @param includeManagementEvents <code>true</code> if {@link ManagementEvent} objects shall be added to th...
[ "Retrieves", "and", "adds", "the", "collected", "events", "for", "the", "job", "with", "the", "given", "job", "ID", "to", "the", "provided", "list", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java#L348-L367
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java
EventCollector.addEvent
private void addEvent(JobID jobID, AbstractEvent event) { synchronized (this.collectedEvents) { List<AbstractEvent> eventList = this.collectedEvents.get(jobID); if (eventList == null) { eventList = new ArrayList<AbstractEvent>(); this.collectedEvents.put(jobID, eventList); } eventList.add(event...
java
private void addEvent(JobID jobID, AbstractEvent event) { synchronized (this.collectedEvents) { List<AbstractEvent> eventList = this.collectedEvents.get(jobID); if (eventList == null) { eventList = new ArrayList<AbstractEvent>(); this.collectedEvents.put(jobID, eventList); } eventList.add(event...
[ "private", "void", "addEvent", "(", "JobID", "jobID", ",", "AbstractEvent", "event", ")", "{", "synchronized", "(", "this", ".", "collectedEvents", ")", "{", "List", "<", "AbstractEvent", ">", "eventList", "=", "this", ".", "collectedEvents", ".", "get", "("...
Adds an event to the job's event list. @param jobID the ID of the job the event belongs to @param event the event to be added to the job's event list
[ "Adds", "an", "event", "to", "the", "job", "s", "event", "list", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java#L407-L419
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java
EventCollector.registerJob
public void registerJob(final ExecutionGraph executionGraph, final boolean profilingAvailable, final long submissionTimestamp) { final Iterator<ExecutionVertex> it = new ExecutionGraphIterator(executionGraph, true); while (it.hasNext()) { final ExecutionVertex vertex = it.next(); // Register the listen...
java
public void registerJob(final ExecutionGraph executionGraph, final boolean profilingAvailable, final long submissionTimestamp) { final Iterator<ExecutionVertex> it = new ExecutionGraphIterator(executionGraph, true); while (it.hasNext()) { final ExecutionVertex vertex = it.next(); // Register the listen...
[ "public", "void", "registerJob", "(", "final", "ExecutionGraph", "executionGraph", ",", "final", "boolean", "profilingAvailable", ",", "final", "long", "submissionTimestamp", ")", "{", "final", "Iterator", "<", "ExecutionVertex", ">", "it", "=", "new", "ExecutionGra...
Registers a job in form of its execution graph representation with the job progress collector. The collector will subscribe to state changes of the individual subtasks. A separate deregistration is not necessary since the job progress collector periodically discards outdated progress information. @param executionGraph...
[ "Registers", "a", "job", "in", "form", "of", "its", "execution", "graph", "representation", "with", "the", "job", "progress", "collector", ".", "The", "collector", "will", "subscribe", "to", "state", "changes", "of", "the", "individual", "subtasks", ".", "A", ...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java#L462-L482
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java
EventCollector.run
@Override public void run() { final long currentTime = System.currentTimeMillis(); synchronized (this.collectedEvents) { final Iterator<JobID> it = this.collectedEvents.keySet().iterator(); while (it.hasNext()) { final JobID jobID = it.next(); final List<AbstractEvent> eventList = this.collectedE...
java
@Override public void run() { final long currentTime = System.currentTimeMillis(); synchronized (this.collectedEvents) { final Iterator<JobID> it = this.collectedEvents.keySet().iterator(); while (it.hasNext()) { final JobID jobID = it.next(); final List<AbstractEvent> eventList = this.collectedE...
[ "@", "Override", "public", "void", "run", "(", ")", "{", "final", "long", "currentTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "synchronized", "(", "this", ".", "collectedEvents", ")", "{", "final", "Iterator", "<", "JobID", ">", "it", ...
This method will periodically be called to clean up expired collected events.
[ "This", "method", "will", "periodically", "be", "called", "to", "clean", "up", "expired", "collected", "events", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java#L488-L550
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java
EventCollector.updateManagementGraph
private void updateManagementGraph(final JobID jobID, final VertexAssignmentEvent vertexAssignmentEvent) { synchronized (this.recentManagementGraphs) { final ManagementGraph managementGraph = this.recentManagementGraphs.get(jobID); if (managementGraph == null) { return; } final ManagementVertex vert...
java
private void updateManagementGraph(final JobID jobID, final VertexAssignmentEvent vertexAssignmentEvent) { synchronized (this.recentManagementGraphs) { final ManagementGraph managementGraph = this.recentManagementGraphs.get(jobID); if (managementGraph == null) { return; } final ManagementVertex vert...
[ "private", "void", "updateManagementGraph", "(", "final", "JobID", "jobID", ",", "final", "VertexAssignmentEvent", "vertexAssignmentEvent", ")", "{", "synchronized", "(", "this", ".", "recentManagementGraphs", ")", "{", "final", "ManagementGraph", "managementGraph", "="...
Applies changes in the vertex assignment to the stored management graph. @param jobID the ID of the job whose management graph shall be updated @param vertexAssignmentEvent the event describing the changes in the vertex assignment
[ "Applies", "changes", "in", "the", "vertex", "assignment", "to", "the", "stored", "management", "graph", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java#L598-L614
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java
EventCollector.updateManagementGraph
private void updateManagementGraph(final JobID jobID, final ExecutionStateChangeEvent executionStateChangeEvent, String optionalMessage) { synchronized (this.recentManagementGraphs) { final ManagementGraph managementGraph = this.recentManagementGraphs.get(jobID); if (managementGraph == null) { return; ...
java
private void updateManagementGraph(final JobID jobID, final ExecutionStateChangeEvent executionStateChangeEvent, String optionalMessage) { synchronized (this.recentManagementGraphs) { final ManagementGraph managementGraph = this.recentManagementGraphs.get(jobID); if (managementGraph == null) { return; ...
[ "private", "void", "updateManagementGraph", "(", "final", "JobID", "jobID", ",", "final", "ExecutionStateChangeEvent", "executionStateChangeEvent", ",", "String", "optionalMessage", ")", "{", "synchronized", "(", "this", ".", "recentManagementGraphs", ")", "{", "final",...
Applies changes in the state of an execution vertex to the stored management graph. @param jobID the ID of the job whose management graph shall be updated @param executionStateChangeEvent the event describing the changes in the execution state of the vertex
[ "Applies", "changes", "in", "the", "state", "of", "an", "execution", "vertex", "to", "the", "stored", "management", "graph", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java#L624-L642
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/gates/InputGate.java
InputGate.readRecord
public InputChannelResult readRecord(T target) throws IOException, InterruptedException { if (this.channelToReadFrom == -1) { if (this.isClosed()) { return InputChannelResult.END_OF_STREAM; } if (Thread.interrupted()) { throw new InterruptedException(); } this.channelToReadFrom = wai...
java
public InputChannelResult readRecord(T target) throws IOException, InterruptedException { if (this.channelToReadFrom == -1) { if (this.isClosed()) { return InputChannelResult.END_OF_STREAM; } if (Thread.interrupted()) { throw new InterruptedException(); } this.channelToReadFrom = wai...
[ "public", "InputChannelResult", "readRecord", "(", "T", "target", ")", "throws", "IOException", ",", "InterruptedException", "{", "if", "(", "this", ".", "channelToReadFrom", "==", "-", "1", ")", "{", "if", "(", "this", ".", "isClosed", "(", ")", ")", "{",...
Reads a record from one of the associated input channels. Channels are read such that one buffer from a channel is consecutively consumed. The buffers in turn are consumed in the order in which they arrive. Note that this method is not guaranteed to return a record, because the currently available channel data may not ...
[ "Reads", "a", "record", "from", "one", "of", "the", "associated", "input", "channels", ".", "Channels", "are", "read", "such", "that", "one", "buffer", "from", "a", "channel", "is", "consecutively", "consumed", ".", "The", "buffers", "in", "turn", "are", "...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/gates/InputGate.java#L157-L201
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/gates/InputGate.java
InputGate.notifyRecordIsAvailable
public void notifyRecordIsAvailable(int channelIndex) { this.availableChannels.add(Integer.valueOf(channelIndex)); RecordAvailabilityListener<T> listener = this.recordAvailabilityListener.get(); if (listener != null) { listener.reportRecordAvailability(this); } }
java
public void notifyRecordIsAvailable(int channelIndex) { this.availableChannels.add(Integer.valueOf(channelIndex)); RecordAvailabilityListener<T> listener = this.recordAvailabilityListener.get(); if (listener != null) { listener.reportRecordAvailability(this); } }
[ "public", "void", "notifyRecordIsAvailable", "(", "int", "channelIndex", ")", "{", "this", ".", "availableChannels", ".", "add", "(", "Integer", ".", "valueOf", "(", "channelIndex", ")", ")", ";", "RecordAvailabilityListener", "<", "T", ">", "listener", "=", "...
Notify the gate that the channel with the given index has at least one record available. @param channelIndex the index of the channel which has at least one record available
[ "Notify", "the", "gate", "that", "the", "channel", "with", "the", "given", "index", "has", "at", "least", "one", "record", "available", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/gates/InputGate.java#L216-L223
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/gates/InputGate.java
InputGate.close
public void close() throws IOException, InterruptedException { for (int i = 0; i < this.getNumberOfInputChannels(); i++) { final InputChannel<T> inputChannel = this.channels[i]; inputChannel.close(); } }
java
public void close() throws IOException, InterruptedException { for (int i = 0; i < this.getNumberOfInputChannels(); i++) { final InputChannel<T> inputChannel = this.channels[i]; inputChannel.close(); } }
[ "public", "void", "close", "(", ")", "throws", "IOException", ",", "InterruptedException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "getNumberOfInputChannels", "(", ")", ";", "i", "++", ")", "{", "final", "InputChannel", "<", ...
Immediately closes the input gate and all its input channels. The corresponding output channels are notified. Any remaining records in any buffers or queue is considered irrelevant and is discarded. @throws IOException thrown if an I/O error occurs while closing the gate @throws InterruptedException thrown if the thre...
[ "Immediately", "closes", "the", "input", "gate", "and", "all", "its", "input", "channels", ".", "The", "corresponding", "output", "channels", "are", "notified", ".", "Any", "remaining", "records", "in", "any", "buffers", "or", "queue", "is", "considered", "irr...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/gates/InputGate.java#L267-L274
train
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/core/fs/Path.java
Path.hasWindowsDrive
private boolean hasWindowsDrive(String path, boolean slashed) { if (!OperatingSystem.isWindows()) { return false; } final int start = slashed ? 1 : 0; return path.length() >= start + 2 && (slashed ? path.charAt(0) == '/' : true) && path.charAt(start + 1) == ':' && ((path.charAt(start) >= 'A' && path...
java
private boolean hasWindowsDrive(String path, boolean slashed) { if (!OperatingSystem.isWindows()) { return false; } final int start = slashed ? 1 : 0; return path.length() >= start + 2 && (slashed ? path.charAt(0) == '/' : true) && path.charAt(start + 1) == ':' && ((path.charAt(start) >= 'A' && path...
[ "private", "boolean", "hasWindowsDrive", "(", "String", "path", ",", "boolean", "slashed", ")", "{", "if", "(", "!", "OperatingSystem", ".", "isWindows", "(", ")", ")", "{", "return", "false", ";", "}", "final", "int", "start", "=", "slashed", "?", "1", ...
Checks if the provided path string contains a windows drive letter. @param path the path to check @param slashed <code>true</code> to indicate the first character of the string is a slash, <code>false</code> otherwise @return <code>true</code> if the path string contains a windows drive letter, <code>false</code> othe...
[ "Checks", "if", "the", "provided", "path", "string", "contains", "a", "windows", "drive", "letter", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/core/fs/Path.java#L264-L274
train
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/api/common/io/BinaryInputFormat.java
BinaryInputFormat.createStatistics
protected SequentialStatistics createStatistics(List<FileStatus> files, FileBaseStatistics stats) throws IOException { if (files.isEmpty()) { return null; } BlockInfo blockInfo = this.createBlockInfo(); long totalCount = 0; for (FileStatus file : files) { // invalid file if (file.getLen() < bloc...
java
protected SequentialStatistics createStatistics(List<FileStatus> files, FileBaseStatistics stats) throws IOException { if (files.isEmpty()) { return null; } BlockInfo blockInfo = this.createBlockInfo(); long totalCount = 0; for (FileStatus file : files) { // invalid file if (file.getLen() < bloc...
[ "protected", "SequentialStatistics", "createStatistics", "(", "List", "<", "FileStatus", ">", "files", ",", "FileBaseStatistics", "stats", ")", "throws", "IOException", "{", "if", "(", "files", ".", "isEmpty", "(", ")", ")", "{", "return", "null", ";", "}", ...
Fill in the statistics. The last modification time and the total input size are prefilled. @param files The files that are associated with this block input format. @param stats The pre-filled statistics.
[ "Fill", "in", "the", "statistics", ".", "The", "last", "modification", "time", "and", "the", "total", "input", "size", "are", "prefilled", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/api/common/io/BinaryInputFormat.java#L197-L223
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementVertex.java
ManagementVertex.addGate
void addGate(final ManagementGate gate) { if (gate.isInputGate()) { this.inputGates.add(gate); } else { this.outputGates.add(gate); } }
java
void addGate(final ManagementGate gate) { if (gate.isInputGate()) { this.inputGates.add(gate); } else { this.outputGates.add(gate); } }
[ "void", "addGate", "(", "final", "ManagementGate", "gate", ")", "{", "if", "(", "gate", ".", "isInputGate", "(", ")", ")", "{", "this", ".", "inputGates", ".", "add", "(", "gate", ")", ";", "}", "else", "{", "this", ".", "outputGates", ".", "add", ...
Adds a management gate to this vertex. @param gate the management gate to be added
[ "Adds", "a", "management", "gate", "to", "this", "vertex", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementVertex.java#L116-L123
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementVertex.java
ManagementVertex.getInputGate
public ManagementGate getInputGate(final int index) { if (index < this.inputGates.size()) { return this.inputGates.get(index); } return null; }
java
public ManagementGate getInputGate(final int index) { if (index < this.inputGates.size()) { return this.inputGates.get(index); } return null; }
[ "public", "ManagementGate", "getInputGate", "(", "final", "int", "index", ")", "{", "if", "(", "index", "<", "this", ".", "inputGates", ".", "size", "(", ")", ")", "{", "return", "this", ".", "inputGates", ".", "get", "(", "index", ")", ";", "}", "re...
Returns the input gate at the given index. @param index the index of the input gate to be returned @return the input gate at the given index or <code>null</code> if no such input gate exists
[ "Returns", "the", "input", "gate", "at", "the", "given", "index", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementVertex.java#L168-L175
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementVertex.java
ManagementVertex.getOutputGate
public ManagementGate getOutputGate(final int index) { if (index < this.outputGates.size()) { return this.outputGates.get(index); } return null; }
java
public ManagementGate getOutputGate(final int index) { if (index < this.outputGates.size()) { return this.outputGates.get(index); } return null; }
[ "public", "ManagementGate", "getOutputGate", "(", "final", "int", "index", ")", "{", "if", "(", "index", "<", "this", ".", "outputGates", ".", "size", "(", ")", ")", "{", "return", "this", ".", "outputGates", ".", "get", "(", "index", ")", ";", "}", ...
Returns the output gate at the given index. @param index the index of the output gate to be returned @return the output gate at the given index or <code>null</code> if no such output gate exists
[ "Returns", "the", "output", "gate", "at", "the", "given", "index", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementVertex.java#L184-L191
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementVertex.java
ManagementVertex.toJson
public String toJson() { StringBuilder json = new StringBuilder(""); json.append("{"); json.append("\"vertexid\": \"" + this.getID() + "\","); json.append("\"vertexname\": \"" + StringUtils.escapeHtml(this.toString()) + "\","); json.append("\"vertexstatus\": \"" + this.getExecutionState() + "\","); json.app...
java
public String toJson() { StringBuilder json = new StringBuilder(""); json.append("{"); json.append("\"vertexid\": \"" + this.getID() + "\","); json.append("\"vertexname\": \"" + StringUtils.escapeHtml(this.toString()) + "\","); json.append("\"vertexstatus\": \"" + this.getExecutionState() + "\","); json.app...
[ "public", "String", "toJson", "(", ")", "{", "StringBuilder", "json", "=", "new", "StringBuilder", "(", "\"\"", ")", ";", "json", ".", "append", "(", "\"{\"", ")", ";", "json", ".", "append", "(", "\"\\\"vertexid\\\": \\\"\"", "+", "this", ".", "getID", ...
Returns Json representation of this ManagementVertex @return
[ "Returns", "Json", "representation", "of", "this", "ManagementVertex" ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementVertex.java#L347-L357
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/pact/runtime/iterative/concurrent/SuperstepBarrier.java
SuperstepBarrier.eventOccurred
@Override public void eventOccurred(AbstractTaskEvent event) { if (event instanceof TerminationEvent) { terminationSignaled = true; } else if (event instanceof AllWorkersDoneEvent) { AllWorkersDoneEvent wde = (AllWorkersDoneEvent) event; aggregatorNames = wde.getAggregatorNames(); aggregates = wde.ge...
java
@Override public void eventOccurred(AbstractTaskEvent event) { if (event instanceof TerminationEvent) { terminationSignaled = true; } else if (event instanceof AllWorkersDoneEvent) { AllWorkersDoneEvent wde = (AllWorkersDoneEvent) event; aggregatorNames = wde.getAggregatorNames(); aggregates = wde.ge...
[ "@", "Override", "public", "void", "eventOccurred", "(", "AbstractTaskEvent", "event", ")", "{", "if", "(", "event", "instanceof", "TerminationEvent", ")", "{", "terminationSignaled", "=", "true", ";", "}", "else", "if", "(", "event", "instanceof", "AllWorkersDo...
barrier will release the waiting thread if an event occurs
[ "barrier", "will", "release", "the", "waiting", "thread", "if", "an", "event", "occurs" ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/pact/runtime/iterative/concurrent/SuperstepBarrier.java#L63-L78
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/web/JobmanagerInfoServlet.java
JobmanagerInfoServlet.writeJsonForJobs
private void writeJsonForJobs(PrintWriter wrt, List<RecentJobEvent> jobs) { try { wrt.write("["); // Loop Jobs for (int i = 0; i < jobs.size(); i++) { RecentJobEvent jobEvent = jobs.get(i); writeJsonForJob(wrt, jobEvent); //Write seperator between json objects if(i != jobs.size(...
java
private void writeJsonForJobs(PrintWriter wrt, List<RecentJobEvent> jobs) { try { wrt.write("["); // Loop Jobs for (int i = 0; i < jobs.size(); i++) { RecentJobEvent jobEvent = jobs.get(i); writeJsonForJob(wrt, jobEvent); //Write seperator between json objects if(i != jobs.size(...
[ "private", "void", "writeJsonForJobs", "(", "PrintWriter", "wrt", ",", "List", "<", "RecentJobEvent", ">", "jobs", ")", "{", "try", "{", "wrt", ".", "write", "(", "\"[\"", ")", ";", "// Loop Jobs", "for", "(", "int", "i", "=", "0", ";", "i", "<", "jo...
Writes ManagementGraph as Json for all recent jobs @param wrt @param jobs
[ "Writes", "ManagementGraph", "as", "Json", "for", "all", "recent", "jobs" ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/web/JobmanagerInfoServlet.java#L119-L144
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/web/JobmanagerInfoServlet.java
JobmanagerInfoServlet.writeJsonForArchive
private void writeJsonForArchive(PrintWriter wrt, List<RecentJobEvent> jobs) { wrt.write("["); // sort jobs by time Collections.sort(jobs, new Comparator<RecentJobEvent>() { @Override public int compare(RecentJobEvent o1, RecentJobEvent o2) { if(o1.getTimestamp() < o2.getTimestamp()) { retur...
java
private void writeJsonForArchive(PrintWriter wrt, List<RecentJobEvent> jobs) { wrt.write("["); // sort jobs by time Collections.sort(jobs, new Comparator<RecentJobEvent>() { @Override public int compare(RecentJobEvent o1, RecentJobEvent o2) { if(o1.getTimestamp() < o2.getTimestamp()) { retur...
[ "private", "void", "writeJsonForArchive", "(", "PrintWriter", "wrt", ",", "List", "<", "RecentJobEvent", ">", "jobs", ")", "{", "wrt", ".", "write", "(", "\"[\"", ")", ";", "// sort jobs by time", "Collections", ".", "sort", "(", "jobs", ",", "new", "Compara...
Writes Json with a list of currently archived jobs, sorted by time @param wrt @param jobs
[ "Writes", "Json", "with", "a", "list", "of", "currently", "archived", "jobs", "sorted", "by", "time" ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/web/JobmanagerInfoServlet.java#L180-L217
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java
TaskManager.main
@SuppressWarnings("static-access") public static void main(String[] args) throws IOException { Option configDirOpt = OptionBuilder.withArgName("config directory").hasArg().withDescription( "Specify configuration directory.").create("configDir"); // tempDir option is used by the YARN client. Option tempDir =...
java
@SuppressWarnings("static-access") public static void main(String[] args) throws IOException { Option configDirOpt = OptionBuilder.withArgName("config directory").hasArg().withDescription( "Specify configuration directory.").create("configDir"); // tempDir option is used by the YARN client. Option tempDir =...
[ "@", "SuppressWarnings", "(", "\"static-access\"", ")", "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "IOException", "{", "Option", "configDirOpt", "=", "OptionBuilder", ".", "withArgName", "(", "\"config directory\"", ")", ...
Entry point for the program. @param args arguments from the command line @throws IOException
[ "Entry", "point", "for", "the", "program", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java#L391-L452
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java
TaskManager.runHeartbeatLoop
private void runHeartbeatLoop() { final long interval = GlobalConfiguration.getInteger( ConfigConstants.TASK_MANAGER_HEARTBEAT_INTERVAL_KEY, ConfigConstants.DEFAULT_TASK_MANAGER_HEARTBEAT_INTERVAL); while (!shutdownStarted.get()) { // send heart beat try { LOG.debug("heartbeat"); this.job...
java
private void runHeartbeatLoop() { final long interval = GlobalConfiguration.getInteger( ConfigConstants.TASK_MANAGER_HEARTBEAT_INTERVAL_KEY, ConfigConstants.DEFAULT_TASK_MANAGER_HEARTBEAT_INTERVAL); while (!shutdownStarted.get()) { // send heart beat try { LOG.debug("heartbeat"); this.job...
[ "private", "void", "runHeartbeatLoop", "(", ")", "{", "final", "long", "interval", "=", "GlobalConfiguration", ".", "getInteger", "(", "ConfigConstants", ".", "TASK_MANAGER_HEARTBEAT_INTERVAL_KEY", ",", "ConfigConstants", ".", "DEFAULT_TASK_MANAGER_HEARTBEAT_INTERVAL", ")",...
This method send the periodic heartbeats.
[ "This", "method", "send", "the", "periodic", "heartbeats", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java#L457-L485
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java
TaskManager.getTaskManagerAddress
private InetAddress getTaskManagerAddress(InetSocketAddress jobManagerAddress) throws IOException { AddressDetectionState strategy = AddressDetectionState.ADDRESS; while (true) { Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces(); while (e.hasMoreElements()) { NetworkInterface n = ...
java
private InetAddress getTaskManagerAddress(InetSocketAddress jobManagerAddress) throws IOException { AddressDetectionState strategy = AddressDetectionState.ADDRESS; while (true) { Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces(); while (e.hasMoreElements()) { NetworkInterface n = ...
[ "private", "InetAddress", "getTaskManagerAddress", "(", "InetSocketAddress", "jobManagerAddress", ")", "throws", "IOException", "{", "AddressDetectionState", "strategy", "=", "AddressDetectionState", ".", "ADDRESS", ";", "while", "(", "true", ")", "{", "Enumeration", "<...
Find out the TaskManager's own IP address.
[ "Find", "out", "the", "TaskManager", "s", "own", "IP", "address", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java#L511-L558
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java
TaskManager.createAndRegisterTask
private Task createAndRegisterTask(final ExecutionVertexID id, final Configuration jobConfiguration, final RuntimeEnvironment environment) throws InsufficientResourcesException, IOException { if (id == null) { throw new IllegalArgumentException("Argument id is null"); } if (environment == null) { ...
java
private Task createAndRegisterTask(final ExecutionVertexID id, final Configuration jobConfiguration, final RuntimeEnvironment environment) throws InsufficientResourcesException, IOException { if (id == null) { throw new IllegalArgumentException("Argument id is null"); } if (environment == null) { ...
[ "private", "Task", "createAndRegisterTask", "(", "final", "ExecutionVertexID", "id", ",", "final", "Configuration", "jobConfiguration", ",", "final", "RuntimeEnvironment", "environment", ")", "throws", "InsufficientResourcesException", ",", "IOException", "{", "if", "(", ...
Registers an newly incoming runtime task with the task manager. @param id the ID of the task to register @param jobConfiguration the job configuration that has been attached to the original job graph @param environment the environment of the task to be registered @return the task to be started or <code>null</code> if ...
[ "Registers", "an", "newly", "incoming", "runtime", "task", "with", "the", "task", "manager", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java#L733-L784
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java
TaskManager.unregisterTask
private void unregisterTask(final ExecutionVertexID id) { // Task de-registration must be atomic synchronized (this) { final Task task = this.runningTasks.remove(id); if (task == null) { LOG.error("Cannot find task with ID " + id + " to unregister"); return; } // remove the local tmp file for...
java
private void unregisterTask(final ExecutionVertexID id) { // Task de-registration must be atomic synchronized (this) { final Task task = this.runningTasks.remove(id); if (task == null) { LOG.error("Cannot find task with ID " + id + " to unregister"); return; } // remove the local tmp file for...
[ "private", "void", "unregisterTask", "(", "final", "ExecutionVertexID", "id", ")", "{", "// Task de-registration must be atomic", "synchronized", "(", "this", ")", "{", "final", "Task", "task", "=", "this", ".", "runningTasks", ".", "remove", "(", "id", ")", ";"...
Unregisters a finished or aborted task. @param id the ID of the task to be unregistered
[ "Unregisters", "a", "finished", "or", "aborted", "task", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java#L792-L825
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java
TaskManager.shutdown
public void shutdown() { if (!this.shutdownStarted.compareAndSet(false, true)) { return; } LOG.info("Shutting down TaskManager"); // first, stop the heartbeat thread and wait for it to terminate this.heartbeatThread.interrupt(); try { this.heartbeatThread.join(1000); } catch (InterruptedExcepti...
java
public void shutdown() { if (!this.shutdownStarted.compareAndSet(false, true)) { return; } LOG.info("Shutting down TaskManager"); // first, stop the heartbeat thread and wait for it to terminate this.heartbeatThread.interrupt(); try { this.heartbeatThread.join(1000); } catch (InterruptedExcepti...
[ "public", "void", "shutdown", "(", ")", "{", "if", "(", "!", "this", ".", "shutdownStarted", ".", "compareAndSet", "(", "false", ",", "true", ")", ")", "{", "return", ";", "}", "LOG", ".", "info", "(", "\"Shutting down TaskManager\"", ")", ";", "// first...
Shuts the task manager down.
[ "Shuts", "the", "task", "manager", "down", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java#L879-L940
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java
TaskManager.checkTempDirs
private static final void checkTempDirs(final String[] tempDirs) throws Exception { for (int i = 0; i < tempDirs.length; ++i) { final String dir = tempDirs[i]; if (dir == null) { throw new Exception("Temporary file directory #" + (i + 1) + " is null."); } final File f = new File(dir); if (!f.ex...
java
private static final void checkTempDirs(final String[] tempDirs) throws Exception { for (int i = 0; i < tempDirs.length; ++i) { final String dir = tempDirs[i]; if (dir == null) { throw new Exception("Temporary file directory #" + (i + 1) + " is null."); } final File f = new File(dir); if (!f.ex...
[ "private", "static", "final", "void", "checkTempDirs", "(", "final", "String", "[", "]", "tempDirs", ")", "throws", "Exception", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tempDirs", ".", "length", ";", "++", "i", ")", "{", "final", "Stri...
Checks, whether the given strings describe existing directories that are writable. If that is not the case, an exception is raised. @param tempDirs An array of strings which are checked to be paths to writable directories. @throws Exception Thrown, if any of the mentioned checks fails.
[ "Checks", "whether", "the", "given", "strings", "describe", "existing", "directories", "that", "are", "writable", ".", "If", "that", "is", "not", "the", "case", "an", "exception", "is", "raised", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java#L987-L1010
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java
JobManager.logVersionInformation
private static void logVersionInformation() { String version = JobManager.class.getPackage().getImplementationVersion(); // if version == null, then the JobManager runs from inside the IDE (or somehow not from the maven build jar) String revision = "<unknown>"; try { Properties properties = new Properties();...
java
private static void logVersionInformation() { String version = JobManager.class.getPackage().getImplementationVersion(); // if version == null, then the JobManager runs from inside the IDE (or somehow not from the maven build jar) String revision = "<unknown>"; try { Properties properties = new Properties();...
[ "private", "static", "void", "logVersionInformation", "(", ")", "{", "String", "version", "=", "JobManager", ".", "class", ".", "getPackage", "(", ")", ".", "getImplementationVersion", "(", ")", ";", "// if version == null, then the JobManager runs from inside the IDE (or...
Log Stratosphere version information.
[ "Log", "Stratosphere", "version", "information", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java#L308-L323
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java
JobManager.main
public static void main(String[] args) { // determine if a valid log4j config exists and initialize a default logger if not if (System.getProperty("log4j.configuration") == null) { Logger root = Logger.getRootLogger(); root.removeAllAppenders(); PatternLayout layout = new PatternLayout("%d{HH:mm:ss,SSS} %-...
java
public static void main(String[] args) { // determine if a valid log4j config exists and initialize a default logger if not if (System.getProperty("log4j.configuration") == null) { Logger root = Logger.getRootLogger(); root.removeAllAppenders(); PatternLayout layout = new PatternLayout("%d{HH:mm:ss,SSS} %-...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "// determine if a valid log4j config exists and initialize a default logger if not", "if", "(", "System", ".", "getProperty", "(", "\"log4j.configuration\"", ")", "==", "null", ")", "{", "...
Entry point for the program @param args arguments from the command line
[ "Entry", "point", "for", "the", "program" ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java#L332-L362
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java
JobManager.cancelJob
private TaskCancelResult cancelJob(final ExecutionGraph eg) { TaskCancelResult errorResult = null; /** * Cancel all nodes in the current and upper execution stages. */ final Iterator<ExecutionVertex> it = new ExecutionGraphIterator(eg, eg.getIndexOfCurrentExecutionStage(), false, true); while (it.has...
java
private TaskCancelResult cancelJob(final ExecutionGraph eg) { TaskCancelResult errorResult = null; /** * Cancel all nodes in the current and upper execution stages. */ final Iterator<ExecutionVertex> it = new ExecutionGraphIterator(eg, eg.getIndexOfCurrentExecutionStage(), false, true); while (it.has...
[ "private", "TaskCancelResult", "cancelJob", "(", "final", "ExecutionGraph", "eg", ")", "{", "TaskCancelResult", "errorResult", "=", "null", ";", "/**\n\t\t * Cancel all nodes in the current and upper execution stages.\n\t\t */", "final", "Iterator", "<", "ExecutionVertex", ">",...
Cancels all the tasks in the current and upper stages of the given execution graph. @param eg the execution graph representing the job to cancel. @return <code>null</code> if no error occurred during the cancel attempt, otherwise the returned object will describe the error
[ "Cancels", "all", "the", "tasks", "in", "the", "current", "and", "upper", "stages", "of", "the", "given", "execution", "graph", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java#L691-L710
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java
JobManager.getManagementGraph
@Override public ManagementGraph getManagementGraph(final JobID jobID) throws IOException { ManagementGraph mg = this.eventCollector.getManagementGraph(jobID); if (mg == null) { if(this.archive != null) { mg = this.archive.getManagementGraph(jobID); } if (mg == null) { throw new IOException("...
java
@Override public ManagementGraph getManagementGraph(final JobID jobID) throws IOException { ManagementGraph mg = this.eventCollector.getManagementGraph(jobID); if (mg == null) { if(this.archive != null) { mg = this.archive.getManagementGraph(jobID); } if (mg == null) { throw new IOException("...
[ "@", "Override", "public", "ManagementGraph", "getManagementGraph", "(", "final", "JobID", "jobID", ")", "throws", "IOException", "{", "ManagementGraph", "mg", "=", "this", ".", "eventCollector", ".", "getManagementGraph", "(", "jobID", ")", ";", "if", "(", "mg"...
Returns current ManagementGraph from eventCollector and, if not current, from archive {@inheritDoc}
[ "Returns", "current", "ManagementGraph", "from", "eventCollector", "and", "if", "not", "current", "from", "archive" ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java#L832-L847
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java
JobManager.startInfoServer
public void startInfoServer() { final Configuration config = GlobalConfiguration.getConfiguration(); // Start InfoServer try { int port = config.getInteger(ConfigConstants.JOB_MANAGER_WEB_PORT_KEY, ConfigConstants.DEFAULT_JOB_MANAGER_WEB_FRONTEND_PORT); server = new WebInfoServer(config, port, this); ser...
java
public void startInfoServer() { final Configuration config = GlobalConfiguration.getConfiguration(); // Start InfoServer try { int port = config.getInteger(ConfigConstants.JOB_MANAGER_WEB_PORT_KEY, ConfigConstants.DEFAULT_JOB_MANAGER_WEB_FRONTEND_PORT); server = new WebInfoServer(config, port, this); ser...
[ "public", "void", "startInfoServer", "(", ")", "{", "final", "Configuration", "config", "=", "GlobalConfiguration", ".", "getConfiguration", "(", ")", ";", "// Start InfoServer", "try", "{", "int", "port", "=", "config", ".", "getInteger", "(", "ConfigConstants", ...
Starts the Jetty Infoserver for the Jobmanager
[ "Starts", "the", "Jetty", "Infoserver", "for", "the", "Jobmanager" ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java#L1167-L1179
train
stratosphere/stratosphere
stratosphere-java/src/main/java/eu/stratosphere/api/java/io/CsvReader.java
CsvReader.types
public <T0, T1, T2> DataSource<Tuple3<T0, T1, T2>> types(Class<T0> type0, Class<T1> type1, Class<T2> type2) { TupleTypeInfo<Tuple3<T0, T1, T2>> types = TupleTypeInfo.getBasicTupleTypeInfo(type0, type1, type2); CsvInputFormat<Tuple3<T0, T1, T2>> inputFormat = new CsvInputFormat<Tuple3<T0, T1, T2>>(path); configure...
java
public <T0, T1, T2> DataSource<Tuple3<T0, T1, T2>> types(Class<T0> type0, Class<T1> type1, Class<T2> type2) { TupleTypeInfo<Tuple3<T0, T1, T2>> types = TupleTypeInfo.getBasicTupleTypeInfo(type0, type1, type2); CsvInputFormat<Tuple3<T0, T1, T2>> inputFormat = new CsvInputFormat<Tuple3<T0, T1, T2>>(path); configure...
[ "public", "<", "T0", ",", "T1", ",", "T2", ">", "DataSource", "<", "Tuple3", "<", "T0", ",", "T1", ",", "T2", ">", ">", "types", "(", "Class", "<", "T0", ">", "type0", ",", "Class", "<", "T1", ">", "type1", ",", "Class", "<", "T2", ">", "type...
Specifies the types for the CSV fields. This method parses the CSV data to a 3-tuple which has fields of the specified types. This method is overloaded for each possible length of the tuples to support type safe creation of data sets through CSV parsing. @param type0 The type of CSV field 0 and the type of field 0 in ...
[ "Specifies", "the", "types", "for", "the", "CSV", "fields", ".", "This", "method", "parses", "the", "CSV", "data", "to", "a", "3", "-", "tuple", "which", "has", "fields", "of", "the", "specified", "types", ".", "This", "method", "is", "overloaded", "for"...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-java/src/main/java/eu/stratosphere/api/java/io/CsvReader.java#L302-L307
train
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/api/common/operators/Ordering.java
Ordering.appendOrdering
public Ordering appendOrdering(Integer index, Class<? extends Key<?>> type, Order order) { if (index.intValue() < 0) { throw new IllegalArgumentException("The key index must not be negative."); } if (order == null) { throw new NullPointerException(); } if (order == Order.NONE) { throw new IllegalArgu...
java
public Ordering appendOrdering(Integer index, Class<? extends Key<?>> type, Order order) { if (index.intValue() < 0) { throw new IllegalArgumentException("The key index must not be negative."); } if (order == null) { throw new NullPointerException(); } if (order == Order.NONE) { throw new IllegalArgu...
[ "public", "Ordering", "appendOrdering", "(", "Integer", "index", ",", "Class", "<", "?", "extends", "Key", "<", "?", ">", ">", "type", ",", "Order", "order", ")", "{", "if", "(", "index", ".", "intValue", "(", ")", "<", "0", ")", "{", "throw", "new...
Extends this ordering by appending an additional order requirement. @param index Field index of the appended order requirement. @param type Type of the appended order requirement. @param order Order of the appended order requirement. @return This ordering with an additional appended order requirement.
[ "Extends", "this", "ordering", "by", "appending", "an", "additional", "order", "requirement", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/api/common/operators/Ordering.java#L58-L73
train
stratosphere/stratosphere
stratosphere-compiler/src/main/java/eu/stratosphere/compiler/dataproperties/GlobalProperties.java
GlobalProperties.setHashPartitioned
public void setHashPartitioned(FieldList partitionedFields) { this.partitioning = PartitioningProperty.HASH_PARTITIONED; this.partitioningFields = partitionedFields; this.ordering = null; }
java
public void setHashPartitioned(FieldList partitionedFields) { this.partitioning = PartitioningProperty.HASH_PARTITIONED; this.partitioningFields = partitionedFields; this.ordering = null; }
[ "public", "void", "setHashPartitioned", "(", "FieldList", "partitionedFields", ")", "{", "this", ".", "partitioning", "=", "PartitioningProperty", ".", "HASH_PARTITIONED", ";", "this", ".", "partitioningFields", "=", "partitionedFields", ";", "this", ".", "ordering", ...
Sets the partitioning property for the global properties. @param partitioning The new partitioning to set. @param partitionedFields
[ "Sets", "the", "partitioning", "property", "for", "the", "global", "properties", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/dataproperties/GlobalProperties.java#L64-L68
train
stratosphere/stratosphere
stratosphere-compiler/src/main/java/eu/stratosphere/compiler/dataproperties/GlobalProperties.java
GlobalProperties.filterByNodesConstantSet
public GlobalProperties filterByNodesConstantSet(OptimizerNode node, int input) { // check if partitioning survives if (this.ordering != null) { for (int col : this.ordering.getInvolvedIndexes()) { if (!node.isFieldConstant(input, col)) { return new GlobalProperties(); } } } if (this.partitio...
java
public GlobalProperties filterByNodesConstantSet(OptimizerNode node, int input) { // check if partitioning survives if (this.ordering != null) { for (int col : this.ordering.getInvolvedIndexes()) { if (!node.isFieldConstant(input, col)) { return new GlobalProperties(); } } } if (this.partitio...
[ "public", "GlobalProperties", "filterByNodesConstantSet", "(", "OptimizerNode", "node", ",", "int", "input", ")", "{", "// check if partitioning survives", "if", "(", "this", ".", "ordering", "!=", "null", ")", "{", "for", "(", "int", "col", ":", "this", ".", ...
Filters these properties by what can be preserved through the given output contract. @param contract The output contract. @return True, if any non-default value is preserved, false otherwise.
[ "Filters", "these", "properties", "by", "what", "can", "be", "preserved", "through", "the", "given", "output", "contract", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/dataproperties/GlobalProperties.java#L200-L242
train
stratosphere/stratosphere
stratosphere-java/src/main/java/eu/stratosphere/api/java/DeltaIteration.java
DeltaIteration.parallelism
public DeltaIteration<ST, WT> parallelism(int parallelism) { Validate.isTrue(parallelism > 0 || parallelism == -1, "The degree of parallelism must be positive, or -1 (use default)."); this.parallelism = parallelism; return this; }
java
public DeltaIteration<ST, WT> parallelism(int parallelism) { Validate.isTrue(parallelism > 0 || parallelism == -1, "The degree of parallelism must be positive, or -1 (use default)."); this.parallelism = parallelism; return this; }
[ "public", "DeltaIteration", "<", "ST", ",", "WT", ">", "parallelism", "(", "int", "parallelism", ")", "{", "Validate", ".", "isTrue", "(", "parallelism", ">", "0", "||", "parallelism", "==", "-", "1", ",", "\"The degree of parallelism must be positive, or -1 (use ...
Sets the degree of parallelism for the iteration. @param parallelism The degree of parallelism. @return The iteration object, for function call chaining.
[ "Sets", "the", "degree", "of", "parallelism", "for", "the", "iteration", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-java/src/main/java/eu/stratosphere/api/java/DeltaIteration.java#L167-L171
train
stratosphere/stratosphere
stratosphere-clients/src/main/java/eu/stratosphere/client/web/JobSubmissionServlet.java
JobSubmissionServlet.showErrorPage
private void showErrorPage(HttpServletResponse resp, String message) throws IOException { resp.setStatus(HttpServletResponse.SC_OK); resp.setContentType(GUIServletStub.CONTENT_TYPE_HTML); PrintWriter writer = resp.getWriter(); writer .println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transition...
java
private void showErrorPage(HttpServletResponse resp, String message) throws IOException { resp.setStatus(HttpServletResponse.SC_OK); resp.setContentType(GUIServletStub.CONTENT_TYPE_HTML); PrintWriter writer = resp.getWriter(); writer .println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transition...
[ "private", "void", "showErrorPage", "(", "HttpServletResponse", "resp", ",", "String", "message", ")", "throws", "IOException", "{", "resp", ".", "setStatus", "(", "HttpServletResponse", ".", "SC_OK", ")", ";", "resp", ".", "setContentType", "(", "GUIServletStub",...
Prints the error page, containing the given message. @param resp The response handler. @param message The message to display. @throws IOException Thrown, if the error page could not be printed due to an I/O problem.
[ "Prints", "the", "error", "page", "containing", "the", "given", "message", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-clients/src/main/java/eu/stratosphere/client/web/JobSubmissionServlet.java#L343-L373
train
stratosphere/stratosphere
stratosphere-clients/src/main/java/eu/stratosphere/client/web/JobSubmissionServlet.java
JobSubmissionServlet.checkParameterSet
private boolean checkParameterSet(HttpServletResponse resp, String parameter, String parameterName) throws IOException { if (parameter == null) { showErrorPage(resp, "The parameter '" + parameterName + "' is not set."); return true; } else { return false; } }
java
private boolean checkParameterSet(HttpServletResponse resp, String parameter, String parameterName) throws IOException { if (parameter == null) { showErrorPage(resp, "The parameter '" + parameterName + "' is not set."); return true; } else { return false; } }
[ "private", "boolean", "checkParameterSet", "(", "HttpServletResponse", "resp", ",", "String", "parameter", ",", "String", "parameterName", ")", "throws", "IOException", "{", "if", "(", "parameter", "==", "null", ")", "{", "showErrorPage", "(", "resp", ",", "\"Th...
Checks the given parameter. If it is null, it prints the error page. @param resp The response handler. @param parameter The parameter to check. @param parameterName The name of the parameter, to describe it in the error message. @return True, if the parameter is null, false otherwise. @throws IOException Thrown, if th...
[ "Checks", "the", "given", "parameter", ".", "If", "it", "is", "null", "it", "prints", "the", "error", "page", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-clients/src/main/java/eu/stratosphere/client/web/JobSubmissionServlet.java#L388-L396
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/Task.java
Task.cancelOrKillExecution
private void cancelOrKillExecution(boolean cancel) { final Thread executingThread = this.environment.getExecutingThread(); if (executingThread == null) { return; } if (this.executionState != ExecutionState.RUNNING && this.executionState != ExecutionState.FINISHING) { return; } LOG.info((cancel ? "C...
java
private void cancelOrKillExecution(boolean cancel) { final Thread executingThread = this.environment.getExecutingThread(); if (executingThread == null) { return; } if (this.executionState != ExecutionState.RUNNING && this.executionState != ExecutionState.FINISHING) { return; } LOG.info((cancel ? "C...
[ "private", "void", "cancelOrKillExecution", "(", "boolean", "cancel", ")", "{", "final", "Thread", "executingThread", "=", "this", ".", "environment", ".", "getExecutingThread", "(", ")", ";", "if", "(", "executingThread", "==", "null", ")", "{", "return", ";"...
Cancels or kills the task. @param cancel <code>true/code> if the task shall be canceled, <code>false</code> if it shall be killed
[ "Cancels", "or", "kills", "the", "task", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/Task.java#L117-L168
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/api/RecordReader.java
RecordReader.hasNext
@Override public boolean hasNext() throws IOException, InterruptedException{ if (this.lookahead != null) { return true; } else { if (this.noMoreRecordsWillFollow) { return false; } T record = instantiateRecordType(); while (true) { InputChannelResult result = this.inputGate.readRecor...
java
@Override public boolean hasNext() throws IOException, InterruptedException{ if (this.lookahead != null) { return true; } else { if (this.noMoreRecordsWillFollow) { return false; } T record = instantiateRecordType(); while (true) { InputChannelResult result = this.inputGate.readRecor...
[ "@", "Override", "public", "boolean", "hasNext", "(", ")", "throws", "IOException", ",", "InterruptedException", "{", "if", "(", "this", ".", "lookahead", "!=", "null", ")", "{", "return", "true", ";", "}", "else", "{", "if", "(", "this", ".", "noMoreRec...
Checks if at least one more record can be read from the associated input gate. This method may block until the associated input gate is able to read the record from one of its input channels. @return <code>true</code>it at least one more record can be read from the associated input gate, otherwise <code>false</code>
[ "Checks", "if", "at", "least", "one", "more", "record", "can", "be", "read", "from", "the", "associated", "input", "gate", ".", "This", "method", "may", "block", "until", "the", "associated", "input", "gate", "is", "able", "to", "read", "the", "record", ...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/api/RecordReader.java#L80-L120
train
stratosphere/stratosphere
stratosphere-clients/src/main/java/eu/stratosphere/client/web/WebInterfaceServer.java
WebInterfaceServer.checkAndCreateDirectories
private final void checkAndCreateDirectories(File f, boolean needWritePermission) throws IOException { String dir = f.getAbsolutePath(); // check if it exists and it is not a directory if (f.exists() && !f.isDirectory()) { throw new IOException("A none directory file with the same name as the configured direc...
java
private final void checkAndCreateDirectories(File f, boolean needWritePermission) throws IOException { String dir = f.getAbsolutePath(); // check if it exists and it is not a directory if (f.exists() && !f.isDirectory()) { throw new IOException("A none directory file with the same name as the configured direc...
[ "private", "final", "void", "checkAndCreateDirectories", "(", "File", "f", ",", "boolean", "needWritePermission", ")", "throws", "IOException", "{", "String", "dir", "=", "f", ".", "getAbsolutePath", "(", ")", ";", "// check if it exists and it is not a directory", "i...
Checks and creates the directory described by the abstract directory path. This function checks if the directory exists and creates it if necessary. It also checks read permissions and write permission, if necessary. @param dir The String describing the directory path. @param needWritePermission A flag indicating whet...
[ "Checks", "and", "creates", "the", "directory", "described", "by", "the", "abstract", "directory", "path", ".", "This", "function", "checks", "if", "the", "directory", "exists", "and", "creates", "it", "if", "necessary", ".", "It", "also", "checks", "read", ...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-clients/src/main/java/eu/stratosphere/client/web/WebInterfaceServer.java#L257-L282
train
stratosphere/stratosphere
stratosphere-java/src/main/java/eu/stratosphere/api/java/operators/SingleInputUdfOperator.java
SingleInputUdfOperator.withConstantSet
public O withConstantSet(String... constantSet) { SingleInputSemanticProperties props = SemanticPropUtil.getSemanticPropsSingleFromString(constantSet, null, null, this.getInputType(), this.getResultType()); this.setSemanticProperties(props); @SuppressWarnings("unchecked") O returnType = (O) this; return retur...
java
public O withConstantSet(String... constantSet) { SingleInputSemanticProperties props = SemanticPropUtil.getSemanticPropsSingleFromString(constantSet, null, null, this.getInputType(), this.getResultType()); this.setSemanticProperties(props); @SuppressWarnings("unchecked") O returnType = (O) this; return retur...
[ "public", "O", "withConstantSet", "(", "String", "...", "constantSet", ")", "{", "SingleInputSemanticProperties", "props", "=", "SemanticPropUtil", ".", "getSemanticPropsSingleFromString", "(", "constantSet", ",", "null", ",", "null", ",", "this", ".", "getInputType",...
Adds a constant-set annotation for the UDF. <p> Constant set annotations are used by the optimizer to infer the existence of data properties (sorted, partitioned, grouped). In certain cases, these annotations allow the optimizer to generate a more efficient execution plan which can lead to improved performance. Consta...
[ "Adds", "a", "constant", "-", "set", "annotation", "for", "the", "UDF", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-java/src/main/java/eu/stratosphere/api/java/operators/SingleInputUdfOperator.java#L113-L119
train
stratosphere/stratosphere
stratosphere-java/src/main/java/eu/stratosphere/api/java/record/io/FixedLengthInputFormat.java
FixedLengthInputFormat.fillReadBuffer
private void fillReadBuffer() throws IOException { // special case for compressed files. if(splitLength == FileInputFormat.READ_WHOLE_SPLIT_FLAG) { int read = this.stream.read(this.readBuffer, 0, this.readBufferSize); if (read == -1) { exhausted = true; } else { this.streamPos += read; this.rea...
java
private void fillReadBuffer() throws IOException { // special case for compressed files. if(splitLength == FileInputFormat.READ_WHOLE_SPLIT_FLAG) { int read = this.stream.read(this.readBuffer, 0, this.readBufferSize); if (read == -1) { exhausted = true; } else { this.streamPos += read; this.rea...
[ "private", "void", "fillReadBuffer", "(", ")", "throws", "IOException", "{", "// special case for compressed files.", "if", "(", "splitLength", "==", "FileInputFormat", ".", "READ_WHOLE_SPLIT_FLAG", ")", "{", "int", "read", "=", "this", ".", "stream", ".", "read", ...
Fills the next read buffer from the file stream. @throws IOException
[ "Fills", "the", "next", "read", "buffer", "from", "the", "file", "stream", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-java/src/main/java/eu/stratosphere/api/java/record/io/FixedLengthInputFormat.java#L208-L238
train
stratosphere/stratosphere
stratosphere-java/src/main/java/eu/stratosphere/api/java/functions/FunctionAnnotation.java
FunctionAnnotation.readSingleConstantAnnotations
public static Set<Annotation> readSingleConstantAnnotations(Class<?> udfClass) { ConstantFields constantSet = udfClass.getAnnotation(ConstantFields.class); ConstantFieldsExcept notConstantSet = udfClass.getAnnotation(ConstantFieldsExcept.class); ReadFields readfieldSet = udfClass.getAnnotation(ReadFields.class); ...
java
public static Set<Annotation> readSingleConstantAnnotations(Class<?> udfClass) { ConstantFields constantSet = udfClass.getAnnotation(ConstantFields.class); ConstantFieldsExcept notConstantSet = udfClass.getAnnotation(ConstantFieldsExcept.class); ReadFields readfieldSet = udfClass.getAnnotation(ReadFields.class); ...
[ "public", "static", "Set", "<", "Annotation", ">", "readSingleConstantAnnotations", "(", "Class", "<", "?", ">", "udfClass", ")", "{", "ConstantFields", "constantSet", "=", "udfClass", ".", "getAnnotation", "(", "ConstantFields", ".", "class", ")", ";", "Constan...
Reads the annotations of a user defined function with one input and returns semantic properties according to the constant fields annotated. @param udfClass The user defined function, represented by its class. @return The DualInputSemanticProperties containing the constant fields.
[ "Reads", "the", "annotations", "of", "a", "user", "defined", "function", "with", "one", "input", "and", "returns", "semantic", "properties", "according", "to", "the", "constant", "fields", "annotated", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-java/src/main/java/eu/stratosphere/api/java/functions/FunctionAnnotation.java#L314-L343
train
stratosphere/stratosphere
stratosphere-java/src/main/java/eu/stratosphere/api/java/functions/FunctionAnnotation.java
FunctionAnnotation.readDualConstantAnnotations
public static Set<Annotation> readDualConstantAnnotations(Class<?> udfClass) { // get readSet annotation from stub ConstantFieldsFirst constantSet1 = udfClass.getAnnotation(ConstantFieldsFirst.class); ConstantFieldsSecond constantSet2= udfClass.getAnnotation(ConstantFieldsSecond.class); // get readSet annotat...
java
public static Set<Annotation> readDualConstantAnnotations(Class<?> udfClass) { // get readSet annotation from stub ConstantFieldsFirst constantSet1 = udfClass.getAnnotation(ConstantFieldsFirst.class); ConstantFieldsSecond constantSet2= udfClass.getAnnotation(ConstantFieldsSecond.class); // get readSet annotat...
[ "public", "static", "Set", "<", "Annotation", ">", "readDualConstantAnnotations", "(", "Class", "<", "?", ">", "udfClass", ")", "{", "// get readSet annotation from stub", "ConstantFieldsFirst", "constantSet1", "=", "udfClass", ".", "getAnnotation", "(", "ConstantFields...
Reads the annotations of a user defined function with two inputs and returns semantic properties according to the constant fields annotated. @param udfClass The user defined function, represented by its class. @return The DualInputSemanticProperties containing the constant fields.
[ "Reads", "the", "annotations", "of", "a", "user", "defined", "function", "with", "two", "inputs", "and", "returns", "semantic", "properties", "according", "to", "the", "constant", "fields", "annotated", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-java/src/main/java/eu/stratosphere/api/java/functions/FunctionAnnotation.java#L352-L414
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java
CheckedMemorySegment.put
public final CheckedMemorySegment put(int index, byte b) { if (index >= 0 && index < this.size) { this.memory[this.offset + index] = b; return this; } else { throw new IndexOutOfBoundsException(); } }
java
public final CheckedMemorySegment put(int index, byte b) { if (index >= 0 && index < this.size) { this.memory[this.offset + index] = b; return this; } else { throw new IndexOutOfBoundsException(); } }
[ "public", "final", "CheckedMemorySegment", "put", "(", "int", "index", ",", "byte", "b", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "size", ")", "{", "this", ".", "memory", "[", "this", ".", "offset", "+", "index", "]...
Writes the given byte into this buffer at the given position. @param position The position at which the byte will be written. @param b The byte value to be written. @return This view itself. @throws IndexOutOfBoundsException Thrown, if the index is negative, or larger or equal to the size of the memory segment.
[ "Writes", "the", "given", "byte", "into", "this", "buffer", "at", "the", "given", "position", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java#L186-L193
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java
CheckedMemorySegment.get
public final CheckedMemorySegment get(int index, byte[] dst, int offset, int length) { if (index >= 0 && index < this.size && index <= this.size - length && offset <= dst.length - length) { System.arraycopy(this.memory, this.offset + index, dst, offset, length); return this; } else { throw new IndexOutOfBo...
java
public final CheckedMemorySegment get(int index, byte[] dst, int offset, int length) { if (index >= 0 && index < this.size && index <= this.size - length && offset <= dst.length - length) { System.arraycopy(this.memory, this.offset + index, dst, offset, length); return this; } else { throw new IndexOutOfBo...
[ "public", "final", "CheckedMemorySegment", "get", "(", "int", "index", ",", "byte", "[", "]", "dst", ",", "int", "offset", ",", "int", "length", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "size", "&&", "index", "<=", ...
Bulk get method. Copies length memory from the specified position to the destination memory, beginning at the given offset @param position The position at which the first byte will be read. @param dst The memory into which the memory will be copied. @param offset The copying offset in the destination memory. @param le...
[ "Bulk", "get", "method", ".", "Copies", "length", "memory", "from", "the", "specified", "position", "to", "the", "destination", "memory", "beginning", "at", "the", "given", "offset" ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java#L244-L251
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java
CheckedMemorySegment.put
public final CheckedMemorySegment put(int index, byte[] src, int offset, int length) { if (index >= 0 && index < this.size && index <= this.size - length && offset <= src.length - length) { System.arraycopy(src, offset, this.memory, this.offset + index, length); return this; } else { throw new IndexOutOfBo...
java
public final CheckedMemorySegment put(int index, byte[] src, int offset, int length) { if (index >= 0 && index < this.size && index <= this.size - length && offset <= src.length - length) { System.arraycopy(src, offset, this.memory, this.offset + index, length); return this; } else { throw new IndexOutOfBo...
[ "public", "final", "CheckedMemorySegment", "put", "(", "int", "index", ",", "byte", "[", "]", "src", ",", "int", "offset", ",", "int", "length", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "size", "&&", "index", "<=", ...
Bulk put method. Copies length memory starting at position offset from the source memory into the memory segment starting at the specified index. @param index The position in the memory segment array, where the data is put. @param src The source array to copy the data from. @param offset The offset in the source array...
[ "Bulk", "put", "method", ".", "Copies", "length", "memory", "starting", "at", "position", "offset", "from", "the", "source", "memory", "into", "the", "memory", "segment", "starting", "at", "the", "specified", "index", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java#L268-L275
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java
CheckedMemorySegment.putBoolean
public final CheckedMemorySegment putBoolean(int index, boolean value) { if (index >= 0 && index < this.size) { this.memory[this.offset + index] = (byte) (value ? 1 : 0); return this; } else { throw new IndexOutOfBoundsException(); } }
java
public final CheckedMemorySegment putBoolean(int index, boolean value) { if (index >= 0 && index < this.size) { this.memory[this.offset + index] = (byte) (value ? 1 : 0); return this; } else { throw new IndexOutOfBoundsException(); } }
[ "public", "final", "CheckedMemorySegment", "putBoolean", "(", "int", "index", ",", "boolean", "value", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "size", ")", "{", "this", ".", "memory", "[", "this", ".", "offset", "+", ...
Writes one byte containing the byte value into this buffer at the given position. @param position The position at which the memory will be written. @param value The char value to be written. @return This view itself. @throws IndexOutOfBoundsException Thrown, if the index is negative, or larger then the segment size m...
[ "Writes", "one", "byte", "containing", "the", "byte", "value", "into", "this", "buffer", "at", "the", "given", "position", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java#L347-L354
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java
CheckedMemorySegment.getChar
public final char getChar(int index) { if (index >= 0 && index < this.size - 1) { return (char) ( ((this.memory[this.offset + index + 0] & 0xff) << 8) | (this.memory[this.offset + index + 1] & 0xff) ); } else { throw new IndexOutOfBoundsException(); } }
java
public final char getChar(int index) { if (index >= 0 && index < this.size - 1) { return (char) ( ((this.memory[this.offset + index + 0] & 0xff) << 8) | (this.memory[this.offset + index + 1] & 0xff) ); } else { throw new IndexOutOfBoundsException(); } }
[ "public", "final", "char", "getChar", "(", "int", "index", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "size", "-", "1", ")", "{", "return", "(", "char", ")", "(", "(", "(", "this", ".", "memory", "[", "this", ".",...
Reads two memory at the given position, composing them into a char value according to the current byte order. @param position The position from which the memory will be read. @return The char value at the given position. @throws IndexOutOfBoundsException Thrown, if the index is negative, or larger then the segment si...
[ "Reads", "two", "memory", "at", "the", "given", "position", "composing", "them", "into", "a", "char", "value", "according", "to", "the", "current", "byte", "order", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java#L366-L373
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java
CheckedMemorySegment.putChar
public final CheckedMemorySegment putChar(int index, char value) { if (index >= 0 && index < this.size - 1) { this.memory[this.offset + index + 0] = (byte) (value >> 8); this.memory[this.offset + index + 1] = (byte) value; return this; } else { throw new IndexOutOfBoundsException(); } }
java
public final CheckedMemorySegment putChar(int index, char value) { if (index >= 0 && index < this.size - 1) { this.memory[this.offset + index + 0] = (byte) (value >> 8); this.memory[this.offset + index + 1] = (byte) value; return this; } else { throw new IndexOutOfBoundsException(); } }
[ "public", "final", "CheckedMemorySegment", "putChar", "(", "int", "index", ",", "char", "value", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "size", "-", "1", ")", "{", "this", ".", "memory", "[", "this", ".", "offset", ...
Writes two memory containing the given char value, in the current byte order, into this buffer at the given position. @param position The position at which the memory will be written. @param value The char value to be written. @return This view itself. @throws IndexOutOfBoundsException Thrown, if the index is negativ...
[ "Writes", "two", "memory", "containing", "the", "given", "char", "value", "in", "the", "current", "byte", "order", "into", "this", "buffer", "at", "the", "given", "position", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java#L386-L394
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java
CheckedMemorySegment.getShort
public final short getShort(int index) { if (index >= 0 && index < this.size - 1) { return (short) ( ((this.memory[this.offset + index + 0] & 0xff) << 8) | ((this.memory[this.offset + index + 1] & 0xff)) ); } else { throw new IndexOutOfBoundsException(); } }
java
public final short getShort(int index) { if (index >= 0 && index < this.size - 1) { return (short) ( ((this.memory[this.offset + index + 0] & 0xff) << 8) | ((this.memory[this.offset + index + 1] & 0xff)) ); } else { throw new IndexOutOfBoundsException(); } }
[ "public", "final", "short", "getShort", "(", "int", "index", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "size", "-", "1", ")", "{", "return", "(", "short", ")", "(", "(", "(", "this", ".", "memory", "[", "this", "...
Reads two memory at the given position, composing them into a short value according to the current byte order. @param position The position from which the memory will be read. @return The short value at the given position. @throws IndexOutOfBoundsException Thrown, if the index is negative, or larger then the segment ...
[ "Reads", "two", "memory", "at", "the", "given", "position", "composing", "them", "into", "a", "short", "value", "according", "to", "the", "current", "byte", "order", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java#L406-L414
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java
CheckedMemorySegment.putShort
public final CheckedMemorySegment putShort(int index, short value) { if (index >= 0 && index < this.size - 1) { this.memory[this.offset + index + 0] = (byte) (value >> 8); this.memory[this.offset + index + 1] = (byte) value; return this; } else { throw new IndexOutOfBoundsException(); } }
java
public final CheckedMemorySegment putShort(int index, short value) { if (index >= 0 && index < this.size - 1) { this.memory[this.offset + index + 0] = (byte) (value >> 8); this.memory[this.offset + index + 1] = (byte) value; return this; } else { throw new IndexOutOfBoundsException(); } }
[ "public", "final", "CheckedMemorySegment", "putShort", "(", "int", "index", ",", "short", "value", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "size", "-", "1", ")", "{", "this", ".", "memory", "[", "this", ".", "offset"...
Writes two memory containing the given short value, in the current byte order, into this buffer at the given position. @param position The position at which the memory will be written. @param value The short value to be written. @return This view itself. @throws IndexOutOfBoundsException Thrown, if the index is negat...
[ "Writes", "two", "memory", "containing", "the", "given", "short", "value", "in", "the", "current", "byte", "order", "into", "this", "buffer", "at", "the", "given", "position", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java#L427-L435
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/ClusterManager.java
ClusterManager.sortAvailableInstancesByNumberOfCPUCores
private void sortAvailableInstancesByNumberOfCPUCores() { if (this.availableInstanceTypes.length < 2) { return; } for (int i = 1; i < this.availableInstanceTypes.length; i++) { final InstanceType it = this.availableInstanceTypes[i]; int j = i; while (j > 0 && this.availableInstanceTypes[j - 1].getNu...
java
private void sortAvailableInstancesByNumberOfCPUCores() { if (this.availableInstanceTypes.length < 2) { return; } for (int i = 1; i < this.availableInstanceTypes.length; i++) { final InstanceType it = this.availableInstanceTypes[i]; int j = i; while (j > 0 && this.availableInstanceTypes[j - 1].getNu...
[ "private", "void", "sortAvailableInstancesByNumberOfCPUCores", "(", ")", "{", "if", "(", "this", ".", "availableInstanceTypes", ".", "length", "<", "2", ")", "{", "return", ";", "}", "for", "(", "int", "i", "=", "1", ";", "i", "<", "this", ".", "availabl...
Sorts the list of available instance types by the number of CPU cores in a descending order.
[ "Sorts", "the", "list", "of", "available", "instance", "types", "by", "the", "number", "of", "CPU", "cores", "in", "a", "descending", "order", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/ClusterManager.java#L282-L297
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/ClusterManager.java
ClusterManager.checkPendingRequests
private void checkPendingRequests() { final Iterator<Map.Entry<JobID, PendingRequestsMap>> it = this.pendingRequestsOfJob.entrySet().iterator(); while (it.hasNext()) { final List<AllocatedResource> allocatedResources = new ArrayList<AllocatedResource>(); final Map.Entry<JobID, PendingRequestsMap> entry = it...
java
private void checkPendingRequests() { final Iterator<Map.Entry<JobID, PendingRequestsMap>> it = this.pendingRequestsOfJob.entrySet().iterator(); while (it.hasNext()) { final List<AllocatedResource> allocatedResources = new ArrayList<AllocatedResource>(); final Map.Entry<JobID, PendingRequestsMap> entry = it...
[ "private", "void", "checkPendingRequests", "(", ")", "{", "final", "Iterator", "<", "Map", ".", "Entry", "<", "JobID", ",", "PendingRequestsMap", ">", ">", "it", "=", "this", ".", "pendingRequestsOfJob", ".", "entrySet", "(", ")", ".", "iterator", "(", ")"...
Checks if a pending request can be fulfilled.
[ "Checks", "if", "a", "pending", "request", "can", "be", "fulfilled", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/ClusterManager.java#L538-L601
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/ClusterManager.java
ClusterManager.getSliceOfType
private AllocatedSlice getSliceOfType(final JobID jobID, final InstanceType instanceType) { AllocatedSlice slice = null; // Try to match the instance type without slicing first for (final ClusterInstance host : this.registeredHosts.values()) { if (host.getType().equals(instanceType)) { slice = host.creat...
java
private AllocatedSlice getSliceOfType(final JobID jobID, final InstanceType instanceType) { AllocatedSlice slice = null; // Try to match the instance type without slicing first for (final ClusterInstance host : this.registeredHosts.values()) { if (host.getType().equals(instanceType)) { slice = host.creat...
[ "private", "AllocatedSlice", "getSliceOfType", "(", "final", "JobID", "jobID", ",", "final", "InstanceType", "instanceType", ")", "{", "AllocatedSlice", "slice", "=", "null", ";", "// Try to match the instance type without slicing first", "for", "(", "final", "ClusterInst...
Attempts to allocate a slice of the given type for the given job. The method first attempts to allocate this slice by finding a physical host which exactly matches the given instance type. If this attempt failed, it tries to allocate the slice by partitioning the resources of a more powerful host. @param jobID the ID ...
[ "Attempts", "to", "allocate", "a", "slice", "of", "the", "given", "type", "for", "the", "given", "job", ".", "The", "method", "first", "attempts", "to", "allocate", "this", "slice", "by", "finding", "a", "physical", "host", "which", "exactly", "matches", "...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/ClusterManager.java#L614-L640
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/ClusterManager.java
ClusterManager.calculateInstanceAccommodationMatrix
private int[][] calculateInstanceAccommodationMatrix() { if (this.availableInstanceTypes == null) { LOG.error("Cannot compute instance accommodation matrix: availableInstanceTypes is null"); return null; } final int matrixSize = this.availableInstanceTypes.length; final int[][] am = new int[matrixSize][...
java
private int[][] calculateInstanceAccommodationMatrix() { if (this.availableInstanceTypes == null) { LOG.error("Cannot compute instance accommodation matrix: availableInstanceTypes is null"); return null; } final int matrixSize = this.availableInstanceTypes.length; final int[][] am = new int[matrixSize][...
[ "private", "int", "[", "]", "[", "]", "calculateInstanceAccommodationMatrix", "(", ")", "{", "if", "(", "this", ".", "availableInstanceTypes", "==", "null", ")", "{", "LOG", ".", "error", "(", "\"Cannot compute instance accommodation matrix: availableInstanceTypes is nu...
Calculates the instance accommodation matrix which stores how many times a particular instance type can be accommodated inside another instance type based on the list of available instance types. @return the instance accommodation matrix
[ "Calculates", "the", "instance", "accommodation", "matrix", "which", "stores", "how", "many", "times", "a", "particular", "instance", "type", "can", "be", "accommodated", "inside", "another", "instance", "type", "based", "on", "the", "list", "of", "available", "...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/instance/cluster/ClusterManager.java#L857-L890
train
stratosphere/stratosphere
stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java
LocalExecutor.stop
public void stop() throws Exception { synchronized (this.lock) { if (this.nephele != null) { this.nephele.stop(); this.nephele = null; } else { throw new IllegalStateException("The local executor was not started."); } } }
java
public void stop() throws Exception { synchronized (this.lock) { if (this.nephele != null) { this.nephele.stop(); this.nephele = null; } else { throw new IllegalStateException("The local executor was not started."); } } }
[ "public", "void", "stop", "(", ")", "throws", "Exception", "{", "synchronized", "(", "this", ".", "lock", ")", "{", "if", "(", "this", ".", "nephele", "!=", "null", ")", "{", "this", ".", "nephele", ".", "stop", "(", ")", ";", "this", ".", "nephele...
Stop the local executor instance. You should not call executePlan after this.
[ "Stop", "the", "local", "executor", "instance", ".", "You", "should", "not", "call", "executePlan", "after", "this", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java#L172-L181
train
stratosphere/stratosphere
stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java
LocalExecutor.executePlan
public JobExecutionResult executePlan(Plan plan) throws Exception { if (plan == null) { throw new IllegalArgumentException("The plan may not be null."); } ContextChecker checker = new ContextChecker(); checker.check(plan); synchronized (this.lock) { // check if we start a session dedicated for...
java
public JobExecutionResult executePlan(Plan plan) throws Exception { if (plan == null) { throw new IllegalArgumentException("The plan may not be null."); } ContextChecker checker = new ContextChecker(); checker.check(plan); synchronized (this.lock) { // check if we start a session dedicated for...
[ "public", "JobExecutionResult", "executePlan", "(", "Plan", "plan", ")", "throws", "Exception", "{", "if", "(", "plan", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The plan may not be null.\"", ")", ";", "}", "ContextChecker", "chec...
Execute the given plan on the local Nephele instance, wait for the job to finish and return the runtime in milliseconds. @param plan The plan of the program to execute. @return The net runtime of the program, in milliseconds. @throws Exception Thrown, if either the startup of the local execution context, or the execu...
[ "Execute", "the", "given", "plan", "on", "the", "local", "Nephele", "instance", "wait", "for", "the", "job", "to", "finish", "and", "return", "the", "runtime", "in", "milliseconds", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java#L193-L231
train
stratosphere/stratosphere
stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java
LocalExecutor.execute
public static JobExecutionResult execute(Plan plan) throws Exception { LocalExecutor exec = new LocalExecutor(); try { exec.start(); return exec.executePlan(plan); } finally { exec.stop(); } }
java
public static JobExecutionResult execute(Plan plan) throws Exception { LocalExecutor exec = new LocalExecutor(); try { exec.start(); return exec.executePlan(plan); } finally { exec.stop(); } }
[ "public", "static", "JobExecutionResult", "execute", "(", "Plan", "plan", ")", "throws", "Exception", "{", "LocalExecutor", "exec", "=", "new", "LocalExecutor", "(", ")", ";", "try", "{", "exec", ".", "start", "(", ")", ";", "return", "exec", ".", "execute...
Executes the program represented by the given Pact plan. @param pa The program's plan. @return The net runtime of the program, in milliseconds. @throws Exception Thrown, if either the startup of the local execution context, or the execution caused an exception.
[ "Executes", "the", "program", "represented", "by", "the", "given", "Pact", "plan", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java#L297-L305
train
stratosphere/stratosphere
stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java
LocalExecutor.getPlanAsJSON
public static String getPlanAsJSON(Plan plan) { PlanJSONDumpGenerator gen = new PlanJSONDumpGenerator(); List<DataSinkNode> sinks = PactCompiler.createPreOptimizedPlan(plan); return gen.getPactPlanAsJSON(sinks); }
java
public static String getPlanAsJSON(Plan plan) { PlanJSONDumpGenerator gen = new PlanJSONDumpGenerator(); List<DataSinkNode> sinks = PactCompiler.createPreOptimizedPlan(plan); return gen.getPactPlanAsJSON(sinks); }
[ "public", "static", "String", "getPlanAsJSON", "(", "Plan", "plan", ")", "{", "PlanJSONDumpGenerator", "gen", "=", "new", "PlanJSONDumpGenerator", "(", ")", ";", "List", "<", "DataSinkNode", ">", "sinks", "=", "PactCompiler", ".", "createPreOptimizedPlan", "(", ...
Return unoptimized plan as JSON. @return
[ "Return", "unoptimized", "plan", "as", "JSON", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java#L333-L337
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/ChannelManager.java
ChannelManager.register
public void register(Task task) throws InsufficientResourcesException { // Check if we can safely run this task with the given buffers ensureBufferAvailability(task); RuntimeEnvironment environment = task.getRuntimeEnvironment(); // -----------------------------------------------------------------------------...
java
public void register(Task task) throws InsufficientResourcesException { // Check if we can safely run this task with the given buffers ensureBufferAvailability(task); RuntimeEnvironment environment = task.getRuntimeEnvironment(); // -----------------------------------------------------------------------------...
[ "public", "void", "register", "(", "Task", "task", ")", "throws", "InsufficientResourcesException", "{", "// Check if we can safely run this task with the given buffers", "ensureBufferAvailability", "(", "task", ")", ";", "RuntimeEnvironment", "environment", "=", "task", ".",...
Registers the given task with the channel manager. @param task the task to be registered @throws InsufficientResourcesException thrown if not enough buffers available to safely run this task
[ "Registers", "the", "given", "task", "with", "the", "channel", "manager", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/ChannelManager.java#L117-L179
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/ChannelManager.java
ChannelManager.unregister
public void unregister(ExecutionVertexID vertexId, Task task) { final Environment environment = task.getEnvironment(); // destroy and remove OUTPUT channels from registered channels and cache for (ChannelID id : environment.getOutputChannelIDs()) { Channel channel = this.channels.remove(id); if (channel !=...
java
public void unregister(ExecutionVertexID vertexId, Task task) { final Environment environment = task.getEnvironment(); // destroy and remove OUTPUT channels from registered channels and cache for (ChannelID id : environment.getOutputChannelIDs()) { Channel channel = this.channels.remove(id); if (channel !=...
[ "public", "void", "unregister", "(", "ExecutionVertexID", "vertexId", ",", "Task", "task", ")", "{", "final", "Environment", "environment", "=", "task", ".", "getEnvironment", "(", ")", ";", "// destroy and remove OUTPUT channels from registered channels and cache", "for"...
Unregisters the given task from the channel manager. @param vertexId the ID of the task to be unregistered @param task the task to be unregistered
[ "Unregisters", "the", "given", "task", "from", "the", "channel", "manager", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/ChannelManager.java#L187-L227
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/ChannelManager.java
ChannelManager.getReceiverList
private EnvelopeReceiverList getReceiverList(JobID jobID, ChannelID sourceChannelID, boolean reportException) throws IOException { EnvelopeReceiverList receiverList = this.receiverCache.get(sourceChannelID); if (receiverList != null) { return receiverList; } while (true) { ConnectionInfoLookupResponse l...
java
private EnvelopeReceiverList getReceiverList(JobID jobID, ChannelID sourceChannelID, boolean reportException) throws IOException { EnvelopeReceiverList receiverList = this.receiverCache.get(sourceChannelID); if (receiverList != null) { return receiverList; } while (true) { ConnectionInfoLookupResponse l...
[ "private", "EnvelopeReceiverList", "getReceiverList", "(", "JobID", "jobID", ",", "ChannelID", "sourceChannelID", ",", "boolean", "reportException", ")", "throws", "IOException", "{", "EnvelopeReceiverList", "receiverList", "=", "this", ".", "receiverCache", ".", "get",...
Returns the list of receivers for transfer envelopes produced by the channel with the given source channel ID. @param jobID the ID of the job the given channel ID belongs to @param sourceChannelID the source channel ID for which the receiver list shall be retrieved @return the list of receivers or <code>null</code> if...
[ "Returns", "the", "list", "of", "receivers", "for", "transfer", "envelopes", "produced", "by", "the", "channel", "with", "the", "given", "source", "channel", "ID", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/ChannelManager.java#L340-L397
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/ChannelManager.java
ChannelManager.invalidateLookupCacheEntries
public void invalidateLookupCacheEntries(Set<ChannelID> channelIDs) { for (ChannelID id : channelIDs) { this.receiverCache.remove(id); } }
java
public void invalidateLookupCacheEntries(Set<ChannelID> channelIDs) { for (ChannelID id : channelIDs) { this.receiverCache.remove(id); } }
[ "public", "void", "invalidateLookupCacheEntries", "(", "Set", "<", "ChannelID", ">", "channelIDs", ")", "{", "for", "(", "ChannelID", "id", ":", "channelIDs", ")", "{", "this", ".", "receiverCache", ".", "remove", "(", "id", ")", ";", "}", "}" ]
Invalidates the entries identified by the given channel IDs from the receiver lookup cache. @param channelIDs channel IDs for entries to invalidate
[ "Invalidates", "the", "entries", "identified", "by", "the", "given", "channel", "IDs", "from", "the", "receiver", "lookup", "cache", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/ChannelManager.java#L404-L408
train
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/util/ClassUtils.java
ClassUtils.getProtocolByName
public static Class<? extends VersionedProtocol> getProtocolByName(final String className) throws ClassNotFoundException { if (!className.contains("Protocol")) { throw new ClassNotFoundException("Only use this method for protocols!"); } return (Class<? extends VersionedProtocol>) Class.forName(className, ...
java
public static Class<? extends VersionedProtocol> getProtocolByName(final String className) throws ClassNotFoundException { if (!className.contains("Protocol")) { throw new ClassNotFoundException("Only use this method for protocols!"); } return (Class<? extends VersionedProtocol>) Class.forName(className, ...
[ "public", "static", "Class", "<", "?", "extends", "VersionedProtocol", ">", "getProtocolByName", "(", "final", "String", "className", ")", "throws", "ClassNotFoundException", "{", "if", "(", "!", "className", ".", "contains", "(", "\"Protocol\"", ")", ")", "{", ...
Searches for a protocol class by its name and attempts to load it. @param className the name of the protocol class @return an instance of the protocol class @throws ClassNotFoundException thrown if no class with such a name can be found
[ "Searches", "for", "a", "protocol", "class", "by", "its", "name", "and", "attempts", "to", "load", "it", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/util/ClassUtils.java#L39-L47
train
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/util/ClassUtils.java
ClassUtils.getRecordByName
@SuppressWarnings("unchecked") public static Class<? extends IOReadableWritable> getRecordByName(final String className) throws ClassNotFoundException { // // Class<?> clazz = Class.forName(className, true, getClassLoader()); // if (IOReadableWritable.class.isAssignableFrom(clazz)) { // return clazz.asSubclas...
java
@SuppressWarnings("unchecked") public static Class<? extends IOReadableWritable> getRecordByName(final String className) throws ClassNotFoundException { // // Class<?> clazz = Class.forName(className, true, getClassLoader()); // if (IOReadableWritable.class.isAssignableFrom(clazz)) { // return clazz.asSubclas...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Class", "<", "?", "extends", "IOReadableWritable", ">", "getRecordByName", "(", "final", "String", "className", ")", "throws", "ClassNotFoundException", "{", "//\t\t", "//\t\tClass<?> clazz = Class...
Searches for a record class by its name and attempts to load it. @param className the name of the record class @return an instance of the record class @throws ClassNotFoundException thrown if no class with such a name can be found
[ "Searches", "for", "a", "record", "class", "by", "its", "name", "and", "attempts", "to", "load", "it", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/util/ClassUtils.java#L58-L70
train
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/util/ClassUtils.java
ClassUtils.getFileSystemByName
public static Class<? extends FileSystem> getFileSystemByName(final String className) throws ClassNotFoundException { return Class.forName(className, true, getClassLoader()).asSubclass(FileSystem.class); }
java
public static Class<? extends FileSystem> getFileSystemByName(final String className) throws ClassNotFoundException { return Class.forName(className, true, getClassLoader()).asSubclass(FileSystem.class); }
[ "public", "static", "Class", "<", "?", "extends", "FileSystem", ">", "getFileSystemByName", "(", "final", "String", "className", ")", "throws", "ClassNotFoundException", "{", "return", "Class", ".", "forName", "(", "className", ",", "true", ",", "getClassLoader", ...
Searches for a file system class by its name and attempts to load it. @param className the name of the file system class @return an instance of the file system class @throws ClassNotFoundException thrown if no class with such a name can be found
[ "Searches", "for", "a", "file", "system", "class", "by", "its", "name", "and", "attempts", "to", "load", "it", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/util/ClassUtils.java#L81-L83
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/pact/runtime/hash/CompactingHashTable.java
CompactingHashTable.open
public void open() { // sanity checks if (!this.closed.compareAndSet(true, false)) { throw new IllegalStateException("Hash Table cannot be opened, because it is currently not closed."); } // create the partitions final int partitionFanOut = getPartitioningFanOutNoEstimates(this.availableMemory.size()); ...
java
public void open() { // sanity checks if (!this.closed.compareAndSet(true, false)) { throw new IllegalStateException("Hash Table cannot be opened, because it is currently not closed."); } // create the partitions final int partitionFanOut = getPartitioningFanOutNoEstimates(this.availableMemory.size()); ...
[ "public", "void", "open", "(", ")", "{", "// sanity checks", "if", "(", "!", "this", ".", "closed", ".", "compareAndSet", "(", "true", ",", "false", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Hash Table cannot be opened, because it is currentl...
Build the hash table @throws IOException Thrown, if an I/O problem occurs while spilling a partition.
[ "Build", "the", "hash", "table" ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/pact/runtime/hash/CompactingHashTable.java#L276-L291
train
stratosphere/stratosphere
stratosphere-compiler/src/main/java/eu/stratosphere/compiler/plan/WorksetIterationPlanNode.java
WorksetIterationPlanNode.mergeBranchPlanMaps
@Override protected void mergeBranchPlanMaps(Map<OptimizerNode, PlanNode> branchPlan1, Map<OptimizerNode, PlanNode> branchPlan2){ }
java
@Override protected void mergeBranchPlanMaps(Map<OptimizerNode, PlanNode> branchPlan1, Map<OptimizerNode, PlanNode> branchPlan2){ }
[ "@", "Override", "protected", "void", "mergeBranchPlanMaps", "(", "Map", "<", "OptimizerNode", ",", "PlanNode", ">", "branchPlan1", ",", "Map", "<", "OptimizerNode", ",", "PlanNode", ">", "branchPlan2", ")", "{", "}" ]
Merging can only take place after the solutionSetDelta and nextWorkset PlanNode has been set, because they can contain also some of the branching nodes.
[ "Merging", "can", "only", "take", "place", "after", "the", "solutionSetDelta", "and", "nextWorkset", "PlanNode", "has", "been", "set", "because", "they", "can", "contain", "also", "some", "of", "the", "branching", "nodes", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/plan/WorksetIterationPlanNode.java#L195-L199
train
stratosphere/stratosphere
stratosphere-addons/avro/src/main/java/eu/stratosphere/api/java/record/io/avro/AvroRecordInputFormat.java
AvroRecordInputFormat.createInputSplits
@Override public FileInputSplit[] createInputSplits(int minNumSplits) throws IOException { int numAvroFiles = 0; final Path path = this.filePath; // get all the files that are involved in the splits final FileSystem fs = path.getFileSystem(); final FileStatus pathFile = fs.getFileStatus(path); if (!accept...
java
@Override public FileInputSplit[] createInputSplits(int minNumSplits) throws IOException { int numAvroFiles = 0; final Path path = this.filePath; // get all the files that are involved in the splits final FileSystem fs = path.getFileSystem(); final FileStatus pathFile = fs.getFileStatus(path); if (!accept...
[ "@", "Override", "public", "FileInputSplit", "[", "]", "createInputSplits", "(", "int", "minNumSplits", ")", "throws", "IOException", "{", "int", "numAvroFiles", "=", "0", ";", "final", "Path", "path", "=", "this", ".", "filePath", ";", "// get all the files tha...
Set minNumSplits to number of files.
[ "Set", "minNumSplits", "to", "number", "of", "files", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-addons/avro/src/main/java/eu/stratosphere/api/java/record/io/avro/AvroRecordInputFormat.java#L294-L317
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionStage.java
ExecutionStage.getNumberOfInputExecutionVertices
public int getNumberOfInputExecutionVertices() { int retVal = 0; final Iterator<ExecutionGroupVertex> it = this.stageMembers.iterator(); while (it.hasNext()) { final ExecutionGroupVertex groupVertex = it.next(); if (groupVertex.isInputVertex()) { retVal += groupVertex.getCurrentNumberOfGroupMembers()...
java
public int getNumberOfInputExecutionVertices() { int retVal = 0; final Iterator<ExecutionGroupVertex> it = this.stageMembers.iterator(); while (it.hasNext()) { final ExecutionGroupVertex groupVertex = it.next(); if (groupVertex.isInputVertex()) { retVal += groupVertex.getCurrentNumberOfGroupMembers()...
[ "public", "int", "getNumberOfInputExecutionVertices", "(", ")", "{", "int", "retVal", "=", "0", ";", "final", "Iterator", "<", "ExecutionGroupVertex", ">", "it", "=", "this", ".", "stageMembers", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "ha...
Returns the number of input execution vertices in this stage, i.e. the number of execution vertices which are connected to vertices in a lower stage or have no input channels. @return the number of input vertices in this stage
[ "Returns", "the", "number", "of", "input", "execution", "vertices", "in", "this", "stage", "i", ".", "e", ".", "the", "number", "of", "execution", "vertices", "which", "are", "connected", "to", "vertices", "in", "a", "lower", "stage", "or", "have", "no", ...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionStage.java#L153-L167
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionStage.java
ExecutionStage.getNumberOfOutputExecutionVertices
public int getNumberOfOutputExecutionVertices() { int retVal = 0; final Iterator<ExecutionGroupVertex> it = this.stageMembers.iterator(); while (it.hasNext()) { final ExecutionGroupVertex groupVertex = it.next(); if (groupVertex.isOutputVertex()) { retVal += groupVertex.getCurrentNumberOfGroupMembers...
java
public int getNumberOfOutputExecutionVertices() { int retVal = 0; final Iterator<ExecutionGroupVertex> it = this.stageMembers.iterator(); while (it.hasNext()) { final ExecutionGroupVertex groupVertex = it.next(); if (groupVertex.isOutputVertex()) { retVal += groupVertex.getCurrentNumberOfGroupMembers...
[ "public", "int", "getNumberOfOutputExecutionVertices", "(", ")", "{", "int", "retVal", "=", "0", ";", "final", "Iterator", "<", "ExecutionGroupVertex", ">", "it", "=", "this", ".", "stageMembers", ".", "iterator", "(", ")", ";", "while", "(", "it", ".", "h...
Returns the number of output execution vertices in this stage, i.e. the number of execution vertices which are connected to vertices in a higher stage or have no output channels. @return the number of output vertices in this stage
[ "Returns", "the", "number", "of", "output", "execution", "vertices", "in", "this", "stage", "i", ".", "e", ".", "the", "number", "of", "execution", "vertices", "which", "are", "connected", "to", "vertices", "in", "a", "higher", "stage", "or", "have", "no",...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionStage.java#L176-L190
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionStage.java
ExecutionStage.collectRequiredInstanceTypes
public void collectRequiredInstanceTypes(final InstanceRequestMap instanceRequestMap, final ExecutionState executionState) { final Set<AbstractInstance> collectedInstances = new HashSet<AbstractInstance>(); final ExecutionGroupVertexIterator groupIt = new ExecutionGroupVertexIterator(this.getExecutionGraph(), t...
java
public void collectRequiredInstanceTypes(final InstanceRequestMap instanceRequestMap, final ExecutionState executionState) { final Set<AbstractInstance> collectedInstances = new HashSet<AbstractInstance>(); final ExecutionGroupVertexIterator groupIt = new ExecutionGroupVertexIterator(this.getExecutionGraph(), t...
[ "public", "void", "collectRequiredInstanceTypes", "(", "final", "InstanceRequestMap", "instanceRequestMap", ",", "final", "ExecutionState", "executionState", ")", "{", "final", "Set", "<", "AbstractInstance", ">", "collectedInstances", "=", "new", "HashSet", "<", "Abstr...
Checks which instance types and how many instances of these types are required to execute this stage of the job graph. The required instance types and the number of instances are collected in the given map. Note that this method does not clear the map before collecting the instances. @param instanceRequestMap the map ...
[ "Checks", "which", "instance", "types", "and", "how", "many", "instances", "of", "these", "types", "are", "required", "to", "execute", "this", "stage", "of", "the", "job", "graph", ".", "The", "required", "instance", "types", "and", "the", "number", "of", ...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionStage.java#L254-L305
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionStage.java
ExecutionStage.reconstructExecutionPipelines
void reconstructExecutionPipelines() { Iterator<ExecutionGroupVertex> it = this.stageMembers.iterator(); final Set<ExecutionVertex> alreadyVisited = new HashSet<ExecutionVertex>(); while (it.hasNext()) { final ExecutionGroupVertex groupVertex = it.next(); // We only look at input vertices first if (!...
java
void reconstructExecutionPipelines() { Iterator<ExecutionGroupVertex> it = this.stageMembers.iterator(); final Set<ExecutionVertex> alreadyVisited = new HashSet<ExecutionVertex>(); while (it.hasNext()) { final ExecutionGroupVertex groupVertex = it.next(); // We only look at input vertices first if (!...
[ "void", "reconstructExecutionPipelines", "(", ")", "{", "Iterator", "<", "ExecutionGroupVertex", ">", "it", "=", "this", ".", "stageMembers", ".", "iterator", "(", ")", ";", "final", "Set", "<", "ExecutionVertex", ">", "alreadyVisited", "=", "new", "HashSet", ...
Reconstructs the execution pipelines for this execution stage.
[ "Reconstructs", "the", "execution", "pipelines", "for", "this", "execution", "stage", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionStage.java#L320-L361
train
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionStage.java
ExecutionStage.reconstructExecutionPipeline
private void reconstructExecutionPipeline(final ExecutionVertex vertex, final boolean forward, final Set<ExecutionVertex> alreadyVisited) { ExecutionPipeline pipeline = vertex.getExecutionPipeline(); if (pipeline == null) { pipeline = new ExecutionPipeline(); vertex.setExecutionPipeline(pipeline); } ...
java
private void reconstructExecutionPipeline(final ExecutionVertex vertex, final boolean forward, final Set<ExecutionVertex> alreadyVisited) { ExecutionPipeline pipeline = vertex.getExecutionPipeline(); if (pipeline == null) { pipeline = new ExecutionPipeline(); vertex.setExecutionPipeline(pipeline); } ...
[ "private", "void", "reconstructExecutionPipeline", "(", "final", "ExecutionVertex", "vertex", ",", "final", "boolean", "forward", ",", "final", "Set", "<", "ExecutionVertex", ">", "alreadyVisited", ")", "{", "ExecutionPipeline", "pipeline", "=", "vertex", ".", "getE...
Reconstructs the execution pipeline starting at the given vertex by conducting a depth-first search. @param vertex the vertex to start the depth-first search from @param forward <code>true</code> to traverse the graph according to the original direction of the edges or <code>false</code> for the opposite direction @pa...
[ "Reconstructs", "the", "execution", "pipeline", "starting", "at", "the", "given", "vertex", "by", "conducting", "a", "depth", "-", "first", "search", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionStage.java#L374-L448
train
stratosphere/stratosphere
stratosphere-compiler/src/main/java/eu/stratosphere/compiler/contextcheck/ContextChecker.java
ContextChecker.check
public void check(Plan plan) { Preconditions.checkNotNull(plan, "The passed plan is null."); this.visitedNodes.clear(); plan.accept(this); }
java
public void check(Plan plan) { Preconditions.checkNotNull(plan, "The passed plan is null."); this.visitedNodes.clear(); plan.accept(this); }
[ "public", "void", "check", "(", "Plan", "plan", ")", "{", "Preconditions", ".", "checkNotNull", "(", "plan", ",", "\"The passed plan is null.\"", ")", ";", "this", ".", "visitedNodes", ".", "clear", "(", ")", ";", "plan", ".", "accept", "(", "this", ")", ...
Checks whether the given plan is valid. In particular it is checked that all contracts have the correct number of inputs and all inputs are of the expected type. In case of an invalid plan an extended RuntimeException is thrown. @param plan The plan to check.
[ "Checks", "whether", "the", "given", "plan", "is", "valid", ".", "In", "particular", "it", "is", "checked", "that", "all", "contracts", "have", "the", "correct", "number", "of", "inputs", "and", "all", "inputs", "are", "of", "the", "expected", "type", ".",...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/contextcheck/ContextChecker.java#L59-L63
train