summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service/src/main/java/org
diff options
context:
space:
mode:
authorSteven Blimkie <Steven.Blimkie@amdocs.com>2018-08-24 19:48:45 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-24 19:48:45 +0000
commit738edd9ea941b3762dcaaf8e73d08ccf4d4b35d6 (patch)
treedd02b6ca49909cd4adf319a736bd287eb5ee8b21 /sparkybe-onap-service/src/main/java/org
parent31b6fc47e12dd137d3a691b20ed4a34df41ac8a4 (diff)
parentbd9c90e162cf30b5d7e240f20a29bb3fc3092a7e (diff)
Merge "remove extra slash needed for index creation"
Diffstat (limited to 'sparkybe-onap-service/src/main/java/org')
-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);