🔗Virtual Machine Image
To use the Virtual Machine image:
- Download and install either Oracle VirtualBox or VMWare player to your environment.
- Download the CDAP Standalone Virtual Machine (Standalone VM) at http://cask.co/downloads/#cdap.
- Import the downloaded
.ovafile into either the VirtualBox or VMWare Player.
The CDAP Standalone Virtual Machine is configured with the recommended settings for Standalone CDAP:
- 4 GB of RAM
- Ubuntu Desktop Linux
- 40 GB of virtual disk space
It has pre-installed all the software that you need to run and develop CDAP applications:
- The Standalone CDAP SDK is installed under
/opt/cdap/sdkand will automatically start when the virtual machine starts.
- A Java JDK is installed.
- Maven is installed and configured to work for CDAP.
- Both IntelliJ IDEA and Eclipse IDE are installed and available through desktop links once the virtual machine has started.
- Links on the desktop are provided to the CDAP SDK, CDAP UI, and CDAP documentation.
- The Chromium web browser is included. The default page for the CDAP UI, available through a desktop link, is
No password is required to enter the virtual machine; however, should you need to install or
remove software, the admin user and password are both
🔗Development Environment Setup
🔗Creating an Application
When writing a CDAP application, it's best to use an integrated development environment that understands the application interface to provide code-completion in writing interface methods.
The best way to start developing a CDAP application is by using the Maven archetype:
$ mvn archetype:generate \ -DarchetypeGroupId=co.cask.cdap \ -DarchetypeArtifactId=cdap-app-archetype \ -DarchetypeVersion=3.6.0
This creates a Maven project with all required dependencies, Maven plugins, and a simple application template for the development of your application. You can import this Maven project into your preferred IDE—such as IntelliJ or Eclipse—and start developing your first CDAP application.
For an application that contains a MapReduce program, set the
cdap-mapreduce-archetype; for Spark, use either
- Open IntelliJ and import the Maven project.
- Go to menu File -> Import Project...
- Select the
pom.xmlin the Maven project's directory.
- Select the Import Maven projects automatically and Automatically download: Sources, Documentation boxes in the Import Project from Maven dialog.
- Click Next, complete the remaining dialogs, and the new CDAP project will be created and opened.
- In your Eclipse installation, make sure you have the m2eclipse plugin installed.
- Go to menu File -> Import
- Enter maven in the Select an import source dialog to filter for Maven options.
- Select Existing Maven Projects as the import source.
- Browse for the Maven project's directory.
- Click Finish, and the new CDAP project will be imported, created and opened.
🔗Starting and Stopping Standalone CDAP
cdap.sh script to start and stop the Standalone CDAP:
$ /opt/cdap/sdk/bin/cdap.sh start . . . $ /opt/cdap/sdk/bin/cdap.sh stop
Note that starting CDAP is not necessary if you use the Virtual Machine, as it starts the Standalone CDAP 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:9999, where you can deploy example applications and
interact with CDAP.