Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,11 @@ name: Java CI with Maven
on:
push:
branches:
- alpha
- beta
- development
- master
- staging
- tagscanary
- tagscanarymerge
- fixlabels
- interceptapis
- mlh-965
- mlh-498-use-spec-store-master
- tags_intg_test
- nb_tags_intg_test


jobs:
Expand All @@ -43,6 +37,13 @@ jobs:
steps:
- uses: actions/checkout@v3

# Set up Docker
- name: Set up Docker
uses: docker/setup-buildx-action@v2
with:
driver-opts: image=moby/buildkit:master
install: true

- name: Set up JDK 17
uses: actions/setup-java@v1
with:
Expand All @@ -51,6 +52,12 @@ jobs:
- name: Print JDK version
run: java -version

# Verify Docker is available
- name: Verify Docker
run: |
docker --version
docker info

- name: Cache Maven packages
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -78,6 +85,16 @@ jobs:
echo "build without dashboard"
chmod +x ./build.sh && ./build.sh

- name: Run Integration Tests
env:
# Configure Testcontainers for GitHub Actions
TESTCONTAINERS_RYUK_DISABLED: true
TESTCONTAINERS_CHECKS_DISABLE: true
DOCKER_HOST: unix:///var/run/docker.sock
run: |
echo "Running integration tests..."
chmod +x ./run-integration-tests.sh && ./run-integration-tests.sh

- name: Get Repository Name
run: echo "REPOSITORY_NAME=`echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//"`" >> $GITHUB_ENV
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ Build Process
distro/target/apache-atlas-<version>-storm-hook.tar.gz
distro/target/apache-atlas-<version>-falcon-hook.tar.gz

4. For more details on installing and running Apache Atlas, please refer to https://atlas.apache.org/#/Installation.
4. For more details on installing and running Apache Atlas, please refer to https://atlas.apache.org/#/Installation
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public abstract class AbstractRedisService implements RedisService {
private static final String ATLAS_REDIS_LOCK_WAIT_TIME_MS = "atlas.redis.lock.wait_time.ms";
private static final String ATLAS_REDIS_LOCK_WATCHDOG_TIMEOUT_MS = "atlas.redis.lock.watchdog_timeout.ms";
private static final String ATLAS_REDIS_LEASE_TIME_MS = "atlas.redis.lease_time.ms";
private static final String CHECK_SENTINELS_LIST = "atlas.redis.sentinel.check_list.enabled";
private static final int DEFAULT_REDIS_WAIT_TIME_MS = 15_000;
private static final int DEFAULT_REDIS_LOCK_WATCHDOG_TIMEOUT_MS = 600_000;
private static final int DEFAULT_REDIS_LEASE_TIME_MS = 60_000;
Expand All @@ -48,6 +49,7 @@ public abstract class AbstractRedisService implements RedisService {
long waitTimeInMS;
long leaseTimeInMS;
long watchdogTimeoutInMS;
boolean checkSentinelsList;

// Inner class to track lock information
private static class LockInfo {
Expand Down Expand Up @@ -255,7 +257,7 @@ Config getCacheImplConfig() {
config.useSentinelServers()
.setClientName(ATLAS_METASTORE_SERVICE+"-redisCache")
.setReadMode(ReadMode.MASTER_SLAVE)
.setCheckSentinelsList(false)
.setCheckSentinelsList(checkSentinelsList)
.setKeepAlive(true)
.setMasterConnectionMinimumIdleSize(10)
.setMasterConnectionPoolSize(20)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
package org.apache.atlas.service.redis;

import org.apache.atlas.AtlasException;
import org.apache.atlas.annotation.ConditionalOnAtlasProperty;
import org.redisson.Redisson;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
@ConditionalOnAtlasProperty(property = "atlas.redis.service.impl")
@Profile("!local")
public class RedisServiceImpl extends AbstractRedisService{

private static final Logger LOG = LoggerFactory.getLogger(RedisServiceImpl.class);

@PostConstruct
public void init() throws AtlasException {
LOG.info("Initializing RedisServiceImpl");

redisClient = Redisson.create(getProdConfig());
redisCacheClient = Redisson.create(getCacheImplConfig());
LOG.debug("Sentinel redis client created successfully.");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
package org.apache.atlas.service.redis;

import org.apache.atlas.AtlasException;
import org.apache.atlas.annotation.ConditionalOnAtlasProperty;
import org.redisson.Redisson;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
@ConditionalOnAtlasProperty(property = "atlas.redis.service.impl")
@Profile("local")
public class RedisServiceLocalImpl extends AbstractRedisService {

private static final Logger LOG = LoggerFactory.getLogger(RedisServiceLocalImpl.class);

@PostConstruct
public void init() throws AtlasException {
LOG.info("Initializing RedisServiceLocalImpl");

redisClient = Redisson.create(getLocalConfig());
redisCacheClient = Redisson.create(getLocalConfig());
LOG.info("Local redis client created successfully.");
Expand Down
2 changes: 1 addition & 1 deletion distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ atlas.graph.storage.hbase.regions-per-server=1
</profiles>

<build>
<outputDirectory>target</outputDirectory>
<outputDirectory>target/classes</outputDirectory>
<resources>
<resource>
<directory>src/bin</directory>
Expand Down
201 changes: 201 additions & 0 deletions docs/grafana-dashboards/classification-task-metrics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 20,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "smooth",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "assets"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"options": {
"legend": {
"calcs": [
"mean",
"max",
"min"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "histogram_quantile(0.95, sum(rate(atlas_metastore_atlas_classification_assets_per_task_bucket{tenant=~\"$tenant\"}[5m])) by (le, type))",
"legendFormat": "95th percentile - {{type}}",
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "histogram_quantile(0.50, sum(rate(atlas_metastore_atlas_classification_assets_per_task_bucket{tenant=~\"$tenant\"}[5m])) by (le, type))",
"legendFormat": "Median - {{type}}",
"refId": "B"
}
],
"title": "Assets per Task Distribution",
"type": "timeseries"
}
],
"refresh": "10s",
"schemaVersion": 38,
"style": "dark",
"tags": ["atlas", "classification", "tasks"],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "Prometheus",
"value": "prometheus"
},
"hide": 0,
"includeAll": false,
"label": "Datasource",
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"current": {
"selected": true,
"text": ["All"],
"value": ["$__all"]
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(atlas_metastore_atlas_classification_tasks_total, tenant)",
"hide": 0,
"includeAll": true,
"label": "Tenant",
"multi": true,
"name": "tenant",
"options": [],
"query": {
"query": "label_values(atlas_metastore_atlas_classification_tasks_total, tenant)",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "Atlas Classification Task Metrics",
"uid": "atlas-classification-tasks",
"version": 1,
"weekStart": ""
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@
<redis.client.version>3.20.1</redis.client.version>
<micrometer.version>1.11.1</micrometer.version>
<netty4.version>4.1.61.Final</netty4.version>
<junit.jupiter.version>5.8.2</junit.jupiter.version>
<junit.jupiter.version>5.9.3</junit.jupiter.version>
</properties>

<modules>
Expand Down Expand Up @@ -1813,7 +1813,7 @@
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<artifactId>surefire-junit-platform</artifactId>
<version>${surefire.version}</version>
</dependency>
</dependencies>
Expand Down
Loading
Loading