This project has retired. For details please refer to its Attic page.
Source code
001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied.  See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019package org.apache.reef.runtime.common.client.api;
020
021import org.apache.reef.annotations.audience.RuntimeAuthor;
022import org.apache.reef.runtime.common.files.FileResource;
023import org.apache.reef.tang.Configuration;
024import org.apache.reef.tang.annotations.DefaultImplementation;
025import org.apache.reef.util.Optional;
026
027import java.util.Set;
028
029/**
030 * Event sent to Driver Runtime.
031 * Submission of a Job to the Driver Runtime
032 */
033@RuntimeAuthor
034@DefaultImplementation(JobSubmissionEventImpl.class)
035public interface JobSubmissionEvent {
036
037  /**
038   * @return Id of the Job
039   */
040  String getIdentifier();
041
042  /**
043   * @return Remote Id for the error handler
044   */
045  String getRemoteId();
046
047  /**
048   * @return Driver configuration
049   */
050  Configuration getConfiguration();
051
052  /**
053   * @return Owner's username
054   */
055  String getUserName();
056
057  /**
058   * @return List of global files
059   */
060  Set<FileResource> getGlobalFileSet();
061
062  /**
063   * @return List of local files
064   */
065  Set<FileResource> getLocalFileSet();
066
067  /**
068   * @return Memory to be allocated to the Driver
069   */
070  Optional<Integer> getDriverMemory();
071
072  /**
073   * @return Priority to be given to the Job
074   */
075  Optional<Integer> getPriority();
076
077  /**
078   * @return True if evaluators are to be preserved across driver failures.
079   */
080  Optional<Boolean> getPreserveEvaluators();
081
082  /**
083   * Returns the number of time that the driver should be started by the resource manager
084   * if it fails unexpectedly.
085   */
086  Optional<Integer> getMaxApplicationSubmissions();
087}