diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-01-04 14:50:33 +0100 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-01-04 14:58:12 +0100 |
commit | 7f07b3af2eecb5c4e1d61c658e6855d93ea1e43c (patch) | |
tree | 1fac6a3775515cfccf12d90e755e4e8e81e71a59 /aai-traversal | |
parent | c97bfeca3abd74392b89eae252759d3c4d82baf9 (diff) |
Reduce traversal log noise
- remove debug statements for the happy path in the EchoResponse resource [1]
[1] they account for the vast majority of log lines since they
are invoked as part of the k8s liveness probe every two seconds
Issue-ID: AAI-3716
Change-Id: I41e340cdb0bbeb64d849514e7460caa5b6fcc357
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-traversal')
-rw-r--r-- | aai-traversal/src/main/java/org/onap/aai/rest/util/AaiGraphChecker.java | 7 | ||||
-rw-r--r-- | aai-traversal/src/main/java/org/onap/aai/rest/util/EchoResponse.java | 6 |
2 files changed, 2 insertions, 11 deletions
diff --git a/aai-traversal/src/main/java/org/onap/aai/rest/util/AaiGraphChecker.java b/aai-traversal/src/main/java/org/onap/aai/rest/util/AaiGraphChecker.java index 11b412d..bf8066b 100644 --- a/aai-traversal/src/main/java/org/onap/aai/rest/util/AaiGraphChecker.java +++ b/aai-traversal/src/main/java/org/onap/aai/rest/util/AaiGraphChecker.java @@ -30,8 +30,6 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; -import com.google.common.collect.Iterators; - /** * Singleton class responsible to check that AAI service is able to connect to its back-end * database. @@ -57,12 +55,7 @@ public class AaiGraphChecker { try { transaction = AAIGraph.getInstance().getGraph().newTransaction(); final Iterator<?> vertexIterator = transaction.query().limit(1).vertices().iterator(); - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("Number of vertices retrieved while checking db: {}", - Iterators.size(vertexIterator)); - } vertexIterator.hasNext(); - LOGGER.debug("Database is available"); dbAvailable = Boolean.TRUE; } catch (JanusGraphException e) { String message = "Database is not available (after JanusGraph exception)"; diff --git a/aai-traversal/src/main/java/org/onap/aai/rest/util/EchoResponse.java b/aai-traversal/src/main/java/org/onap/aai/rest/util/EchoResponse.java index c3409f8..5665b86 100644 --- a/aai-traversal/src/main/java/org/onap/aai/rest/util/EchoResponse.java +++ b/aai-traversal/src/main/java/org/onap/aai/rest/util/EchoResponse.java @@ -48,9 +48,7 @@ public class EchoResponse extends RESTAPI { protected static String authPolicyFunctionName = "util"; - public static final String ECHO_PATH = "/echo"; - - private AaiGraphChecker aaiGraphChecker; + private final AaiGraphChecker aaiGraphChecker; @Autowired public EchoResponse(AaiGraphChecker aaiGraphChecker) { @@ -69,7 +67,7 @@ public class EchoResponse extends RESTAPI { */ @GET @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - @Path(ECHO_PATH) + @Path("/echo") public Response echoResult(@Context HttpHeaders headers, @Context HttpServletRequest req, @QueryParam("action") String myAction) { |