Package org.apache.flink.runtime.jobgraph

Examples of org.apache.flink.runtime.jobgraph.JobID


  /**
   * Constructor for serialization/deserialization. Should not be called on other occasions.
   */
  public RecentJobEvent() {
    super();
    this.jobID = new JobID();
  }
View Full Code Here


  private Envelope nextEnvelope(boolean withBuffer) {
    return nextEnvelope(withBuffer, false);
  }

  private Envelope nextEnvelope(int bufferSize, AbstractEvent... events) {
    Envelope env = new Envelope(random.nextInt(), new JobID(), new ChannelID());
    if (bufferSize > 0) {
      byte[] data = new byte[bufferSize];
      random.nextBytes(data);

      env.setBuffer(spy(new Buffer(new MemorySegment(data), bufferSize, RECYCLER)));
View Full Code Here

    for (int i = 0; i < numSubtasks; i++) {
      final RemoteReceiver receiver = receivers[random.nextInt(numChannels)];

      final AtomicInteger seqNum = new AtomicInteger(0);
      final JobID jobId = new JobID();
      final ChannelID channelId = new ChannelID();

      new Thread(new Runnable() {
        @Override
        public void run() {
View Full Code Here

  /**
   * Default constructor for serialization/deserialization.
   */
  public ProfilingEvent() {
    super();
    this.jobID = new JobID();
  }
View Full Code Here

    final EmbeddedChannel channel = new EmbeddedChannel(new OutboundEnvelopeEncoder());

    int numBuffers = 0;
    for (int i = 0; i < NUM_RANDOM_ENVELOPES; i++) {
      Envelope env = new Envelope(i, new JobID(), new ChannelID());
      int expectedEncodedMsgSize = OutboundEnvelopeEncoder.HEADER_SIZE;

      if (random.nextBoolean()) {
        int eventsSize = random.nextInt(MAX_EVENTS_SIZE + 1);
        expectedEncodedMsgSize += eventsSize;
View Full Code Here

 
  private final ExecutionAttemptID executionId;

 
  public InternalExecutionVertexProfilingData() {
    this.jobId = new JobID();
    this.vertexId = new JobVertexID();
    this.executionId = new ExecutionAttemptID();
    this.subtask = -1;
  }
View Full Code Here

  private void cleanup(JobID jobId) {
    if (!lru.contains(jobId)) {
      lru.addFirst(jobId);
    }
    if (lru.size() > this.maxEntries) {
      JobID toRemove = lru.removeLast();
      this.jobAccumulators.remove(toRemove);
    }
  }
View Full Code Here

  @Test
  public void testInstanceSummaryProfilingEvent() {

    final InstanceSummaryProfilingEvent orig = new InstanceSummaryProfilingEvent(PROFILING_INTERVAL, IOWAIT_CPU,
      IDLE_CPU, USER_CPU, SYSTEM_CPU, HARD_IRQ_CPU, SOFT_IRQ_CPU, TOTAL_MEMORY, FREE_MEMORY, BUFFERED_MEMORY,
      CACHED_MEMORY, CACHED_SWAP_MEMORY, RECEIVED_BYTES, TRANSMITTED_BYTES, new JobID(), TIMESTAMP,
      PROFILING_TIMESTAMP);

    final InstanceSummaryProfilingEvent copy = (InstanceSummaryProfilingEvent) ManagementTestUtils.createCopy(orig);

    assertEquals(orig.getProfilingInterval(), copy.getProfilingInterval());
View Full Code Here

  @Test
  public void testSingleInstanceProfilingEvent() {
    try {
      final SingleInstanceProfilingEvent orig = new SingleInstanceProfilingEvent(PROFILING_INTERVAL, IOWAIT_CPU,
        IDLE_CPU, USER_CPU, SYSTEM_CPU, HARD_IRQ_CPU, SOFT_IRQ_CPU, TOTAL_MEMORY, FREE_MEMORY, BUFFERED_MEMORY,
        CACHED_MEMORY, CACHED_SWAP_MEMORY, RECEIVED_BYTES, TRANSMITTED_BYTES, new JobID(), TIMESTAMP,
        PROFILING_TIMESTAMP, INSTANCE_NAME);
 
      final SingleInstanceProfilingEvent copy = (SingleInstanceProfilingEvent) CommonTestUtils.createCopyWritable(orig);
 
      assertEquals(orig.getProfilingInterval(), copy.getProfilingInterval());
View Full Code Here

   */
  @Test
  public void testThreadProfilingEvent() {

    final ThreadProfilingEvent orig = new ThreadProfilingEvent(USER_TIME, SYSTEM_TIME, BLOCKED_TIME, WAITED_TIME,
      new JobVertexID(), 17, new ExecutionAttemptID(), PROFILING_INTERVAL, new JobID(), TIMESTAMP, PROFILING_TIMESTAMP);

    final ThreadProfilingEvent copy = (ThreadProfilingEvent) ManagementTestUtils.createCopy(orig);

    assertEquals(orig.getUserTime(), copy.getUserTime());
    assertEquals(orig.getSystemTime(), copy.getSystemTime());
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.jobgraph.JobID

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.