Skip to content

Commit a50869b

Browse files
heremaps-botheremaps-bot
heremaps-bot
authored and
heremaps-bot
committed
HERE Data SDK for Java & Scala Release 2.35.0
1 parent 820290a commit a50869b

File tree

179 files changed

+329
-531
lines changed

Some content is hidden

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

179 files changed

+329
-531
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ The following examples demonstrate how to use the Location Library.
8585

8686
## License
8787

88-
Copyright (C) 2017-2021 HERE Europe B.V.
88+
Copyright (C) 2017-2022 HERE Europe B.V.
8989

9090
Unless otherwise noted in `LICENSE` files, source code files for specific files or directories, the [LICENSE](LICENSE) in the root applies to all content in this repository.

data-archive/java/avro-example/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ You can use the OLP CLI to create pipeline components and activate the pipeline
187187

188188
```bash
189189
olp pipeline create $PIPELINE_NAME --scope $PROJECT_HRN
190-
olp pipeline template create $PIPELINE_TEMPLATE_NAME stream-4.0 $PATH_TO_JAR com.here.platform.dal.DALMain \
190+
olp pipeline template create $PIPELINE_TEMPLATE_NAME stream-5.0 $PATH_TO_JAR com.here.platform.dal.DALMain \
191191
--input-catalog-ids=source --workers=2 --scope $PROJECT_HRN # Note that the value of workers should be greater than or equal to the value of parallelism selected in application.conf
192192
olp pipeline version create $PIPELINE_VERSION_NAME $PIPELINE_ID $PIPELINE_TEMPLATE_ID \
193193
"$PATH_TO_CONFIG_FOLDER/pipeline-config.conf" --scope $PROJECT_HRN

data-archive/java/avro-example/pom.xml

+11-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.here.platform.data.archive</groupId>
66
<artifactId>data-archive-avro-example</artifactId>
7-
<version>0.0.739</version>
7+
<version>0.0.746</version>
88
<packaging>jar</packaging>
99

1010
<!-- Meta information section start -->
@@ -23,15 +23,15 @@
2323
<connection>scm:git:https://github.com/heremaps/here-workspace-examples-java-scala.git</connection>
2424
<developerConnection>scm:git:[email protected]:heremaps/here-workspace-examples-java-scala.git</developerConnection>
2525
<url>https://github.com/heremaps/here-workspace-examples-java-scala</url>
26-
<tag>2.34.0</tag>
26+
<tag>2.35.0</tag>
2727
</scm>
2828

2929
<!-- Meta information section end -->
3030
<properties>
3131
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3232
<java.version>1.8</java.version>
3333

34-
<sdk-bom.version>2.34.5</sdk-bom.version>
34+
<sdk-bom.version>2.35.4</sdk-bom.version>
3535
<scala.compat.version>2.12</scala.compat.version>
3636

3737
<avro.version>1.10.0</avro.version>
@@ -72,6 +72,7 @@
7272
<dependency>
7373
<groupId>org.apache.avro</groupId>
7474
<artifactId>avro</artifactId>
75+
<version>${avro.version}</version>
7576
</dependency>
7677
<dependency>
7778
<groupId>com.google.protobuf</groupId>
@@ -193,7 +194,7 @@
193194
<groupId>com.here.platform.artifact</groupId>
194195
<artifactId>artifact-wagon</artifactId>
195196
<version>2.0.5</version>
196-
</extension>
197+
</extension>
197198
</extensions>
198199
</build>
199200

@@ -229,6 +230,11 @@
229230
<artifactId>flink-streaming-java_${scala.compat.version}</artifactId>
230231
<scope>compile</scope>
231232
</dependency>
233+
<dependency>
234+
<groupId>org.apache.flink</groupId>
235+
<artifactId>flink-clients_${scala.compat.version}</artifactId>
236+
<scope>compile</scope>
237+
</dependency>
232238
<!-- The following dependencies are added to this profile to address the following-->
233239
<!-- There is a known issue where data-archive pom's transitive dependencies are not resolved when running in an IDE-->
234240
<dependency>
@@ -249,6 +255,7 @@
249255
<dependency>
250256
<groupId>org.apache.avro</groupId>
251257
<artifactId>avro</artifactId>
258+
<version>${avro.version}</version>
252259
</dependency>
253260
<dependency>
254261
<groupId>com.here.platform.data.client</groupId>

data-archive/java/avro-example/src/main/java/com/here/platform/data/archive/example/AvroHelper.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2021 HERE Europe B.V.
2+
* Copyright (C) 2017-2022 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.

data-archive/java/avro-example/src/main/java/com/here/platform/data/archive/example/AvroMultiKeysExample.java

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
/*
2-
* Copyright (C) 2017-2021 HERE Europe B.V.
3-
*
2+
* Copyright (C) 2017-2022 HERE Europe B.V.
43
* Licensed under the Apache License, Version 2.0 (the "License");
54
* you may not use this file except in compliance with the License.
65
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
107
* Unless required by applicable law or agreed to in writing, software
118
* distributed under the License is distributed on an "AS IS" BASIS,
129
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1310
* See the License for the specific language governing permissions and
1411
* limitations under the License.
15-
*
1612
* SPDX-License-Identifier: Apache-2.0
1713
* License-Filename: LICENSE
1814
*/
@@ -128,14 +124,4 @@ public byte[] aggregate(Map<String, Object> keys, Iterator<byte[]> messages) {
128124
}
129125
return null;
130126
}
131-
132-
@Override
133-
public byte[] merge(Map<String, Object> keys, Iterator<byte[]> files) {
134-
try {
135-
return AvroHelper.mergeAvroFiles(files, SdiiMessage.Message.class);
136-
} catch (Exception e) {
137-
LOG.error("Merge errors....", e);
138-
}
139-
return null;
140-
}
141127
}

data-archive/java/avro-example/src/main/java/com/here/platform/data/archive/example/AvroSimpleKeyExample.java

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
/*
2-
* Copyright (C) 2017-2021 HERE Europe B.V.
3-
*
2+
* Copyright (C) 2017-2022 HERE Europe B.V.
43
* Licensed under the Apache License, Version 2.0 (the "License");
54
* you may not use this file except in compliance with the License.
65
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
107
* Unless required by applicable law or agreed to in writing, software
118
* distributed under the License is distributed on an "AS IS" BASIS,
129
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1310
* See the License for the specific language governing permissions and
1411
* limitations under the License.
15-
*
1612
* SPDX-License-Identifier: Apache-2.0
1713
* License-Filename: LICENSE
1814
*/
@@ -133,14 +129,4 @@ public byte[] aggregate(Map<String, Object> keys, Iterator<byte[]> messages) {
133129
}
134130
return null;
135131
}
136-
137-
@Override
138-
public byte[] merge(Map<String, Object> keys, Iterator<byte[]> files) {
139-
try {
140-
return AvroHelper.mergeAvroFiles(files, SdiiMessage.Message.class);
141-
} catch (Exception e) {
142-
LOG.error("Merge errors....", e);
143-
}
144-
return null;
145-
}
146132
}

data-archive/java/avro-example/src/main/resources/application.conf

-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ aggregation {
8787
# - A UDF implementation returns an unchecked/runtime exception
8888
# - A UDF implementation returns null
8989
# - An indexing attribute value does not pass the Data Archiving Library's validation rules.
90-
# The error handling strategy you choose does not apply to error scenarios in a User-Defined Function's `merge()` function.
91-
# This is because the `merge()` function is only used for the Data Archiving Library's internal optimization process of compaction. Any failures in this process will not fail your archiving pipeline.
9290
error {
9391
# You can choose one of the following error handling strategies:
9492
# - "fail" - The pipeline fails on any error from a User-Defined Function's implementation. The pipeline logs the action.

data-archive/java/avro-example/src/test/java/com/here/platform/data/archive/example/AvroExampleRunner.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2021 HERE Europe B.V.
2+
* Copyright (C) 2017-2022 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.

data-archive/java/avro-example/src/test/java/com/here/platform/data/archive/example/AvroSimpleKeyExampleTest.java

+2-34
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
/*
2-
* Copyright (C) 2017-2021 HERE Europe B.V.
3-
*
2+
* Copyright (C) 2017-2022 HERE Europe B.V.
43
* Licensed under the Apache License, Version 2.0 (the "License");
54
* you may not use this file except in compliance with the License.
65
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
107
* Unless required by applicable law or agreed to in writing, software
118
* distributed under the License is distributed on an "AS IS" BASIS,
129
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1310
* See the License for the specific language governing permissions and
1411
* limitations under the License.
15-
*
1612
* SPDX-License-Identifier: Apache-2.0
1713
* License-Filename: LICENSE
1814
*/
@@ -131,34 +127,6 @@ public void testAggregate() throws IOException {
131127
assertTrue(aggregateDuration.getCount() > 0);
132128
}
133129

134-
@Test
135-
public void testMerge() throws IOException {
136-
SdiiMessage.Message message1 = prepareSDIIMessage(System.currentTimeMillis(), true, 10d, 10d);
137-
SdiiMessage.Message message2 = prepareSDIIMessage(System.currentTimeMillis(), true, 10d, 10d);
138-
SdiiMessage.Message message3 = prepareSDIIMessage(System.currentTimeMillis(), true, 10d, 10d);
139-
SdiiMessage.Message message4 = prepareSDIIMessage(System.currentTimeMillis(), true, 10d, 10d);
140-
example.open(parameters, runtimeContext);
141-
byte[] archiveBytesMessage1 =
142-
example.aggregate(
143-
null, Arrays.asList(message1.toByteArray(), message2.toByteArray()).iterator());
144-
byte[] archiveBytesMessage2 =
145-
example.aggregate(
146-
null, Arrays.asList(message3.toByteArray(), message4.toByteArray()).iterator());
147-
File tmpFile = File.createTempFile("test", ".avro");
148-
tmpFile.deleteOnExit();
149-
150-
FileUtils.writeByteArrayToFile(
151-
tmpFile,
152-
example.merge(
153-
new HashMap<>(), Arrays.asList(archiveBytesMessage1, archiveBytesMessage2).iterator()));
154-
List<SdiiMessage.Message> list = AvroHelper.fromFile(tmpFile, SdiiMessage.Message.class);
155-
assertEquals(4, list.size());
156-
assertSDIIMessagesAreEqual(message1, list.get(0));
157-
assertSDIIMessagesAreEqual(message2, list.get(1));
158-
assertSDIIMessagesAreEqual(message3, list.get(2));
159-
assertSDIIMessagesAreEqual(message4, list.get(3));
160-
}
161-
162130
private SdiiMessage.Message prepareSDIIMessage(
163131
long receivedTime, boolean withPathEvent, double longitude, double latitude)
164132
throws IOException {

data-archive/java/parquet-example/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ You can use the OLP CLI to create pipeline components and activate the pipeline
186186

187187
```bash
188188
olp pipeline create $PIPELINE_NAME --scope $PROJECT_HRN
189-
olp pipeline template create $PIPELINE_TEMPLATE_NAME stream-4.0 $PATH_TO_JAR com.here.platform.dal.DALMain \
189+
olp pipeline template create $PIPELINE_TEMPLATE_NAME stream-5.0 $PATH_TO_JAR com.here.platform.dal.DALMain \
190190
--input-catalog-ids=source --workers=2 --scope $PROJECT_HRN # Note that the value of workers should be greater than or equal to the value of parallelism selected in application.conf
191191
olp pipeline version create $PIPELINE_VERSION_NAME $PIPELINE_ID $PIPELINE_TEMPLATE_ID \
192192
"$PATH_TO_CONFIG_FOLDER/pipeline-config.conf" --scope $PROJECT_HRN

data-archive/java/parquet-example/pom.xml

+19-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.here.platform.data.archive</groupId>
66
<artifactId>data-archive-parquet-example</artifactId>
7-
<version>0.0.739</version>
7+
<version>0.0.746</version>
88
<packaging>jar</packaging>
99

1010
<!-- Meta information section start -->
@@ -23,15 +23,15 @@
2323
<connection>scm:git:https://github.com/heremaps/here-workspace-examples-java-scala.git</connection>
2424
<developerConnection>scm:git:[email protected]:heremaps/here-workspace-examples-java-scala.git</developerConnection>
2525
<url>https://github.com/heremaps/here-workspace-examples-java-scala</url>
26-
<tag>2.34.0</tag>
26+
<tag>2.35.0</tag>
2727
</scm>
2828

2929
<!-- Meta information section end -->
3030
<properties>
3131
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3232
<java.version>1.8</java.version>
3333

34-
<sdk-bom.version>2.34.5</sdk-bom.version>
34+
<sdk-bom.version>2.35.4</sdk-bom.version>
3535
<scala.compat.version>2.12</scala.compat.version>
3636

3737
<hadoop-client.version>2.7.3</hadoop-client.version>
@@ -198,16 +198,31 @@
198198
</property>
199199
</activation>
200200
<dependencies>
201+
<dependency>
202+
<groupId>org.apache.flink</groupId>
203+
<artifactId>flink-core</artifactId>
204+
<scope>compile</scope>
205+
</dependency>
201206
<dependency>
202207
<groupId>org.apache.flink</groupId>
203208
<artifactId>flink-java</artifactId>
204209
<scope>compile</scope>
205210
</dependency>
211+
<dependency>
212+
<groupId>org.apache.flink</groupId>
213+
<artifactId>flink-metrics-core</artifactId>
214+
<scope>compile</scope>
215+
</dependency>
206216
<dependency>
207217
<groupId>org.apache.flink</groupId>
208218
<artifactId>flink-streaming-java_${scala.compat.version}</artifactId>
209219
<scope>compile</scope>
210220
</dependency>
221+
<dependency>
222+
<groupId>org.apache.flink</groupId>
223+
<artifactId>flink-clients_${scala.compat.version}</artifactId>
224+
<scope>compile</scope>
225+
</dependency>
211226
<!-- The following dependencies are added to this profile to address the following-->
212227
<!-- There is a known issue where data-archive pom's transitive dependencies are not resolved when running in an IDE-->
213228
<dependency>
@@ -228,6 +243,7 @@
228243
<dependency>
229244
<groupId>org.apache.avro</groupId>
230245
<artifactId>avro</artifactId>
246+
<version>1.10.0</version>
231247
</dependency>
232248
<dependency>
233249
<groupId>com.here.platform.data.client</groupId>

data-archive/java/parquet-example/src/main/java/com/here/platform/data/archive/example/CustomProtoSchemaConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/*
21-
* Copyright (C) 2019-2021 HERE Europe B.V.
21+
* Copyright (C) 2019-2022 HERE Europe B.V.
2222
* SPDX-License-Identifier: Apache-2.0
2323
*
2424
* This file is based on commit f84938441be49c665595c936ac631c3e5f171bf9

data-archive/java/parquet-example/src/main/java/com/here/platform/data/archive/example/CustomProtoWriteSupport.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/*
21-
* Copyright (C) 2019-2021 HERE Europe B.V.
21+
* Copyright (C) 2019-2022 HERE Europe B.V.
2222
* SPDX-License-Identifier: Apache-2.0
2323
*
2424
* This file is based on commit f84938441be49c665595c936ac631c3e5f171bf9

0 commit comments

Comments
 (0)