summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service/src/main
diff options
context:
space:
mode:
authorrenealr <reneal.rogers@amdocs.com>2018-08-24 15:33:08 -0400
committerrenealr <reneal.rogers@amdocs.com>2018-08-24 15:34:29 -0400
commitbd9c90e162cf30b5d7e240f20a29bb3fc3092a7e (patch)
tree3174be7dd442afb936ba321d2271da952a62525f /sparkybe-onap-service/src/main
parent11b1339ca114835bf60356b4061f1ff3f3fd3e8b (diff)
remove extra slash needed for index creation
Issue-ID: AAI-1543 Change-Id: I8c8ec703c6bdc7654dc02e929a727c5b4d0f0179 Signed-off-by: renealr <reneal.rogers@amdocs.com>
Diffstat (limited to 'sparkybe-onap-service/src/main')
-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);