Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

IDE Setup

Setup command line tools and Node

...

Please refer to Build System & CI on how to setup building of CDAP.

Build

Git clone the CDAP repository and the Hydrator plugins:

Code Block
git clone git@github.com:cdapio/cdap.git

Now build using maven:

Code Block
cd cdap
mvn clean package -DskipTests

If you get compile errors similar to this one:

Code Block
Exception in thread "main" java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer;
        at org.eclipse.aether.connector.basic.ChecksumCalculator.update(ChecksumCalculator.java:202)

this is likely due to the version of maven that does not work properly with latest Java versions. Upgrading to maven 3.6.1 will most likely fix the problem. 

Build and run Local Standalone CDAP

Git clone the CDAP repository (if you haven't yet), and the Hydrator plugins:

Code Block
git clone git@github.com:cdapio/cdap.git
git clone git@github.com:cdapio/hydrator-plugins.git

First build the plugins:

Code Block
cd hydrator-plugins
git submodule update --init --recursive --remote
mvn clean package -DskipTests 

Then build the CDAP sandbox, including the plugins:

Code Block
languagebash
cd cdap
MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" mvn clean package -pl cdap-standalone,cdap-app-templates/cdap-etl -am -amd -DskipTests -P templates,dist,release,unit-tests -Dadditional.artifacts.dir=<path to hydrator-plugins>
cd cdap-standalone/target
unzip cdap-sandbox-<version>-SNAPSHOT.zip 
cd cdap-sandbox-<version>-SNAPSHOT
cd bin
./cdap sandbox start
  • The UI runs on localhost:11011
  • Wrangle a sample file, build a pipeline, run it.

IDE Setup

Creating an IntelliJ project

...

  1. Go to menu IntelliJ IDEA -> Preferences…
  2. Expand the Copyright setting on the left (under Project Settings)
  3. Select Copyright Profiles and add a new Copyright Profile (there is a + button in the top-middle)
  4. Give the profile a name (e.g. Cask Apache v2)
  5. Paste the following text to the Copyright text box

    Code Block
    languagetext
    Copyright © $today.year Cask Data, Inc.
    
    Licensed under the Apache License, Version 2.0 (the "License"); you may not
    use this file except in compliance with the License. You may obtain a copy of
    the License at
    
    http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    License for the specific language governing permissions and limitations under
    the License.
  6. In the Allow replacing copyright if old copyright contains box, enter Copyright.
  7. Click on Copyright on the left again and add a new scope of All with the copyright profile added in above step.
  8. Note: if there is an existing copyright in a file, and you are modifying the file (rather than completely replacing it), extend the copyright rather than replacing it:
    "Copyright © 2014" becomes Copyright © 2014-2016" (or similar).

Build

Git clone the CDAP repository and the Hydrator plugins:

Code Block
git clone git@github.com:cdapio/cdap.git

Now build using maven:

Code Block
cd cdap
mvn clean package -DskipTests

If you get compile errors similar to this one:

Code Block
Exception in thread "main" java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer;
        at org.eclipse.aether.connector.basic.ChecksumCalculator.update(ChecksumCalculator.java:202)

this is likely due to the version of maven that does not work properly with latest Java versions. Upgrading to maven 3.6.1 will most likely fix the problem. 

Build and run Local Standalone CDAP

...

  1. )

...

Code Block
git clone git@github.com:cdapio/cdap.git
git clone git@github.com:cdapio/hydrator-plugins.git

First build the plugins:

Code Block
cd hydrator-plugins
git submodule update --init --recursive --remote
mvn clean package -DskipTests 

Then build the CDAP sandbox, including the plugins:

Code Block
languagebash
cd cdap
MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" mvn clean package -pl cdap-standalone,cdap-app-templates/cdap-etl -am -amd -DskipTests -P templates,dist,release,unit-tests -Dadditional.artifacts.dir=<path to hydrator-plugins>
cd cdap-standalone/target
unzip cdap-sandbox-<version>-SNAPSHOT.zip 
cd cdap-sandbox-<version>-SNAPSHOT
cd bin
./cdap sandbox start

...

  1. .