- 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>
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
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.
/**
* Singleton class responsible to check that AAI service is able to connect to its back-end
* database.
try {
transaction = AAIGraph.getInstance().getGraph().newTransaction();
final Iterator<?> vertexIterator = transaction.query().limit(1).vertices().iterator();
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();
vertexIterator.hasNext();
- LOGGER.debug("Database is available");
dbAvailable = Boolean.TRUE;
} catch (JanusGraphException e) {
String message = "Database is not available (after JanusGraph exception)";
dbAvailable = Boolean.TRUE;
} catch (JanusGraphException e) {
String message = "Database is not available (after JanusGraph exception)";
protected static String authPolicyFunctionName = "util";
protected static String authPolicyFunctionName = "util";
- public static final String ECHO_PATH = "/echo";
-
- private AaiGraphChecker aaiGraphChecker;
+ private final AaiGraphChecker aaiGraphChecker;
@Autowired
public EchoResponse(AaiGraphChecker aaiGraphChecker) {
@Autowired
public EchoResponse(AaiGraphChecker aaiGraphChecker) {
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response echoResult(@Context HttpHeaders headers, @Context HttpServletRequest req,
@QueryParam("action") String myAction) {
public Response echoResult(@Context HttpHeaders headers, @Context HttpServletRequest req,
@QueryParam("action") String myAction) {