Starting and Stopping CDAP Sandbox

Use the cdap sandbox script (or, if you are using Windows, use cdap.bat sandbox) to start and stop the CDAP Sandbox (the location will vary depending on where the CDAP Sandbox is installed):

$ cd cdap-sandbox-5.1.0
$ ./bin/cdap sandbox start
. . .
$ ./bin/cdap sandbox stop
> cd cdap-sandbox-5.1.0
> .\bin\cdap sandbox start
. . .
> .\bin\cdap sandbox stop

You can configure CDAP by editing the cdap-site.xml file under your ./conf directory. CDAP must be restarted in order for changes in configuration to be picked up.

To run Spark2 programs with the CDAP Sandbox, edit the app.program.spark.compat setting in your cdap-site.xml file to be spark2_2.11. When the CDAP Sandbox is using Spark2, Spark1 programs cannot be run. When the CDAP Sandbox is using Spark1, Spark2 programs cannot be run.

Note: There is an issue with running Microsoft Windows and using the CDAP Local Sandbox scripts when CDAP_HOME is defined as a path with spaces in it. Until this is addressed, do not use a path with space characters in it for CDAP_HOME.

Note that starting CDAP is not necessary if you use either the Virtual Machine or the Docker image, as they both start the CDAP Sandbox automatically on startup.

Once CDAP is started successfully, in a web browser you will be able to see the CDAP UI running at http://localhost:11011/, where you can deploy example applications and interact with CDAP.

Note that in the case of the Docker container running inside a Virtual Machine (as on either Mac OS X or Microsoft Windows), you will need to substitute the Docker VM's IP address for localhost in the web browser address bar.

Customize JVM OPTS

On Linux, you can customize the JVM options for OutOfMemory error and whether to do a heap dump if an OutOfMemory error occurs. By default, if an OutOfMemory error occurs, the CDAP Sandbox will be killed and no heap dump will be performed. To customize these settings, edit the cdap-env.sh file under the ./conf directory. To change the behavior, change the value of KILL_ON_OOM_OPTS in cdap-env.sh. To enable the heap dump, ensure HEAPDUMP_ON_OOM is set to true in cdap-env.sh. CDAP must be restarted in order for changes in configuration to be picked up.