Package org.apache.flink.runtime.jobgraph

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


    Configuration config = new Configuration();

    config.setLong(ConfigConstants.LIBRARY_CACHE_MANAGER_CLEANUP_INTERVAL, 1);
    GlobalConfiguration.includeConfiguration(config);

    JobID jid = new JobID();
    List<BlobKey> keys = new ArrayList<BlobKey>();
    BlobServer server = null;
    LibraryCacheManager libraryCacheManager = null;

    final byte[] buf = new byte[128];
View Full Code Here


    if (contentAdressable == 0) {
      // Receive the job ID
      BlobServer.readFully(inputStream, buf, 0, JobID.SIZE);
      final ByteBuffer bb = ByteBuffer.wrap(buf);
      final JobID jobID = JobID.fromByteBuffer(bb);
      // Receive the key
      final String key = readKey(buf, inputStream);
      blob = this.blobServer.getStorageLocation(jobID, key);
    } else {
      final BlobKey key = BlobKey.readFromInputStream(inputStream);
View Full Code Here

   *         thrown if an I/O error occurs while reading/writing data from/to the respective streams
   */
  private void put(final InputStream inputStream, final OutputStream outputStream, final byte[] buf)
      throws IOException {

    JobID jobID = null;
    String key = null;
    MessageDigest md = null;
    final int contentAdressable = inputStream.read();
    if (contentAdressable < 0) {
      throw new EOFException("Expected PUT header");
View Full Code Here

  private void delete(final InputStream inputStream, final byte[] buf) throws IOException {

    // Receive the job ID
    BlobServer.readFully(inputStream, buf, 0, JobID.SIZE);
    final ByteBuffer bb = ByteBuffer.wrap(buf);
    final JobID jobID = JobID.fromByteBuffer(bb);
    String key = null;

    final int r = inputStream.read();
    if (r < 0) {
      throw new EOFException();
View Full Code Here

      TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
      when(taskManager.submitTask(Matchers.any(TaskDeploymentDescriptor.class))).thenReturn(new TaskOperationResult(execId, true));
      when(taskManager.cancelTask(execId)).thenReturn(new TaskOperationResult(execId, true), new TaskOperationResult(execId, false));
     
      Instance instance = getInstance(taskManager);
      AllocatedSlot slot = instance.allocateSlot(new JobID());
     
      vertex.deployToSlot(slot);
     
      assertEquals(ExecutionState.DEPLOYING, vertex.getExecutionState());
     
View Full Code Here

     
      // first return NOT SUCCESS (task not found, cancel call overtook deploy call), then success (cancel call after deploy call)
      when(taskManager.cancelTask(execId)).thenReturn(new TaskOperationResult(execId, false), new TaskOperationResult(execId, true));
     
      Instance instance = getInstance(taskManager);
      AllocatedSlot slot = instance.allocateSlot(new JobID());
     
      vertex.deployToSlot(slot);
     
      assertEquals(ExecutionState.DEPLOYING, vertex.getExecutionState());
     
View Full Code Here

      final TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
      when(taskManager.cancelTask(execId)).thenReturn(new TaskOperationResult(execId, true));
     
      Instance instance = getInstance(taskManager);
      AllocatedSlot slot = instance.allocateSlot(new JobID());

      setVertexState(vertex, ExecutionState.RUNNING);
      setVertexResource(vertex, slot);
     
      assertEquals(ExecutionState.RUNNING, vertex.getExecutionState());
View Full Code Here

      final TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
      when(taskManager.cancelTask(execId)).thenReturn(new TaskOperationResult(execId, true));
     
      Instance instance = getInstance(taskManager);
      AllocatedSlot slot = instance.allocateSlot(new JobID());

      setVertexState(vertex, ExecutionState.RUNNING);
      setVertexResource(vertex, slot);
     
      assertEquals(ExecutionState.RUNNING, vertex.getExecutionState());
View Full Code Here

      final TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
      when(taskManager.cancelTask(execId)).thenReturn(new TaskOperationResult(execId, false));
     
      Instance instance = getInstance(taskManager);
      AllocatedSlot slot = instance.allocateSlot(new JobID());

      setVertexState(vertex, ExecutionState.RUNNING);
      setVertexResource(vertex, slot);
     
      assertEquals(ExecutionState.RUNNING, vertex.getExecutionState());
View Full Code Here

      final TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
      when(taskManager.cancelTask(execId)).thenThrow(new IOException("RPC call failed"));
     
      Instance instance = getInstance(taskManager);
      AllocatedSlot slot = instance.allocateSlot(new JobID());

      setVertexState(vertex, ExecutionState.RUNNING);
      setVertexResource(vertex, slot);
     
      assertEquals(ExecutionState.RUNNING, vertex.getExecutionState());
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.