diff options
4 files changed, 55 insertions, 15 deletions
@@ -1,18 +1,24 @@ --- project: 'aai-spike' project_creation_date: '2018-01-25' +project_category: '' lifecycle_state: 'Incubation' -project_lead: &onap_releng_ptl +project_lead: &onap_aai_ptl name: 'James Forsyth' email: 'jf2512@att.com' id: 'jimmydot' company: 'ATT' timezone: 'America/Detroit' -primary_contact: *onap_releng_ptl +primary_contact: *onap_aai_ptl issue_tracking: type: 'jira' url: 'https://jira.onap.org/projects/AAI' key: 'AAI' +mailing_list: + type: 'groups.io' + url: 'lists.onap.org' + tag: '<[sub-project_name]>' +realtime_discussion: '' meetings: - type: 'zoom' agenda: 'https://wiki.onap.org/display/DW/AAI+Meeting+Notes' @@ -21,13 +27,46 @@ meetings: channel: 'n/a' repeats: 'weekly' time: '14:00 UTC' +repositories: + - 'aai-aai-common' + - 'aai-aai-config' + - 'aai-aai-data' + - 'aai-aai-service' + - 'aai-babel' + - 'aai-cacher' + - 'aai-chameleon' + - 'aai-champ' + - 'aai-data-router' + - 'aai-eis' + - 'aai-enricher' + - 'aai-event-client' + - 'aai-gallifrey' + - 'aai-gap' + - 'aai-gizmo' + - 'aai-graphadmin' + - 'aai-graphgraph' + - 'aai-logging-service' + - 'aai-model-loader' + - 'aai-oom' + - 'aai-resources' + - 'aai-rest-client' + - 'aai-router-core' + - 'aai-schema-service' + - 'aai-search-data-service' + - 'aai-sparky-be' + - 'aai-sparky-fe' + - 'aai-spike' + - 'aai-tabular-data-service' + - 'aai-test-config' + - 'aai-traversal' + - 'aai-validation' committers: - - <<: *onap_releng_ptl + - <<: *onap_aai_ptl - name: 'Manisha Aggarwal' email: 'ma9181@att.com' company: 'ATT' id: 'ma9181' - timezone: 'America/New York' + timezone: 'America/New_York' - name: 'Steven Blimkie' email: 'Steven.Blimkie@amdocs.com' company: 'Amdocs' @@ -42,7 +81,7 @@ committers: email: 'vk250x@att.com' company: 'ATT' id: 'vk250x' - timezone: 'America/New York' + timezone: 'America/New_York' tsc: approval: 'https://lists.onap.org/pipermail/onap-tsc' changes: diff --git a/src/main/java/org/onap/aai/spike/event/incoming/OffsetManager.java b/src/main/java/org/onap/aai/spike/event/incoming/OffsetManager.java index 58795b3..be713ff 100644 --- a/src/main/java/org/onap/aai/spike/event/incoming/OffsetManager.java +++ b/src/main/java/org/onap/aai/spike/event/incoming/OffsetManager.java @@ -189,7 +189,7 @@ public class OffsetManager { * * @return - The next 'safe' offset. */ - public long getNextOffsetToCommit() { + public Long getNextOffsetToCommit() { return nextOffsetToCommit; } diff --git a/src/main/java/org/onap/aai/spike/service/EchoService.java b/src/main/java/org/onap/aai/spike/service/EchoService.java index 6c5b5ee..cf3d1b7 100644 --- a/src/main/java/org/onap/aai/spike/service/EchoService.java +++ b/src/main/java/org/onap/aai/spike/service/EchoService.java @@ -76,8 +76,7 @@ public class EchoService { auditLogger.info(SpikeMsgs.PROCESS_REST_REQUEST, new LogFields().setField(LogLine.DefinedFields.RESPONSE_CODE, Status.OK.toString()) .setField(LogLine.DefinedFields.RESPONSE_DESCRIPTION, Status.OK.toString()), - (req != null) ? req.getMethod() : "Unknown", (req != null) ? req.getRequestURL().toString() : "Unknown", - (req != null) ? req.getRemoteHost() : "Unknown", Status.OK.toString()); + req.getMethod(), req.getRequestURL().toString(), req.getRemoteHost(), Status.OK.toString()); MDC.clear(); return new ResponseEntity<>("Alive", HttpStatus.OK); diff --git a/src/main/java/org/onap/aai/spike/service/SpikeEventProcessor.java b/src/main/java/org/onap/aai/spike/service/SpikeEventProcessor.java index cd404b0..a18590a 100644 --- a/src/main/java/org/onap/aai/spike/service/SpikeEventProcessor.java +++ b/src/main/java/org/onap/aai/spike/service/SpikeEventProcessor.java @@ -20,14 +20,14 @@ */ package org.onap.aai.spike.service; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import java.util.ArrayList; import java.util.TimerTask; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutionException; import java.util.concurrent.PriorityBlockingQueue; import javax.naming.OperationNotSupportedException; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; import org.onap.aai.cl.api.Logger; import org.onap.aai.cl.eelf.LoggerFactory; import org.onap.aai.event.api.EventConsumer; @@ -40,7 +40,6 @@ import org.onap.aai.spike.event.incoming.OffsetManager; import org.onap.aai.spike.event.outgoing.SpikeEventComparator; import org.onap.aai.spike.event.outgoing.SpikeEventExclusionStrategy; import org.onap.aai.spike.event.outgoing.SpikeGraphEvent; -import org.onap.aai.spike.exception.SpikeException; import org.onap.aai.spike.logging.SpikeMsgs; import org.onap.aai.spike.util.SpikeConstants; import org.onap.aai.spike.util.SpikeProperties; @@ -90,7 +89,7 @@ public class SpikeEventProcessor extends TimerTask { } catch (Exception ex) { } - eventQueue = new PriorityBlockingQueue<SpikeGraphEvent>(eventQueueCapacity, new SpikeEventComparator()); + eventQueue = new PriorityBlockingQueue<>(eventQueueCapacity, new SpikeEventComparator()); new Thread(new SpikeEventPublisher()).start(); // Instantiate the offset manager. This will run a background thread that @@ -106,6 +105,7 @@ public class SpikeEventProcessor extends TimerTask { if (consumer == null) { logger.error(SpikeMsgs.SPIKE_SERVICE_STARTED_FAILURE, SpikeConstants.SPIKE_SERVICE_NAME); + return; } Iterable<MessageWithOffset> events = null; @@ -164,9 +164,11 @@ public class SpikeEventProcessor extends TimerTask { + modelEvent.getObjectKey() + " , transaction-id: " + modelEvent.getTransactionId()); logger.debug(SpikeMsgs.SPIKE_EVENT_PROCESSED, modelEventJson); - } catch (SpikeException | InterruptedException e) { + } catch (InterruptedException e) { logger.error(SpikeMsgs.SPIKE_EVENT_CONSUME_FAILURE, e.getMessage() + ". Incoming event payload:\n" + event.getMessage()); + // Restore the interrupted status... + Thread.currentThread().interrupt(); } catch (Exception e) { logger.error(SpikeMsgs.SPIKE_EVENT_CONSUME_FAILURE, e.getMessage() + ". Incoming event payload:\n" + event.getMessage()); @@ -252,9 +254,9 @@ public class SpikeEventProcessor extends TimerTask { } } catch (InterruptedException e) { - // Restore the interrupted status. Thread.currentThread().interrupt(); + continue; } // Try publishing the event to the event bus. This call will block @@ -288,7 +290,7 @@ public class SpikeEventProcessor extends TimerTask { try { Thread.sleep(60000); } catch (InterruptedException e1) { - e1.printStackTrace(); + Thread.currentThread().interrupt(); } } catch (Exception e) { logger.error(SpikeMsgs.SPIKE_EVENT_PUBLISH_FAILURE, e.getMessage()); |