remove extra slash needed for index creation 11/62411/1
authorrenealr <reneal.rogers@amdocs.com>
Fri, 24 Aug 2018 19:33:08 +0000 (15:33 -0400)
committerrenealr <reneal.rogers@amdocs.com>
Fri, 24 Aug 2018 19:34:29 +0000 (15:34 -0400)
Issue-ID: AAI-1543
Change-Id: I8c8ec703c6bdc7654dc02e929a727c5b4d0f0179
Signed-off-by: renealr <reneal.rogers@amdocs.com>
sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/IndexIntegrityValidator.java
sparkybe-onap-service/src/main/java/org/onap/aai/sparky/sync/SyncControllerImpl.java

index c9d8272..ee5d6fb 100644 (file)
@@ -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");
 
index 7c81074..c385ce0 100644 (file)
@@ -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);