From dbd1e64cb7d958b9504f298692bf7bc52a82f2c1 Mon Sep 17 00:00:00 2001 From: burdziak Date: Tue, 30 Jan 2018 15:20:34 +0100 Subject: Fixes in ManageTitanSchema Change-Id: I4bf936db39c3ce134f53fd5a885f590d82c108aa Issue-ID: AAI-708 Signed-off-by: burdziak --- .../main/java/org/onap/aai/db/schema/ManageTitanSchema.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'aai-core') diff --git a/aai-core/src/main/java/org/onap/aai/db/schema/ManageTitanSchema.java b/aai-core/src/main/java/org/onap/aai/db/schema/ManageTitanSchema.java index 0260543f..9af65c70 100644 --- a/aai-core/src/main/java/org/onap/aai/db/schema/ManageTitanSchema.java +++ b/aai-core/src/main/java/org/onap/aai/db/schema/ManageTitanSchema.java @@ -25,6 +25,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.onap.aai.introspection.Version; @@ -37,7 +39,8 @@ import com.thinkaurelius.titan.core.schema.TitanManagement.IndexBuilder; public class ManageTitanSchema { - + private static final EELFLogger logger = EELFManager.getInstance().getLogger(AuditOXM.class); + private TitanManagement graphMgmt; private TitanGraph graph; private List aaiProperties; @@ -75,7 +78,7 @@ public class ManageTitanSchema { createIndexes(); createEdgeLabels(); } catch (Exception e) { - e.printStackTrace(); + logger.error(e.getMessage(),e); graphMgmt.rollback(); } graphMgmt.commit(); @@ -242,10 +245,9 @@ public class ManageTitanSchema { //waitForCompletion(indexName); //TitanIndexRepair.hbaseRepair(AAIConstants.AAI_CONFIG_FILENAME, indexName, ""); } catch (Exception e) { - // TODO Auto-generated catch block graph.tx().rollback(); graph.close(); - e.printStackTrace(); + logger.error(e.getMessage(),e); } //mgmt = graph.asAdmin().getManagementSystem(); -- cgit 1.2.3-korg