summaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-request-handler/appc-request-handler-core/src
diff options
context:
space:
mode:
authorBalaji, Ramya (rb111y) <rb111y@att.com>2018-11-07 10:05:28 -0500
committerBalaji, Ramya (rb111y) <rb111y@att.com>2018-11-07 10:07:47 -0500
commitaf2fcc24fc53bf8bde0e38f2276d702d923c4b80 (patch)
tree5244b17860de3d86f0627eae8a0e79a82b389191 /appc-dispatcher/appc-request-handler/appc-request-handler-core/src
parent95bc75984f832276bc72c0e4759de8ab220ea110 (diff)
Added more logging to narrrow down issue
Issue-ID: APPC-1231 Change-Id: I145c1309cb80b46477eca665ace5ce2358fac819 Signed-off-by: Balaji, Ramya (rb111y) <rb111y@att.com>
Diffstat (limited to 'appc-dispatcher/appc-request-handler/appc-request-handler-core/src')
-rw-r--r--appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/messageadapter/impl/MessageAdapterImpl.java6
-rw-r--r--appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/conv/Converter.java13
-rw-r--r--appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java2
3 files changed, 18 insertions, 3 deletions
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/messageadapter/impl/MessageAdapterImpl.java b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/messageadapter/impl/MessageAdapterImpl.java
index f60bb5bc9..d7422415e 100644
--- a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/messageadapter/impl/MessageAdapterImpl.java
+++ b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/messageadapter/impl/MessageAdapterImpl.java
@@ -114,14 +114,17 @@ public class MessageAdapterImpl implements MessageAdapter{
if (logger.isTraceEnabled()) {
logger.trace("Entering to post with AsyncResponse = " + ObjectUtils.toString(asyncResponse));
}
-
+ logger.debug("Entered MessageAdapterImpl.post()");
String jsonMessage;
try {
+ logger.debug("Before converting Async Response");
jsonMessage = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(operation, rpcName, asyncResponse);
if (logger.isDebugEnabled()) {
logger.debug("DMaaP Response = " + jsonMessage);
}
+ logger.debug("Before Invoking producer.post(): jsonMessage is::" + jsonMessage);
success = producer.post(this.partition, jsonMessage);
+ logger.debug("After Invoking producer.post()");
} catch (JsonProcessingException e1) {
logger.error("Error generating Json from DMaaP message "+ e1.getMessage());
success= false;
@@ -129,6 +132,7 @@ public class MessageAdapterImpl implements MessageAdapter{
logger.error("Error sending message to DMaaP "+e.getMessage());
success= false;
}
+ logger.debug("Exiting MesageAdapterImpl.post()");
if (logger.isTraceEnabled()) {
logger.trace("Exiting from post with (success = "+ ObjectUtils.toString(success)+")");
}
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/conv/Converter.java b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/conv/Converter.java
index 1071b7605..b01d36bc4 100644
--- a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/conv/Converter.java
+++ b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/conv/Converter.java
@@ -48,6 +48,7 @@ import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.binding.DataContainer;
import org.onap.appc.domainmodel.lcm.ResponseContext;
import org.onap.appc.domainmodel.lcm.VNFOperation;
+import org.onap.appc.requesthandler.impl.AbstractRequestHandlerImpl;
import org.onap.appc.requesthandler.impl.DmaapOutgoingMessage;
import java.text.ParseException;
@@ -60,6 +61,7 @@ public class Converter {
private static final String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
private final static String DMaaP_ROOT_VALUE = "output";
private static final SimpleDateFormat isoFormatter = new SimpleDateFormat(ISO_FORMAT);
+ private final static EELFLogger logger = EELFManager.getInstance().getLogger(Converter.class);
static {
isoFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
}
@@ -72,10 +74,12 @@ public class Converter {
if(vnfOperation == null){
throw new IllegalArgumentException("empty asyncResponse.action");
}
+ logger.debug("Entered Converter.convAsyncResponseToBuilder()");
Action action = Action.valueOf(vnfOperation.name());
CommonHeader commonHeader = convAsyncResponseTorev160108CommonHeader(response);
Status status = convAsyncResponseTorev160108Status(response);
Payload payload = convAsyncResponseTorev160108Payload(response);
+ logger.debug("Extracted action, status, payload ");
switch (action){
case Rollback:
outObj = new RollbackOutputBuilder();
@@ -103,6 +107,7 @@ public class Converter {
((HealthCheckOutputBuilder)outObj).setCommonHeader(commonHeader);
((HealthCheckOutputBuilder)outObj).setStatus(status);
((HealthCheckOutputBuilder)outObj).setPayload(payload);
+ logger.debug("In HealthCheck case- created outObj, returning");
return outObj;
case LiveUpgrade:
outObj = new LiveUpgradeOutputBuilder();
@@ -407,7 +412,8 @@ public class Converter {
}
public static String convAsyncResponseToDmaapOutgoingMessageJsonString(VNFOperation vnfOperation, String rpcName, ResponseContext asyncResponse) throws JsonProcessingException {
- DmaapOutgoingMessage dmaapOutgoingMessage = convAsyncResponseToDmaapOutgoingMessage(vnfOperation, rpcName, asyncResponse);
+ logger.debug("Entered Converter.convAsyncResponseToDmaapOutgoingMessageJsonString()");
+ DmaapOutgoingMessage dmaapOutgoingMessage = convAsyncResponseToDmaapOutgoingMessage(vnfOperation, rpcName, asyncResponse);
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.addMixInAnnotations(dmaapOutgoingMessage.getBody().getOutput().getClass(), MixInFlagsMessage.class);
objectMapper.addMixInAnnotations(CommonHeader.class, MixInCommonHeader.class);
@@ -418,11 +424,13 @@ public class Converter {
// .configure(SerializationConfig.Feature.SORT_PROPERTIES_ALPHABETICALLY,true)
ObjectWriter writer = objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL).configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY,true).writer();
+ logger.debug("Exiting Converter.convAsyncResponseToDmaapOutgoingMessageJsonString()");
return writer.writeValueAsString(dmaapOutgoingMessage);
}
public static DmaapOutgoingMessage convAsyncResponseToDmaapOutgoingMessage(VNFOperation vnfOperation, String rpcName, ResponseContext asyncResponse) throws JsonProcessingException {
- DmaapOutgoingMessage outObj = new DmaapOutgoingMessage();
+ logger.debug("Entered Converter.convAsyncResponseToDmaapOutgoingMessage()");
+ DmaapOutgoingMessage outObj = new DmaapOutgoingMessage();
String correlationID = getCorrelationID(asyncResponse);
outObj.setCorrelationID(correlationID);
outObj.setType("response");
@@ -431,6 +439,7 @@ public class Converter {
Object messageBody = builder.build();
DmaapOutgoingMessage.Body body = new DmaapOutgoingMessage.Body(messageBody);
outObj.setBody(body);
+ logger.debug("Exiting Converter.convAsyncResponseToDmaapOutgoingMessage():messageBody is :::"+body.toString());
return outObj;
}
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java
index cd9011f4b..73c98e939 100644
--- a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java
+++ b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java
@@ -395,7 +395,9 @@ public abstract class AbstractRequestHandlerImpl implements RequestHandler {
logger.trace("Entering to postMessageToDMaaP with AsyncResponse = " +
ObjectUtils.toString(responseContext));
}
+ logger.debug("In postMessageToDMaap before invoking post()");
boolean callbackResponse = messageAdapter.post(operation, rpcName, responseContext);
+ logger.debug("In postMessageToDMaap after invoking post()");
if (!callbackResponse) {
logger.error("DMaaP posting status: false", "dmaapMessage: " + responseContext);
}