Package com.streamreduce.core.event

Examples of com.streamreduce.core.event.EventId


                metadata.put("stddev", tuple.getFloatByField("stddev"));
                metadata.put("diff", diff);
                metadata.put("min", tuple.getFloatByField("min"));
                metadata.put("max", tuple.getFloatByField("max"));

                EventId mType = EventId.NODEBELLY_STATUS;
                if (isAnomaly) {
                    mType = EventId.NODEBELLY_ANOMALY;
                }
                else if (granularity == Constants.PERIOD_DAY) {
                    mType = EventId.NODEBELLY_SUMMARY;
                }
                metadata.put("type", mType.toString());

                if (isAnomaly) {
                    produce(metadata);
                } else {
                    if (metadata.get("targetConnectionId") != null) {
View Full Code Here


    public void realExecute(Tuple tuple) {
        Map<String, Object> event = (Map<String, Object>) tuple.getValue(0);

        String id = event.get("_id") != null ? event.get("_id").toString() : null;
        Long timestamp = event.get("timestamp") != null ? (Long) event.get("timestamp") : null;
        EventId eventId = event.get("eventId") != null ? EventId.valueOf(event.get("eventId").toString()) : null;
        String accountId = event.get("accountId") != null ?  event.get("accountId").toString() : null;
        String userId = event.get("userId") != null ? event.get("userId").toString() : null;
        String targetId = event.get("targetId") != null ? event.get("targetId").toString() : null;
        Map<String, Object> metadata = event.get("metadata") != null ?
                (Map<String, Object>) event.get("metadata") :
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public String doTransform(Event event) {
        EventId eventId = event.getEventId();
        Map<String, Object> eventMetadata = event.getMetadata();
        String msg = "";

        switch (eventId) {
            case ACTIVITY:
View Full Code Here

        super(messageProperties, messageDetails);
    }

    @Override
    public String doTransform(Event event) {
        EventId eventId = event.getEventId();
        Map<String, Object> eventMetadata = event.getMetadata();
        String rawMessage;

        switch (eventId) {
            case CREATE:
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public String doTransform(Event event) {
        EventId eventId = event.getEventId();
        Map<String, Object> eventMetadata = event.getMetadata();
        String userFullname = (String)eventMetadata.get("targetFullname");
        String userAlias = (String)eventMetadata.get("targetAlias");
        String msg;

View Full Code Here

    }

    @Override
    public String doTransform(Event event) {

        final EventId eventId = event.getEventId();
        final Map<String, Object> meta = event.getMetadata();
        final Date eventDate = new Date((Long) meta.get("timestamp"));

        String title;
        String details = "";
View Full Code Here

    }

    @SuppressWarnings("rawtypes")
    @Override
    public String doTransform(Event event) {
        EventId eventId = event.getEventId();
        String msg;

        switch (eventId) {
            case CREATE:
            case UPDATE:
View Full Code Here

        return msg;
    }

    private String getCloudInventoryItemMessage(Event event) {
        EventId eventId = event.getEventId();
        Map<String, Object> eventMetadata = event.getMetadata();
        String rawMessage;

        switch (eventId) {
            case CLOUD_INVENTORY_ITEM_REBOOT:
View Full Code Here

                                    eventMetadata.get("targetProviderDisplayName"),
                                    eventMetadata.get("targetConnectionAlias"));
    }

    private String getGenericInventoryItemMessage(Event event) {
        EventId eventId = event.getEventId();
        Map<String, Object> eventMetadata = event.getMetadata();
        String rawMessage;

        switch(eventId) {
            case CREATE:
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public String doTransform(Event event) {
        EventId eventId = event.getEventId();
        Map<String, Object> eventMetadata = event.getMetadata();
        String msg;

        switch (eventId) {
            case HASHTAG_ADD:
View Full Code Here

TOP

Related Classes of com.streamreduce.core.event.EventId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.