Browse Source

- Change the repository for the Impala JDBC Driver, as the previous one had networking issues.

- Optimize the "findAssignmentsQuery".
springify_project
Lampros Smyrnaios 4 months ago
parent
commit
3c9f8870d1
  1. 2
      build.gradle
  2. 2
      src/main/java/eu/openaire/urls_controller/controllers/UrlController.java

2
build.gradle

@ -12,7 +12,7 @@ repositories {
mavenCentral()
maven {
name "icm"
url "http://maven.icm.edu.pl/artifactory/repo/"
url "http://esperos.di.uoa.gr/repo"
allowInsecureProtocol = true
}
maven {

2
src/main/java/eu/openaire/urls_controller/controllers/UrlController.java

@ -68,7 +68,7 @@ public class UrlController {
" select a.id, a.original_url from " + ImpalaConnector.databaseName + ".assignment a\n" +
" union all\n" +
" select pl.id, pl.original_url from " + ImpalaConnector.databaseName + ".payload pl) as existing on existing.id=p.id and existing.original_url=pu.url\n" +
"where d.allow_harvest=true and existing.id is null and coalesce(attempts.counts, 0) <= " + ControllerConstants.MAX_ATTEMPTS_PER_RECORD + " and not exists (select 1 from " + ImpalaConnector.databaseName + ".attempt a where a.id=p.id and a.error_class = 'noRetry')\n" +
"where d.allow_harvest=true and existing.id is null and coalesce(attempts.counts, 0) <= " + ControllerConstants.MAX_ATTEMPTS_PER_RECORD + " and not exists (select 1 from " + ImpalaConnector.databaseName + ".attempt a where a.id=p.id and a.error_class = 'noRetry' limit 1)\n" +
"limit " + (assignmentsLimit * 10) + ") as non_distinct_results\n" +
"order by coalesce(attempt_count, 0), reverse(pubid), url\n" +
"limit " + assignmentsLimit + ") as findAssignmentsQuery";

Loading…
Cancel
Save