forked from lsmyrnaios/UrlsController
- Increase the "read-timeout" when searching for the host's machine public-IP.
- Update dependencies. - Code polishing.
This commit is contained in:
parent
0ab6bae93a
commit
5f75b48e95
10
build.gradle
10
build.gradle
|
@ -1,5 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.springframework.boot' version '2.7.11'
|
id 'org.springframework.boot' version '2.7.12'
|
||||||
id 'io.spring.dependency-management' version '1.1.0'
|
id 'io.spring.dependency-management' version '1.1.0'
|
||||||
id 'java'
|
id 'java'
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ dependencies {
|
||||||
// https://mvnrepository.com/artifact/org.apache.commons/commons-compress
|
// https://mvnrepository.com/artifact/org.apache.commons/commons-compress
|
||||||
implementation 'org.apache.commons:commons-compress:1.23.0'
|
implementation 'org.apache.commons:commons-compress:1.23.0'
|
||||||
|
|
||||||
implementation 'io.minio:minio:8.5.2'
|
implementation 'io.minio:minio:8.5.3'
|
||||||
|
|
||||||
// https://mvnrepository.com/artifact/com.cloudera.impala/jdbc
|
// https://mvnrepository.com/artifact/com.cloudera.impala/jdbc
|
||||||
implementation("com.cloudera.impala:jdbc:2.5.31") {
|
implementation("com.cloudera.impala:jdbc:2.5.31") {
|
||||||
|
@ -74,7 +74,7 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://mvnrepository.com/artifact/org.apache.parquet/parquet-avro
|
// https://mvnrepository.com/artifact/org.apache.parquet/parquet-avro
|
||||||
implementation('org.apache.parquet:parquet-avro:1.13.0')
|
implementation('org.apache.parquet:parquet-avro:1.13.1')
|
||||||
|
|
||||||
// https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common
|
// https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common
|
||||||
implementation('org.apache.hadoop:hadoop-common:3.3.5') {
|
implementation('org.apache.hadoop:hadoop-common:3.3.5') {
|
||||||
|
@ -107,7 +107,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.0'
|
implementation 'com.fasterxml.woodstox:woodstox-core:6.5.1'
|
||||||
|
|
||||||
// https://mvnrepository.com/artifact/org.json/json
|
// https://mvnrepository.com/artifact/org.json/json
|
||||||
implementation 'org.json:json:20230227'
|
implementation 'org.json:json:20230227'
|
||||||
|
@ -117,7 +117,7 @@ dependencies {
|
||||||
|
|
||||||
|
|
||||||
// https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus
|
// https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus
|
||||||
runtimeOnly 'io.micrometer:micrometer-registry-prometheus:1.10.6'
|
runtimeOnly 'io.micrometer:micrometer-registry-prometheus:1.11.0'
|
||||||
|
|
||||||
testImplementation 'org.springframework.security:spring-security-test'
|
testImplementation 'org.springframework.security:spring-security-test'
|
||||||
testImplementation "org.springframework.boot:spring-boot-starter-test"
|
testImplementation "org.springframework.boot:spring-boot-starter-test"
|
||||||
|
|
|
@ -16,9 +16,7 @@ public class GeneralController {
|
||||||
|
|
||||||
@GetMapping("isAlive")
|
@GetMapping("isAlive")
|
||||||
public ResponseEntity<?> isControllerAlive() {
|
public ResponseEntity<?> isControllerAlive() {
|
||||||
|
|
||||||
logger.info("Received an \"isAlive\" request.");
|
logger.info("Received an \"isAlive\" request.");
|
||||||
|
|
||||||
return ResponseEntity.ok().build();
|
return ResponseEntity.ok().build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -306,9 +306,8 @@ public class UrlsServiceImpl implements UrlsService {
|
||||||
ImpalaConnector.databaseLock.lock();
|
ImpalaConnector.databaseLock.lock();
|
||||||
String assignmentErrorMsg = deleteWorkerAssignments(curWorkerId);
|
String assignmentErrorMsg = deleteWorkerAssignments(curWorkerId);
|
||||||
ImpalaConnector.databaseLock.unlock();
|
ImpalaConnector.databaseLock.unlock();
|
||||||
if ( assignmentErrorMsg != null ) {
|
if ( assignmentErrorMsg != null )
|
||||||
errorMsg += "\n" + assignmentErrorMsg;
|
errorMsg += "\n" + assignmentErrorMsg;
|
||||||
}
|
|
||||||
logger.error(errorMsg);
|
logger.error(errorMsg);
|
||||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(errorMsg);
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(errorMsg);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -58,8 +58,8 @@ public class UriBuilder {
|
||||||
String urlString = "https://api.ipify.org/";
|
String urlString = "https://api.ipify.org/";
|
||||||
try {
|
try {
|
||||||
conn = (HttpURLConnection) new URL(urlString).openConnection();
|
conn = (HttpURLConnection) new URL(urlString).openConnection();
|
||||||
conn.setConnectTimeout(60_000);
|
conn.setConnectTimeout(60_000); // 1 minute
|
||||||
conn.setReadTimeout(60_000);
|
conn.setReadTimeout(120_000); // 2 minutes
|
||||||
conn.setRequestMethod("GET");
|
conn.setRequestMethod("GET");
|
||||||
conn.connect();
|
conn.connect();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue