Skip to content

Commit

Permalink
[FLINK-1110] Add createCollectionEnvironment for Scala
Browse files Browse the repository at this point in the history
  • Loading branch information
aljoscha authored and StephanEwen committed Oct 3, 2014
1 parent 471f340 commit d9ed4ad
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import org.apache.flink.api.java.typeutils.{ValueTypeInfo, TupleTypeInfoBase}
import org.apache.flink.api.scala.operators.ScalaCsvInputFormat
import org.apache.flink.core.fs.Path

import org.apache.flink.api.java.{ExecutionEnvironment => JavaEnv}
import org.apache.flink.api.java.{ExecutionEnvironment => JavaEnv, CollectionEnvironment}
import org.apache.flink.api.common.io.{InputFormat, FileInputFormat}

import org.apache.flink.api.java.operators.DataSource
Expand Down Expand Up @@ -391,6 +391,16 @@ object ExecutionEnvironment {
new ExecutionEnvironment(javaEnv)
}

/**
* Createa an execution environment that uses Java Collections underneath. This will execute in a
* single thread in the current JVM. It is very fast but will fail if the data does not fit into
* memory. This is useful during implementation and for debugging.
* @return
*/
def createCollectionsEnvironment: ExecutionEnvironment = {
new ExecutionEnvironment(new CollectionEnvironment)
}

/**
* Creates a remote execution environment. The remote environment sends (parts of) the program to
* a cluster for execution. Note that all file paths used in the program must be accessible from
Expand Down

0 comments on commit d9ed4ad

Please sign in to comment.