summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service/src
diff options
context:
space:
mode:
Diffstat (limited to 'sparkybe-onap-service/src')
-rw-r--r--sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/IndexIntegrityValidator.java6
-rw-r--r--sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/SyncControllerImpl.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/IndexIntegrityValidator.java b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/IndexIntegrityValidator.java
index c9d8272..ee5d6fb 100644
--- a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/IndexIntegrityValidator.java
+++ b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/IndexIntegrityValidator.java
@@ -55,12 +55,12 @@ public class IndexIntegrityValidator implements IndexValidator {
* @param tableConfigJson the table config json
*/
public IndexIntegrityValidator(SearchServiceAdapter searchServiceAdapter,
- ElasticSearchSchemaConfig esSchemaConfig, RestEndpointConfig esEndpointConfig,
+ ElasticSearchSchemaConfig esSchemaConfig, RestEndpointConfig endpointConfig,
String tableConfigJson) {
this.searchServiceAdapter = searchServiceAdapter;
this.schemaConfig = esSchemaConfig;
- this.endpointConfig = esEndpointConfig;
+ this.endpointConfig = endpointConfig;
this.tableConfigJson = tableConfigJson;
}
@@ -137,7 +137,7 @@ public class IndexIntegrityValidator implements IndexValidator {
"IndexIntegrityValidator.createOrRepair() for indexName = " + schemaConfig.getIndexName();
LOG.info(AaiUiMsgs.INFO_GENERIC, message);
- final String fullUrlStr = getFullUrl("/" + schemaConfig.getIndexName() + "/");
+ final String fullUrlStr = getFullUrl(schemaConfig.getIndexName() + "/");
OperationResult createResult =
searchServiceAdapter.doPut(fullUrlStr, tableConfigJson,"application/json");
diff --git a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/SyncControllerImpl.java b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/SyncControllerImpl.java
index 7c81074..c385ce0 100644
--- a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/SyncControllerImpl.java
+++ b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/SyncControllerImpl.java
@@ -517,9 +517,9 @@ public class SyncControllerImpl implements SyncController {
for (IndexValidator validator : registeredIndexValidators) {
try {
- if (!validator.exists()) {
+
validator.createOrRepair();
- }
+
} catch (Exception exc) {
String message = "Index validator caused an error = " + exc.getMessage();
LOG.error(AaiUiMsgs.ERROR_GENERIC, message);