Application Concepts

The intend of this wiki page is to document the key concepts around CDAP Application.

Artifacts repository

  • Deployed JARS
    • Can be application, can be plugin or anything that CDAP supports.
    • Identified by type, name and version.
    • Deployed JARS are immutable
      • For snapshot jar deployment, the deployment timestamp will be used to generate a unique version
        • Similar to how maven repo works

Application

  • An Application can declares what configuration properties it needs
  • Configure method to generate Application Specification
    • A set of properties can be submitted on application deployment and available in the Application.configure method
      • Application can configure itself based on those properties
  • Application can be extended by cloning. Conceptually it is like prototypal inheritance. There is no class (template), only instance (Application).
    • On cloning, a set of properties can be submitted through the clone (REST) call
    • The Application.configure() method will be called again to generate a new Application Specification for the newly cloned app
      • The set of properties submitted through the clone call will be merged with the source app properties
      • There can be a known set of properties that the platform will interpret automatically (same applies to the original app deployment)
        • Adding of schedulers, plugins usage, etc.
    • No jar is being copied, only new entries in meta data table are created

Program

  • A Program can declares what configuration properties it needs
    • Much like what plugin does
    • Properties will be populated and available in both configure time and run time.

Properties

There are three places where property values can be defined:

  • When application is configured
  • Per cluster (preferences store)
  • When program starts (runtime arguments)

When a program runs, property values defined in all these places should be merged to form a single set of properties with the precedence of

  Application configure < Preferences store < Runtime arguments

Some properties can be marked as "final" so that it cannot be modified after application configured.

  • Do we need "final" at different level?

Created in 2020 by Google Inc.