Skip to content

Commit 40991fc

Browse files
author
solodovn1
committed
Merge branch 'master' into feature/DS-817-aws-s3-v2
2 parents ea3297f + 4be3954 commit 40991fc

41 files changed

Lines changed: 587 additions & 155 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
<groupId>com.here.xyz</groupId>
4343
<artifactId>xyz-hub</artifactId>
44-
<version>3.17.2-SNAPSHOT</version>
44+
<version>3.17.5-SNAPSHOT</version>
4545
<packaging>pom</packaging>
4646

4747
<modules>
@@ -93,7 +93,7 @@
9393
<!-- Dependencies versions -->
9494
<aws-sdk-version>1.12.772</aws-sdk-version>
9595
<aws-sdk2-version>2.25.8</aws-sdk2-version>
96-
<vertx-version>4.4.9</vertx-version>
96+
<vertx-version>4.5.14</vertx-version>
9797
<geo-tools-version>30.1</geo-tools-version>
9898
<jts-version>1.19.0</jts-version>
9999
<jackson-version>2.15.2</jackson-version>

xyz-connectors/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<groupId>com.here.xyz</groupId>
2626
<artifactId>xyz-hub</artifactId>
2727
<relativePath>../pom.xml</relativePath>
28-
<version>3.17.2-SNAPSHOT</version>
28+
<version>3.17.5-SNAPSHOT</version>
2929
</parent>
3030

3131
<licenses>

xyz-hub-service/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<groupId>com.here.xyz</groupId>
2626
<artifactId>xyz-hub</artifactId>
2727
<relativePath>../pom.xml</relativePath>
28-
<version>3.17.2-SNAPSHOT</version>
28+
<version>3.17.5-SNAPSHOT</version>
2929
</parent>
3030

3131
<licenses>

xyz-hub-service/src/main/java/io/vertx/openapi/contract/MediaType.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,17 @@
66
import java.util.Arrays;
77
import java.util.List;
88

9-
/**
10-
* This interface represents the most important attributes of an OpenAPI Operation.
11-
* <br>
12-
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#media-type-Object">Operation V3.1</a>
13-
* <br>
14-
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#media-type-Object">Operation V3.0</a>
15-
*/
169
public interface MediaType extends OpenAPIObject {
1710

11+
String APPLICATION_HAL_JSON = "application/hal+json";
1812
String APPLICATION_JSON = HttpHeaderValues.APPLICATION_JSON.toString();
1913
String APPLICATION_JSON_UTF8 = APPLICATION_JSON + "; charset=utf-8";
20-
List<String> SUPPORTED_MEDIA_TYPES = Arrays.asList(APPLICATION_JSON,
14+
String MULTIPART_FORM_DATA = HttpHeaderValues.MULTIPART_FORM_DATA.toString();
15+
List<String> SUPPORTED_MEDIA_TYPES = Arrays.asList(
16+
APPLICATION_JSON,
2117
APPLICATION_JSON_UTF8,
18+
MULTIPART_FORM_DATA,
19+
APPLICATION_HAL_JSON,
2220
"application/vnd.here.changeset-collection",
2321
"application/vnd.here.changeset",
2422
"application/vnd.here.compact-changeset",

xyz-hub-test/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<groupId>com.here.xyz</groupId>
2626
<artifactId>xyz-hub</artifactId>
2727
<relativePath>../pom.xml</relativePath>
28-
<version>3.17.2-SNAPSHOT</version>
28+
<version>3.17.5-SNAPSHOT</version>
2929
</parent>
3030

3131
<licenses>

xyz-hub-test/src/test/java/com/here/xyz/hub/rest/LimitsTestIT.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,16 @@
2626
import static io.restassured.RestAssured.given;
2727
import static org.hamcrest.Matchers.equalTo;
2828

29+
import com.here.xyz.jobs.steps.impl.transport.ImportFilesToSpace;
2930
import io.restassured.response.ValidatableResponse;
31+
import org.apache.commons.lang3.RandomStringUtils;
3032
import org.junit.After;
3133
import org.junit.Before;
3234
import org.junit.BeforeClass;
3335
import org.junit.Test;
3436

37+
import java.util.Random;
38+
3539
public class LimitsTestIT extends TestSpaceWithFeature {
3640

3741
private String cleanUpId;
@@ -94,6 +98,38 @@ public void addMultipleFeatures() throws InterruptedException {
9498
statusCode(FORBIDDEN.code());
9599
}
96100

101+
@Test
102+
public void addMoreThen10Mb() throws InterruptedException {
103+
int featureCount = 1024*12; // around 12 megabytes
104+
var content = generateFeatureCollection(featureCount);
105+
var headers = getAuthHeaders(AuthProfile.ACCESS_ALL);
106+
var response = given().
107+
accept(APPLICATION_GEO_JSON).
108+
contentType(APPLICATION_GEO_JSON).
109+
headers(headers).
110+
body(content).
111+
when().post("/spaces/x-psql-test/features");
112+
response.then().statusCode(OK.code());
113+
}
114+
115+
private String generateFeatureCollection(int count) {
116+
String content = "{\"type\":\"FeatureCollection\",\"features\":[";
117+
for (int i = 0; i < count; i++) {
118+
content += generateContentLine(i);
119+
if (i < count - 1) {
120+
content += ",";
121+
}
122+
}
123+
content += "]}";
124+
return content;
125+
}
126+
127+
private String generateContentLine(int id) {
128+
Random rd = new Random();
129+
String randomString = RandomStringUtils.randomAlphanumeric(900);
130+
return "{\"id\":\""+id+"\",\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":["+(rd.nextInt(179))+"."+(rd.nextInt(100))+","+(rd.nextInt(79))+"."+(rd.nextInt(100))+"]},\"properties\":{\"test\":\""+ randomString+"\"}}";
131+
}
132+
97133
@Test
98134
public void add1Feature() {
99135
given().

xyz-jobs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ A framework that can be used to perform long-running jobs (e.g., bulk import / e
88
2. Build & deploy the Job Step Lambda into the localstack by running the run-config `xyz-job-steps [install]`
99
3. Start the XYZ Hub Service by running the run-config `HubService`
1010
4. Start the XYZ Job Service by running the run-config `JobService`
11+
5. Optional run `CService`
1112

1213
Optionally: Start the JobPlayground by running `JobPlayground#main()`

xyz-jobs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.here.xyz</groupId>
66
<artifactId>xyz-hub</artifactId>
7-
<version>3.17.2-SNAPSHOT</version>
7+
<version>3.17.5-SNAPSHOT</version>
88
</parent>
99

1010
<name>XYZ Job Framework</name>

xyz-jobs/xyz-job-service/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>com.here.xyz</groupId>
2424
<artifactId>xyz-jobs</artifactId>
25-
<version>3.17.2-SNAPSHOT</version>
25+
<version>3.17.5-SNAPSHOT</version>
2626
</parent>
2727

2828
<name>XYZ Job Service</name>

xyz-jobs/xyz-job-service/src/main/java/com/here/xyz/jobs/JobPlayground.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2024 HERE Europe B.V.
2+
* Copyright (C) 2017-2025 HERE Europe B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -62,7 +62,7 @@
6262
import com.here.xyz.models.hub.Ref;
6363
import com.here.xyz.models.hub.Space;
6464
import com.here.xyz.util.ARN;
65-
import com.here.xyz.util.db.pg.XyzSpaceTableHelper.Index;
65+
import com.here.xyz.util.db.pg.XyzSpaceTableHelper.SystemIndex;
6666
import com.here.xyz.util.runtime.LambdaFunctionRuntime;
6767
import com.here.xyz.util.service.Core;
6868
import com.here.xyz.util.service.aws.SimulatedContext;
@@ -237,7 +237,7 @@ private static void startLambdaExecutions() throws IOException, WebClientExcepti
237237

238238
runImportFilesToSpaceStep(sampleSpace.getId(), importFormat);
239239

240-
for (Index index : Index.values())
240+
for (SystemIndex index : SystemIndex.values())
241241
runCreateIndexStep(sampleSpace.getId(), index);
242242

243243
runAnalyzeSpaceTableStep(sampleSpace.getId());
@@ -483,7 +483,7 @@ public static void runImportFilesToSpaceStep(String spaceId, ImportFilesToSpace.
483483
runStep(new ImportFilesToSpace().withSpaceId(spaceId).withFormat(format).withUpdateStrategy(UpdateStrategy.DEFAULT_UPDATE_STRATEGY));
484484
}
485485

486-
public static void runCreateIndexStep(String spaceId, Index index) throws IOException {
486+
public static void runCreateIndexStep(String spaceId, SystemIndex index) throws IOException {
487487
runStep(new CreateIndex().withSpaceId(spaceId).withIndex(index));
488488
}
489489

0 commit comments

Comments
 (0)