Skip to content

Commit 01a700f

Browse files
authored
Merge branch 'apache:master' into ATLAS-5055
2 parents 0a4de7c + b45b496 commit 01a700f

File tree

19 files changed

+332
-195
lines changed

19 files changed

+332
-195
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ jobs:
7979
exit 1
8080
fi
8181
82+
- name: Upload Code Coverage Results
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: coverage
86+
path: dev-support/atlas-docker/dist/coverage/*
87+
8288
- name: Cache downloaded archives
8389
if: success()
8490
uses: actions/cache@v4
@@ -98,17 +104,16 @@ jobs:
98104
cd dev-support/atlas-docker
99105
export DOCKER_BUILDKIT=1
100106
export COMPOSE_DOCKER_CLI_BUILD=1
107+
docker compose -f docker-compose.atlas-base.yml build
101108
docker compose \
102-
-f docker-compose.atlas-base.yml \
103109
-f docker-compose.atlas.yml \
104110
-f docker-compose.atlas-hadoop.yml \
105111
-f docker-compose.atlas-hbase.yml \
106112
-f docker-compose.atlas-kafka.yml \
107-
-f docker-compose.atlas-hive.yml up -d
113+
-f docker-compose.atlas-hive.yml up -d --wait
108114
109115
- name: Check status of containers and remove them
110116
run: |
111-
sleep 60
112117
containers=(atlas atlas-hadoop atlas-hbase atlas-kafka atlas-hive);
113118
flag=true;
114119
for container in "${containers[@]}"; do

common/src/main/java/org/apache/atlas/utils/AtlasPathExtractorUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private AtlasPathExtractorUtil() {
9090
}
9191

9292
public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) {
93-
if (StringUtils.isEmpty(path.toString())) {
93+
if (path == null || StringUtils.isEmpty(path.toString())) {
9494
throw new IllegalArgumentException("Invalid Input: Path is Null");
9595
}
9696

@@ -500,7 +500,7 @@ private static AtlasEntity addOfsPathEntity(Path path, AtlasEntityExtInfo extInf
500500
}
501501

502502
if (LOG.isDebugEnabled()) {
503-
LOG.debug("<== addOzonePathEntity(strPath={})", path.toString());
503+
LOG.debug("<== addOzonePathEntity(strPath={})", path);
504504
}
505505

506506
return currentOfsKeyEntity;
@@ -555,7 +555,7 @@ private static AtlasEntity addO3fsPathEntity(Path path, AtlasEntityExtInfo extIn
555555
}
556556

557557
if (LOG.isDebugEnabled()) {
558-
LOG.debug("<== addOzonePathEntity(strPath={})", path.toString());
558+
LOG.debug("<== addOzonePathEntity(strPath={})", path);
559559
}
560560

561561
return currentO3fsKeyEntity;

common/src/test/java/org/apache/atlas/utils/AtlasPathExtractorUtilTest.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import org.apache.atlas.model.instance.AtlasEntity;
2222
import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo;
23+
import org.apache.commons.lang.StringUtils;
2324
import org.apache.hadoop.fs.Path;
2425
import org.slf4j.Logger;
2526
import org.slf4j.LoggerFactory;
@@ -28,7 +29,6 @@
2829

2930
import java.util.HashMap;
3031
import java.util.Map;
31-
import java.util.Objects;
3232

3333
import static org.testng.Assert.assertEquals;
3434
import static org.testng.Assert.assertNotNull;
@@ -101,11 +101,11 @@ public void testGetPathEntityOzone3Path(OzoneKeyValidator validator) {
101101
assertNotNull(entity);
102102
verifyOzoneKeyEntity(entity, validator);
103103

104-
if (entity.getTypeName() == OZONE_KEY) {
104+
if (StringUtils.equals(entity.getTypeName(), OZONE_KEY)) {
105105
verifyReferredAndKnownEntities(entityWithExtInfo, extractorContext, validator, validator.knownEntitiesCountTillKey, 2);
106-
} else if (entity.getTypeName() == OZONE_BUCKET) {
106+
} else if (StringUtils.equals(entity.getTypeName(), OZONE_BUCKET)) {
107107
verifyReferredAndKnownEntities(entityWithExtInfo, extractorContext, validator, validator.knownEntitiesCountTillBucket, 2);
108-
} else if (entity.getTypeName() == OZONE_VOLUME) {
108+
} else if (StringUtils.equals(entity.getTypeName(), OZONE_VOLUME)) {
109109
verifyReferredAndKnownEntities(entityWithExtInfo, extractorContext, validator, validator.knownEntitiesCountTillVolume, 1);
110110
}
111111
}
@@ -340,14 +340,11 @@ private void verifyOzoneEntities(Map<String, AtlasEntity> knownEntities, OzoneKe
340340
}
341341

342342
private void verifyOzoneKeyEntity(AtlasEntity entity, OzoneKeyValidator validator) {
343-
if (Objects.equals(entity.getTypeName(), OZONE_KEY)) {
344-
assertEquals(entity.getTypeName(), OZONE_KEY);
343+
if (StringUtils.equals(entity.getTypeName(), OZONE_KEY)) {
345344
assertTrue(validator.validateNameQName(entity));
346-
} else if (Objects.equals(entity.getTypeName(), OZONE_BUCKET)) {
347-
assertEquals(entity.getTypeName(), OZONE_BUCKET);
345+
} else if (StringUtils.equals(entity.getTypeName(), OZONE_BUCKET)) {
348346
assertTrue(validator.validateNameQName(entity));
349-
} else if (Objects.equals(entity.getTypeName(), OZONE_VOLUME)) {
350-
assertEquals(entity.getTypeName(), OZONE_VOLUME);
347+
} else if (StringUtils.equals(entity.getTypeName(), OZONE_VOLUME)) {
351348
assertTrue(validator.validateNameQName(entity));
352349
}
353350
}

dashboardv2/public/js/views/glossary/GlossaryDetailLayoutView.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,8 @@ define(['require',
245245
}
246246
} else {;
247247
Utils.showTitleLoader(this.$('.page-title .fontLoader'), this.ui.details);
248-
var getApiFunctionKey = "getCategory",
248+
var getApiFunctionKey =this.isTermView? "getTerm" : "getCategory",
249249
that = this;
250-
if (this.isTermView) {
251-
getApiFunctionKey = "getTerm";
252-
}
253250
this.glossaryCollection[getApiFunctionKey]({
254251
"guid": this.guid,
255252
"ajaxOptions": {
@@ -542,7 +539,9 @@ define(['require',
542539
"value": {
543540
"searchType": "basic",
544541
"term": that.data.qualifiedName,
545-
"includeDE": options.value.includeDE || false
542+
"includeDE": options.value.includeDE || false,
543+
"pageLimit": options.value.pageLimit || 25,
544+
"pageOffset": options.value.pageOffset || 0,
546545
},
547546
"fromView": "glossary"
548547
})));

dashboardv2/public/js/views/search/SearchResultLayoutView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ define(['require',
363363
Utils.setUrl(_.extend({
364364
url: Utils.getUrlState.getQueryUrl().queyParams[0],
365365
urlParams: this.columnOrder ? _.extend(this.value, { 'uiParameters': this.getColumnOrderWithPosition() }) : this.value,
366-
mergeBrowserUrl: false,
366+
mergeBrowserUrl: Utils.getUrlState.isGlossaryTab()?true:false,
367367
trigger: false,
368368
updateTabState: true
369369
}, options));

dev-support/atlas-docker/Dockerfile.atlas-build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ARG ATLAS_BUILD_JAVA_VERSION
2020
ARG TARGETARCH
2121

2222
# Install necessary packages to build Atlas
23-
RUN apt-get update && apt-get -y install git maven
23+
RUN apt-get update && apt-get -y install git maven unzip
2424

2525
# Set environment variables
2626
ENV JAVA_HOME=/usr/lib/jvm/java-${ATLAS_BUILD_JAVA_VERSION}-openjdk-${TARGETARCH}

dev-support/atlas-docker/docker-compose.atlas-hadoop.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ services:
1515
ports:
1616
- "9000:9000"
1717
- "8088:8088"
18-
depends_on:
19-
- atlas-base
2018
healthcheck:
21-
test: "hdfs dfs -ls /"
22-
interval: 1m30s
19+
test: [ "CMD-SHELL", "su hdfs -c \"/opt/hadoop/bin/hdfs dfsadmin -report | grep -q 'Live datanodes'\"" ]
20+
interval: 30s
2321
timeout: 10s
2422
retries: 30
2523
start_period: 40s

dev-support/atlas-docker/docker-compose.atlas-hbase.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ services:
2525
condition: service_started
2626
atlas-kafka:
2727
condition: service_started
28+
healthcheck:
29+
test: [ "CMD", "wget", "-q", "--spider", "http://localhost:16030/rs-status" ]
30+
interval: 30s
31+
timeout: 10s
32+
retries: 30
33+
start_period: 40s
2834
environment:
2935
- HBASE_VERSION
3036
- ATLAS_VERSION

dev-support/atlas-docker/docker-compose.atlas-hive.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ services:
1414
tty: true
1515
networks:
1616
- atlas
17+
healthcheck:
18+
test: [ "CMD-SHELL", "su hdfs -c \"/opt/hadoop/bin/hdfs dfsadmin -report | grep -q 'Live datanodes'\"" ]
19+
interval: 30s
20+
timeout: 10s
21+
retries: 30
22+
start_period: 40s
1723
ports:
1824
- "10000:10000"
1925
depends_on:
@@ -39,6 +45,11 @@ services:
3945
hostname: atlas-db.example.com
4046
networks:
4147
- atlas
48+
healthcheck:
49+
test: 'su -c "pg_isready -q" postgres'
50+
interval: 10s
51+
timeout: 2s
52+
retries: 30
4253

4354
networks:
4455
atlas:

dev-support/atlas-docker/docker-compose.atlas.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
- "21000:21000"
2020
depends_on:
2121
atlas-hbase:
22-
condition: service_started
22+
condition: service_healthy
2323
atlas-kafka:
2424
condition: service_started
2525
atlas-solr:

0 commit comments

Comments
 (0)