Skip to content

Commit

Permalink
(MINOR) Reimplement yarn application metrics exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Weihrauch committed Dec 30, 2022
1 parent 03d2305 commit 51207df
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 264 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
short_version:
description: "Version formatted without snapshot number"
value: ${{ jobs.build_rpm.outputs.short_version }}
stable_release:
description: "True if it's a new stable version"
value: ${{ jobs.build_rpm.outputs.stable_release }}
jobs:
build_rpm: # a free machine-readable name for this job
runs-on: ubuntu-latest # specify the base operating system
Expand All @@ -25,7 +28,9 @@ jobs:
rpm_path: ${{ steps.build_rpm.outputs.rpm_path }}
rpm_name: ${{ steps.build_rpm.outputs.rpm_name }}
version: ${{ steps.version.outputs.version }}
stable_release: ${{ steps.version.outputs.stable_release }}
short_version: ${{ steps.version.outputs.short_version }}

steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -66,6 +71,7 @@ jobs:
echo "version=${{steps.versioning_release.outputs.version}}.$(date +'%Y%m%d')git${{steps.versioning_release.outputs.increment}}" >> $GITHUB_OUTPUT
else
echo "version=${{steps.versioning_release.outputs.version}}" >> $GITHUB_OUTPUT
echo "stable_release=1" >> $GITHUB_OUTPUT
fi
- name: Run rpm build
id: build_rpm
Expand Down
40 changes: 21 additions & 19 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,26 @@ jobs:
build-rpm: # a free machine-readable name for this job
uses: ./.github/workflows/build-rpm.yml
secrets: inherit
release-snapshot:
release-stable-version:
needs: build-rpm
if: ${{ needs.build-rpm.outputs.stable_release }}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: ${{ needs.build-rpm.outputs.rpm_name}}
id: artifact
- uses: "marvinpinto/action-automatic-releases@latest"
env:
VERSION: ${{steps.build-rpm.version }}
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "v$${{needs.build-rpm.outputs.version }}"
prerelease: false
title: "Cloudera Exporter ${{needs.build-rpm.outputs.version}}"
files: |
${{ steps.artifact.outputs.download-path}}
release-snapshot-version:
needs: build-rpm
runs-on: ubuntu-latest # specify the base operating system
container:
Expand All @@ -26,21 +45,4 @@ jobs:
prerelease: true
title: "Cloudera exporter Snapshot ${{needs.build-rpm.outputs.version}}"
files: |
${{ steps.artifact.outputs.download-path}}
publish-on-claranet-nexus:
needs: release-snapshot
runs-on: ubuntu-latest # specify the base operating system
steps:
- uses: actions/download-artifact@v2
with:
name: ${{ needs.build-rpm.outputs.rpm_name}}
id: artifact
- name: Upload to Remote nexus
env:
GTILAB_TRIGGER_TOKEN: ${{ secrets.GTILAB_TRIGGER_TOKEN }}
run: |
curl -X POST \
--fail \
-F token=$GTILAB_TRIGGER_TOKEN \
-F variables="{test: 'test'}"
https://git.fr.clara.net/api/v4/projects/11401/trigger/pipeline
${{ steps.artifact.outputs.download-path}}
16 changes: 9 additions & 7 deletions METRICS_CATALOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,12 @@ All the available metrics


### Yarn Module Metrics
kbdi_yarn_application_allocated_vcores
kbdi_yarn_application_allocated_mb
kbdi_yarn_application_runningContainers
kbdi_yarn_available_vcores
kbdi_yarn_total_pending_containers
kbdi_yarn_yarn_gc_time_across_nodemanagers
kbdi_yarn_yarn_total_apps_running
| Metric Name | Unit | Description | Metadata |
|:-------------------------------------------:|:----------------:|---------------------------------|----------|
|kbdi_yarn_application_allocated_vcores | vcores |
|kbdi_yarn_application_allocated_mb | mb |
|kbdi_yarn_application_runningContainers | mb |
|kbdi_yarn_available_vcores | vcores |
|kbdi_yarn_total_pending_containers | containers |
|kbdi_yarn_yarn_gc_time_across_nodemanagers | ms |
|kbdi_yarn_yarn_total_apps_running | application |
Loading

0 comments on commit 51207df

Please sign in to comment.