Development Environment Setup
Creating an Application
When writing a CDAP application, it's best to use an integrated development environment (IDE) that understands the application interface and provides code-completion in writing interface methods.
We recommend using an IDE when building CDAP applications, such as either IntelliJ or Eclipse.
Using IntelliJ
Open IntelliJ and import the Maven project by:
If at the starting IntelliJ dialog, click Import Project; or
If an existing project is open, click File > Open...
Navigate to and select theÂ
pom.xml
 in the Maven project's directory.In the Import Project from Maven dialog box, select the Import Maven projects automatically and Automatically download: Sources, Documentation boxes.
Click Next. Complete the remaining dialogs. The new CDAP project is created and opened.
Using Eclipse
In your Eclipse installation, make sure you have the m2eclipse plugin installed.
Click File > Import.
To filter for Maven options, In the Select an import source dialog box, enterÂ
maven
.Select Existing Maven Projects as the import source.
Browse for the Maven project's directory.
Click Finish. The new CDAP project is imported, created, and opened.
Running CDAP from within an IDE
As CDAP is an open source project, you can download the source, import it into an IDE, and then modify, build, and run CDAP.
To run CDAP from within an IDE, follow these steps:
Install all the prerequisite system requirements for CDAP development.
Either clone the CDAP repo or download a ZIP of the source:
Clone the CDAP repository usingÂ
$ git clone -b develop https://github.com/cdapio/cdap.git
Download the source as a ZIP from GitHub and unpack the ZIP in a suitable location
In your IDE, install the Scala plugin (for IntelliJ or Eclipse) as there is Scala code in the project.
Open the CDAP project in the IDE as an existing project by finding and opening theÂ
cdap/pom.xml
.Resolve dependencies. This can take quite a while, as there are numerous downloads required.
In the case of IntelliJ, you can create a run configuration to run CDAP Sandbox:
Click Run > Edit Configurations...
Add a new "Application" run configuration.
Set Main class to beÂ
io.cdap.cdap.StandaloneMain
.Set VM options toÂ
-Xmx1024m
 (for in-memory MapReduce jobs).Click OK.
You can now use this run configuration to start an instance of CDAP Sandbox.
This allows you to start CDAP and access it from either the command line (CLI) or through the Microservices. To start the CLI, you can either start it from a shell using the cdap
 script or run the CLIMain
 class from the IDE.
If you want to run and develop the UI, you will need to follow additional instructions in the CDAP UI README.
Created in 2020 by Google Inc.