- Try to get the cause of the exception of the callable-tasks which handle parquet-files.
- Update License. - Update dependencies.
This commit is contained in:
parent
34d7a143e7
commit
3563fd6e2a
2
LICENSE
2
LICENSE
|
@ -186,7 +186,7 @@
|
||||||
same "printed page" as the copyright notice for easier
|
same "printed page" as the copyright notice for easier
|
||||||
identification within third-party archives.
|
identification within third-party archives.
|
||||||
|
|
||||||
Copyright 2021-2023 Athena Research and Innovation Center (ARC)
|
Copyright 2021-2024 OpenAIRE AMKE
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -110,7 +110,7 @@ dependencies {
|
||||||
|
|
||||||
// Add back some updated version of the needed dependencies.
|
// Add back some updated version of the needed dependencies.
|
||||||
implementation 'org.apache.thrift:libthrift:0.17.0' // Newer versions (>=0.18.X) are not compatible with JAVA 8.
|
implementation 'org.apache.thrift:libthrift:0.17.0' // Newer versions (>=0.18.X) are not compatible with JAVA 8.
|
||||||
implementation 'com.fasterxml.woodstox:woodstox-core:6.5.1'
|
implementation 'com.fasterxml.woodstox:woodstox-core:6.6.0'
|
||||||
|
|
||||||
// https://mvnrepository.com/artifact/org.json/json
|
// https://mvnrepository.com/artifact/org.json/json
|
||||||
implementation 'org.json:json:20231013'
|
implementation 'org.json:json:20231013'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
|
@ -26,7 +26,7 @@ if [[ justRun -eq 1 && shouldRunInDocker -eq 1 ]]; then
|
||||||
justRun=0
|
justRun=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gradleVersion="8.5"
|
gradleVersion="8.6"
|
||||||
|
|
||||||
if [[ justRun -eq 0 ]]; then
|
if [[ justRun -eq 0 ]]; then
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class ScheduledTasks {
|
||||||
if ( ! future.get() ) // Get and see if an exception is thrown. This blocks the current thread, until the task of the future has finished.
|
if ( ! future.get() ) // Get and see if an exception is thrown. This blocks the current thread, until the task of the future has finished.
|
||||||
numFailedTasks ++;
|
numFailedTasks ++;
|
||||||
} catch (ExecutionException ee) { // These can be serious errors like an "out of memory exception" (Java HEAP).
|
} catch (ExecutionException ee) { // These can be serious errors like an "out of memory exception" (Java HEAP).
|
||||||
// The stacktrace of the "ExecutionException" is the one of thi code and not the code which ran inside the background-task. Try to get the cause.
|
// The stacktrace of the "ExecutionException" is the one of the current code and not the code which ran inside the background-task. Try to get the cause.
|
||||||
Throwable throwable = ee.getCause();
|
Throwable throwable = ee.getCause();
|
||||||
if ( throwable == null ) {
|
if ( throwable == null ) {
|
||||||
logger.warn("No cause was retrieved for the \"ExecutionException\"!");
|
logger.warn("No cause was retrieved for the \"ExecutionException\"!");
|
||||||
|
@ -308,7 +308,7 @@ public class ScheduledTasks {
|
||||||
} // Any error is already logged.
|
} // Any error is already logged.
|
||||||
|
|
||||||
|
|
||||||
// TODO - Export more complex data; <numOfAllPayloadsPerDatasource>, <numOfAllPayloadsPerYear>,
|
// TODO - Export more complex data; <numOfAllPayloadsPerDatasource>, <numOfAllPayloadsPerPublicationYear>,
|
||||||
// <numOfAggregatedPayloadsPerDatasource>, ..., <numOfBulkImportedPayloadsPerDatasource>, ...
|
// <numOfAggregatedPayloadsPerDatasource>, ..., <numOfBulkImportedPayloadsPerDatasource>, ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@ -700,7 +701,16 @@ public class ParquetFileUtils {
|
||||||
return new SumParquetSuccess(false, false, ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(errMsg));
|
return new SumParquetSuccess(false, false, ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(errMsg));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("", e);
|
Throwable throwable = e;
|
||||||
|
if ( e instanceof ExecutionException ) {
|
||||||
|
// The stacktrace of the "ExecutionException" is the one of the current code and not the code which ran inside the background-task. Try to get the cause.
|
||||||
|
throwable = e.getCause();
|
||||||
|
if ( throwable == null ) {
|
||||||
|
logger.warn("No cause was retrieved for the \"ExecutionException\"!");
|
||||||
|
throwable = e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logger.error("", throwable);
|
||||||
// We do not know if the failed "future" refers to a "payload" or to a "attempt".
|
// We do not know if the failed "future" refers to a "payload" or to a "attempt".
|
||||||
// So we cannot increase a specific counter. That's ok, the only drawback if that we may try to "load" the non-existent data and get an exception.
|
// So we cannot increase a specific counter. That's ok, the only drawback if that we may try to "load" the non-existent data and get an exception.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue