Examples of TimelineEvent


Examples of org.apache.hadoop.yarn.api.records.timeline.TimelineEvent

      byte[] key, int offset, byte[] value) throws IOException {
    KeyParser kp = new KeyParser(key, offset);
    long ts = kp.getNextLong();
    String tstype = kp.getNextString();
    if (eventTypes == null || eventTypes.contains(tstype)) {
      TimelineEvent event = new TimelineEvent();
      event.setTimestamp(ts);
      event.setEventType(tstype);
      Object o = GenericObjectMapper.read(value);
      if (o == null) {
        event.setEventInfo(null);
      } else if (o instanceof Map) {
        @SuppressWarnings("unchecked")
        Map<String, Object> m = (Map<String, Object>) o;
        event.setEventInfo(m);
      } else {
        throw new IOException("Couldn't deserialize event info map");
      }
      return event;
    }
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.timeline.TimelineEvent

      TimelineEntity entity = new TimelineEntity();
      entity.setEntityId("entity id " + j);
      entity.setEntityType("entity type " + j);
      entity.setStartTime(System.currentTimeMillis());
      for (int i = 0; i < 2; ++i) {
        TimelineEvent event = new TimelineEvent();
        event.setTimestamp(System.currentTimeMillis());
        event.setEventType("event type " + i);
        event.addEventInfo("key1", "val1");
        event.addEventInfo("key2", "val2");
        entity.addEvent(event);
      }
      entity.addRelatedEntity("test ref type 1", "test ref id 1");
      entity.addRelatedEntity("test ref type 2", "test ref id 2");
      entity.addPrimaryFilter("pkey1", "pval1");
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.timeline.TimelineEvent

      TimelineEvents.EventsOfOneEntity partEvents =
          new TimelineEvents.EventsOfOneEntity();
      partEvents.setEntityId("entity id " + j);
      partEvents.setEntityType("entity type " + j);
      for (int i = 0; i < 2; ++i) {
        TimelineEvent event = new TimelineEvent();
        event.setTimestamp(System.currentTimeMillis());
        event.setEventType("event type " + i);
        event.addEventInfo("key1", "val1");
        event.addEventInfo("key2", "val2");
        partEvents.addEvent(event);
      }
      events.addEvent(partEvents);
    }
    LOG.info("Events in JSON:");
    LOG.info(TimelineUtils.dumpTimelineRecordtoJSON(events, true));

    Assert.assertEquals(2, events.getAllEvents().size());
    TimelineEvents.EventsOfOneEntity partEvents1 = events.getAllEvents().get(0);
    Assert.assertEquals("entity id 0", partEvents1.getEntityId());
    Assert.assertEquals("entity type 0", partEvents1.getEntityType());
    Assert.assertEquals(2, partEvents1.getEvents().size());
    TimelineEvent event11 = partEvents1.getEvents().get(0);
    Assert.assertEquals("event type 0", event11.getEventType());
    Assert.assertEquals(2, event11.getEventInfo().size());
    TimelineEvent event12 = partEvents1.getEvents().get(1);
    Assert.assertEquals("event type 1", event12.getEventType());
    Assert.assertEquals(2, event12.getEventInfo().size());
    TimelineEvents.EventsOfOneEntity partEvents2 = events.getAllEvents().get(1);
    Assert.assertEquals("entity id 1", partEvents2.getEntityId());
    Assert.assertEquals("entity type 1", partEvents2.getEntityType());
    Assert.assertEquals(2, partEvents2.getEvents().size());
    TimelineEvent event21 = partEvents2.getEvents().get(0);
    Assert.assertEquals("event type 0", event21.getEventType());
    Assert.assertEquals(2, event21.getEventInfo().size());
    TimelineEvent event22 = partEvents2.getEvents().get(1);
    Assert.assertEquals("event type 1", event22.getEventType());
    Assert.assertEquals(2, event22.getEventInfo().size());
  }
View Full Code Here

Examples of org.primefaces.extensions.model.timeline.TimelineEvent

 
        // Server-side dates should be in UTC. They will be converted to a local dates in UI according to provided TimeZone. 
        // Submitted local dates in UI are converted back to UTC, so that server receives all dates in UTC again. 
        Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"))
        cal.set(2014, Calendar.JUNE, 22, 17, 30, 0)
        model.add(new TimelineEvent("<div>RMP aberta</div><img src='" + contextPath + "/img/add.png' style='width:16px;height:16px;'>", cal.getTime()))
 
        cal.set(2014, Calendar.JUNE, 23, 23, 0, 0)
        model.add(new TimelineEvent("<div>Encaminhado p/ RD</div><img src='" + contextPath 
                                    + "/img/user_go.png' style='width:16px;height:16px;'>"
                                    cal.getTime()))
 
        // read-only event 
        cal.set(2014, Calendar.JUNE, 24, 21, 45, 0)
        model.add(new TimelineEvent("<div>Encaminhado Setor Destino</div><img src='" + contextPath 
                                    + "/img/arrow_right.png' style='width:16px;height:16px;'>", cal.getTime()
                                    false, null, "readonly"))
 
        cal.set(2014, Calendar.JUNE, 26, 0, 0, 0)
        Date startWork = cal.getTime()
        cal.set(2014, Calendar.JUNE, 2, 0, 0, 0)
        Date endWork = cal.getTime()
        model.add
            new TimelineEvent
                "<img src='" + contextPath 
                + "/resources/images/timeline/homework.png' style='width:31px;height:29px;'><span style='padding:8px'>Homework</span>"
                startWork, endWork))
 
        cal.set(2014, Calendar.JUNE, 28, 0, 0, 0)
        model.add(new TimelineEvent("<div>Plano de ação cadastrado</div><img src='" + contextPath 
                                    + "/img/script_add.png' style='width:16px;height:16px;'>", cal.getTime()))
 
        // read-only event 
        cal.set(2014, Calendar.JUNE, 31, 0, 0, 0)
        Date startReport = cal.getTime()
        cal.set(2014, Calendar.JUNE, 3, 0, 0, 0)
        Date endReport = cal.getTime()
        model.add
            new TimelineEvent
                "<img src='" + contextPath 
                + "/resources/images/timeline/report.png' style='width:32px;height:31px;'><span style='padding:8px'>Report</span>"
                startReport, endReport, false, null, "readonly"))
   
View Full Code Here

Examples of org.sleuthkit.autopsy.timeline.events.TimeLineEvent

        }
        return null;
    }

    TimeLineEvent getEventById(Long eventID) {
        TimeLineEvent result = null;
        dbReadLock();
        try {
            getEventByIDStmt.clearParameters();
            getEventByIDStmt.setLong(1, eventID);
            try (ResultSet rs = getEventByIDStmt.executeQuery()) {
View Full Code Here

Examples of org.sleuthkit.autopsy.timeline.events.TimeLineEvent

        }
    }

    private TimeLineEvent constructTimeLineEvent(ResultSet rs) throws SQLException {
        EventType type = RootEventType.allTypes.get(rs.getInt(SUB_TYPE_COLUMN));
        return new TimeLineEvent(rs.getLong(EVENT_ID_COLUMN),
                                 rs.getLong(FILE_ID_COLUMN),
                                 rs.getLong(ARTIFACT_ID_COLUMN),
                                 rs.getLong(TIME_COLUMN),
                                 type,
                                 rs.getString(FULL_DESCRIPTION_COLUMN),
View Full Code Here

Examples of org.sleuthkit.autopsy.timeline.events.TimeLineEvent

        }

        @Override
        protected Node createNodeForKey(Long eventID) {
            if (eventID >= 0) {
                final TimeLineEvent eventById = filteredEvents.getEventById(eventID);
                try {
                    if (eventById.getType().getSuperType() == BaseTypes.FILE_SYSTEM) {
                        return new EventNode(eventById, Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(eventById.getFileID()));
                    } else {
                        AbstractFile file = Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(eventById.getFileID());
                        BlackboardArtifact blackboardArtifact = Case.getCurrentCase().getSleuthkitCase().getBlackboardArtifact(eventById.getArtifactID());

                        return new EventNode(eventById, file, blackboardArtifact);
                    }

                } catch (TskCoreException tskCoreException) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.