/** * Sender or Root. */ @DefaultImplementation(BroadcastSender.class) interface Sender<T> extends GroupCommOperator { /** * Send element to all receivers. */ void send(T element) throws NetworkException, InterruptedException; }
/** * Senders or non-roots. */ @DefaultImplementation(GatherSender.class) interface Sender<T> extends GroupCommOperator { /** * Send the element to the root/receiver. */ void send(T element) throws InterruptedException, NetworkException; }
/** * NameClient interface. */ @DefaultImplementation(NameClient.class) public interface NameResolver extends Stage, Naming { }
/** * Interface to request containers from YARN using AMRMClient.ContainerRequest requests. */ @DefaultImplementation(YarnContainerRequestHandlerImpl.class) public interface YarnContainerRequestHandler { /** * Enqueue a set of container requests with YARN. * * @param containerRequests set of container requests */ void onContainerRequest(final AMRMClient.ContainerRequest... containerRequests); }
/** * Supplies the path to the executable for process (Driver, Evaluator) launches. */ @DefaultImplementation(UnixJVMPathProvider.class) public interface RuntimePathProvider { String getPath(); }
@DefaultImplementation(TimerImpl.class) public interface Timer { void sleep() throws InterruptedException; @NamedParameter(default_value = "10", doc = "Number of seconds to sleep", short_name = "sec") class Seconds implements Name<Integer> { } }
/** * Provides path to job submission directory. */ @DefaultImplementation(JobSubmissionDirectoryProviderImpl.class) public interface JobSubmissionDirectoryProvider { /** * Returns path to job submission directory. * * @return job submission directory */ Path getJobSubmissionDirectoryPath(String applicationId); }
/** * Implement this interface to set the tracking URL reported to YARN. */ @DefaultImplementation(HttpTrackingURLProvider.class) public interface TrackingURLProvider { String getTrackingUrl(); }
/** * The EventHandler that receives the GroupCommunicationMsg. * pertaining to a specific Communication Group */ @DefaultImplementation(value = CommGroupNetworkHandlerImpl.class) public interface CommGroupNetworkHandler extends EventHandler<GroupCommunicationMessage> { void register(Class<? extends Name<String>> operName, EventHandler<GroupCommunicationMessage> handler); void addTopologyElement(Class<? extends Name<String>> operName); GroupCommunicationMessage waitForTopologyUpdate(Class<? extends Name<String>> operName); byte[] waitForTopologyChanges(Class<? extends Name<String>> operName); }
/** * Interface for remote block stores (e.g., GlusterFS, ...). */ @DefaultImplementation(GlusterFileStore.class) public interface RemoteFileStore extends BlockStore { }
/** * Interface for remote block stores (e.g., GlusterFS, ...). */ @DefaultImplementation(GlusterFileStore.class) public interface RemoteFileStore extends BlockStore { }
/** * Receiver or non-roots. */ @DefaultImplementation(ScatterReceiver.class) interface Receiver<T> extends GroupCommOperator { /** * Receive the sub-list of elements targeted for the current receiver. * * @return list of elements targeted for the current receiver. */ List<T> receive() throws InterruptedException, NetworkException; } }
/** * Receivers or Non-roots. */ @DefaultImplementation(BroadcastReceiver.class) interface Receiver<T> extends GroupCommOperator { /** * Receiver the element broadcasted by sender. * * @return the element broadcasted by sender */ T receive() throws NetworkException, InterruptedException; } }
/** * An interface for optimizer, which manages the optimization over submitted IR DAGs through * {@link org.apache.nemo.compiler.optimizer.policy.Policy}s. */ @DefaultImplementation(NemoOptimizer.class) public interface Optimizer { /** * Optimize the submitted DAG. * * @param dag the input DAG to optimize. * @return optimized DAG, reshaped or tagged with execution properties. */ DAG<IRVertex, IREdge> optimizeDag(DAG<IRVertex, IREdge> dag); }
@Private @DefaultImplementation(value = CommunicationGroupClientImpl.class) public interface CommunicationGroupServiceClient extends CommunicationGroupClient { /** * Should not be used by user code. * Used for initialization of the * communication group */ void initialize(); }
/** * The global EventHandler that receives the GroupCommunicationMsg. * and routes it to the relevant communication group */ @TaskSide @DefaultImplementation(value = GroupCommNetworkHandlerImpl.class) public interface GroupCommNetworkHandler extends EventHandler<Message<GroupCommunicationMessage>> { void register(Class<? extends Name<String>> groupName, EventHandler<GroupCommunicationMessage> commGroupNetworkHandler); }
/** * Factory to create new evaluator process setups. */ @Public @DriverSide @DefaultImplementation(JVMProcessFactory.class) public interface EvaluatorProcessFactory<T> { <T extends EvaluatorProcess> T newEvaluatorProcess(); }
/** * Used in the to report the progress of the REEF application. * The default implementation always returns a progress of 0. */ @Public @DriverSide @DefaultImplementation(DefaultProgressProvider.class) public interface ProgressProvider { /** * @return The progress of the REEF application. */ float getProgress(); }
/** * The task side interface for the Group Communication Service. */ @TaskSide @Provided @DefaultImplementation(value = GroupCommClientImpl.class) public interface GroupCommClient { /** * @param groupName a group name * @return The communication group client with the given name that gives access * to the operators configured on it that will be used to do group communication */ CommunicationGroupClient getCommunicationGroup(Class<? extends Name<String>> groupName); }
/** * Provides a method to retrieve the rack name from a container, which * may be dependent on the Hadoop distribution. */ @Public @RuntimeAuthor @DriverSide @DefaultImplementation(DefaultRackNameFormatter.class) public interface RackNameFormatter { /** * The rack name of the Container. */ String getRackName(final Container container); }