Package com.datastax.driver.core

Examples of com.datastax.driver.core.QueryTrace$Event


        for (ExecutionInfo executionInfo : resultSet.getAllExecutionInfo()) {
            if (executionInfo == null)
                continue;
            Host qh = executionInfo.getQueriedHost();
            ConsistencyLevel cl = executionInfo.getAchievedConsistencyLevel();
            QueryTrace queryTrace = executionInfo.getQueryTrace();
            execInfo.append("\n    exeuction info: queried-host=[address=").append(qh.getAddress()).
                append(", version=").append(qh.getCassandraVersion()).
                append(", dc=").append(qh.getDatacenter()).
                append(", rac=").append(qh.getRack()).
                append("], achieved-consistency-level=").append(cl);
            if (queryTrace != null) {
                InetAddress coordinator = queryTrace.getCoordinator();
                int durationMicros = queryTrace.getDurationMicros();
                Map<String, String> parameters = queryTrace.getParameters();
                String requestType = queryTrace.getRequestType();
                long startedAt = queryTrace.getStartedAt();
                UUID traceId = queryTrace.getTraceId();
                execInfo.append("\n        query-trace: coordinator=").append(coordinator).
                    append(", duration[us]=").append(durationMicros).
                    append(", requestType=").append(requestType).
                    append(", startedAt=").append(startedAt).
                    append(", traceId=").append(traceId).
                    append(", parameters=").append(parameters);
                if (fetchTrace) {
                    List<QueryTrace.Event> events = queryTrace.getEvents();
                    if (events != null) {
                        for (QueryTrace.Event event : events) {
                            if (event == null)
                                continue;
                            InetAddress source = event.getSource();
View Full Code Here


                actualLogger.trace("****************************");
                if (actualLogger.isTraceEnabled()) {
                    actualLogger.trace(String.format("%1$-80s | %2$-16s | %3$-24s | %4$-20s", "Description", "Source", "Source elapsed in micros", "Thread name"));
                }
                try {
                    final QueryTrace queryTrace = executionInfo.getQueryTrace();
                    final List<QueryTrace.Event> events = new ArrayList<>(queryTrace.getEvents());
                    Collections.sort(events, EVENT_TRACE_COMPARATOR);
                    for (QueryTrace.Event event : events) {
                        final String formatted = String.format("%1$-80s | %2$-16s | %3$-24s | %4$-20s", event.getDescription(), event.getSource(), event.getSourceElapsedMicros(), event.getThreadName());
                        actualLogger.trace(formatted);
                    }
View Full Code Here

 
  private long parseDuration(ResultSet rs) {
    if (rs != null) {
      ExecutionInfo info = rs.getExecutionInfo();
      if (info !=null) {
        QueryTrace qt = info.getQueryTrace();
        if (qt != null) {
          return qt.getDurationMicros();
        }
      }
    }
    return 0L;
  }
View Full Code Here

      Event[] events = history.getLatestPage();

      System.out.println("Events In the latestPage are : ");
      for (int i = 0; i < events.length; i++)
      {
        Event anEvent = events[i];
        System.out.println("Event: " + anEvent.getClass().getName()
            + "  FullFormattedMessage: "
            + anEvent.getFullFormattedMessage());
      }
    } catch (Exception e)
    {
      System.out.println("Caught Exception : " + " Name : "
          + e.getClass().getName() + " Message : " + e.getMessage()
View Full Code Here

                {
                    ArrayOfEvent aoe = (ArrayOfEvent) value;
                    Event[] evts = aoe.getEvent();
                    for (int evtID = 0; evtID < evts.length; ++evtID)
                    {
                        Event anEvent = evts[evtID];
                        System.out.println("\n----------" + "\n Event ID: "
                                + anEvent.getKey() + "\n Event: "
                                + anEvent.getClass().getName()
                                + "\n FullFormattedMessage: "
                                + anEvent.getFullFormattedMessage()
                                + "\n VM Reference: "
                                + anEvent.getVm().getVm().get_value()
                                + "\n----------\n");
                    }
                } else if (value instanceof VmEvent)
                {
                    VmEvent anEvent = (VmEvent) value;
                    System.out.println("\n----------" + "\n Event ID: "
                            + anEvent.getKey() + "\n Event: "
                            + anEvent.getClass().getName()
                            + "\n FullFormattedMessage: "
                            + anEvent.getFullFormattedMessage()
                            + "\n VM Reference: "
                            + anEvent.getVm().getVm().get_value()
                            + "\n----------\n");
                }
                System.out.println("===============");
            }
        }
View Full Code Here

        evtMgr.createCollectorForEvents(eventFilter);
      Event[] events = ehc.getLatestPage();

      for (int i = 0; i < events.length; i++)
      {
        Event anEvent = events[i];
        System.out.println("Event: " +
            anEvent.getClass().getName());
      }
    }
    si.getServerConnection().logout();
  }
View Full Code Here

    ServiceInstance si = new ServiceInstance(
        new URL(args[0]), args[1], args[2], true);

    // get the latest event and print it out
    EventManager evtMgr = si.getEventManager();
    Event latestEvent = evtMgr.getLatestEvent();
    printEvent(latestEvent);

    // create a filter spec for querying events
    EventFilterSpec efs = new EventFilterSpec();
    // limit to only error and warning
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.EVENT: {
            Event event = (Event) theEObject;
            T result = caseEvent(event);
            if (result == null)
                result = caseFlowNode(event);
            if (result == null)
                result = caseInteractionNode(event);
View Full Code Here

    ProcessInstanceEntity processInstanceImpl = processInstanceManager.findProcessInstanceById(processInstanceId, processDefinition);
    TokenEntity tokenEntity = processInstanceImpl.getTokenMap().get(tokenId);
    processInstanceImpl.getContextInstance().setTransientVariableMap(transientVariables);
   
    if(nodeId==null){
      Event event=(Event)tokenEntity.getFlowNode();
      if(event instanceof BoundaryEvent){
        BoundaryEvent boundaryEvent=(BoundaryEvent)event;
        Activity activity =boundaryEvent.getAttachedToRef();
        boolean isCancelActivity=boundaryEvent.isCancelActivity();
        if(isCancelActivity){
View Full Code Here

    return bo != null && bo instanceof Event;
  }

  @Override
  public Object[] create(ICreateContext context) {
    Event e = (Event) getBusinessObjectForPictogramElement(context.getTargetContainer());
    EventWithDefinitions event = support.create(e);
    EventDefinition definition = createEventDefinition(context);
    event.getEventDefinitions().add(definition);
    addGraphicalRepresentation(context, definition);
    return new Object[] { definition };
View Full Code Here

TOP

Related Classes of com.datastax.driver.core.QueryTrace$Event

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.