Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel4

CDAP collects logs and metrics for all of its internal services and user applications. Being able to view these details can be very helpful in debugging CDAP applications as well as analyzing their performance. CDAP gives access to its logs, metrics, and other monitoring information through Microservices, the CDAP UI, as well as a Java Client.

...

You can also use a custom "logback" file with your application, as described in the Developer Manual section Application Logback.

Changing Program Log Levels

...

These properties control the writing of logs to Kafka:

Parameter Name

Default Value

Description

log.kafka.topic

logs.user-v2

Kafka topic name used to publish logs

log.publish.num.partitions

10

Number of CDAP Kafka service partitions to publish the logs to

log.publish.partition.key

program

Publish logs from an application or a program to the same partition. Valid values are "application" or "program". If set to "application", logs from all the programs of an application go to the same partition. If set to "program", logs from the same program go to the same partition. Changes to this property requires restarting of all CDAP applications.

Notes:

  • If an external Kafka service is used (instead of the CDAP Kafka service), the number of partitions used for log.publish.num.partitions must match the number set in the external service for the topic being used to publish logs (log.kafka.topic).

  • By default, log.publish.partition.key is set to program, which means that all logs for the same program go to the same partition. Set this to application if you want all logs from an application to go to the same instance of the Log Saver Service.

...

These properties control the Log Saver Service:

Parameter Name

Default Value

Description

log.saver.max.instances

${master.service.max.instances}

Maximum number of log saver instances to run in YARN

log.saver.num.instances

1

Number of log saver instances to run in YARN

log.saver.container.memory.mb

${master.service.memory.mb}

Memory in megabytes for each log saver instance to run in YARN.

log.saver.container.num.cores

2

Number of virtual cores for each log saver instance in YARN

Log saver instances should be from a minimum of one to a maximum of ten. The maximum is set by the number of Kafka partitions (log.publish.num.partitions), which by default is 10.

...

These properties control the CDAP log pipeline:

Parameter Name

Default Value

Description

log.pipeline.cdap.dir.permissions

700

Permissions used by the system log pipeline when creating directories

log.pipeline.cdap.file.cleanup.batch.

size

10000

Batch size to clean up log metadata table

log.pipeline.cdap.file.max.lifetime.ms

21600000

Maximum time span in milliseconds of a log file created by the system log pipeline

log.pipeline.cdap.file.max.size.bytes

104857600

Maximum size in bytes of a log file created by the system log pipeline

log.pipeline.cdap.file.permissions

600

Permissions used by the system log pipeline when creating files

log.pipeline.cdap.file.retention.

duration.days

7

Time in days a log file is retained

These properties control both the CDAP log pipeline and custom log pipelines:

Parameter Name

Default Value

Description

log.process.pipeline.checkpoint.

interval.ms

10000

The time between log processing pipeline checkpoints in milliseconds

log.process.pipeline.config.dir

/opt/cdap/master/ext/logging/config

A local directory on the CDAP Master that is scanned for log processing pipeline configurations. Each pipeline is defined by a file in the logback XML format, with ".xml" as the file name extension.

log.process.pipeline.event.delay.ms

2000

The time a log event stays in the log processing pipeline buffer before writing out to log appenders in milliseconds. A longer delay will result in better time ordering of log events before presenting to log appenders but will consume more memory.

log.process.pipeline.kafka.fetch.size

1048576

The buffer size in bytes, per topic partition, for fetching log events from Kafka

log.process.pipeline.lib.dir

/opt/cdap/master/ext/logging/lib

Comma-separated list of local directories on the CDAP Master scanned for additional library JAR files to be included for log processing

The log.process.pipeline.* properties can be over-ridden and specified at the custom pipeline level by providing a value in a pipeline's "logback" file for any of these properties.

...