/** * Returns the {@link ActorGateway} of the current job manager leader using * the {@link LeaderRetrievalService}. * * @return ActorGateway of the current job manager leader * @throws Exception */ public ActorGateway getJobManagerGateway() throws FlinkException { log.debug("Looking up JobManager"); try { return LeaderRetrievalUtils.retrieveLeaderGateway( highAvailabilityServices.getJobManagerLeaderRetriever(HighAvailabilityServices.DEFAULT_JOB_ID), actorSystemLoader.get(), lookupTimeout); } catch (LeaderRetrievalException lre) { throw new FlinkException("Could not connect to the leading JobManager. Please check that the " + "JobManager is running.", lre); } }
/** * Shuts down the client. This stops the internal actor system and actors. */ public void shutdown() throws Exception { synchronized (this) { actorSystemLoader.close(); if (!sharedHaServices && highAvailabilityServices != null) { highAvailabilityServices.close(); } } }
/** * Reattaches to a running job with the given job id. * * @param jobID The job id of the job to attach to * @return The JobExecutionResult for the jobID * @throws JobExecutionException if an error occurs during monitoring the job execution */ public JobListeningContext connectToJob(JobID jobID) throws JobExecutionException { final ActorSystem actorSystem; try { actorSystem = actorSystemLoader.get(); } catch (FlinkException fe) { throw new JobExecutionException( jobID, "Could not start the ActorSystem needed to talk to the JobManager.", fe); } return JobClient.attachToRunningJob( jobID, flinkConfig, actorSystem, highAvailabilityServices, timeout, printStatusDuringExecution); }
/** * Shuts down the client. This stops the internal actor system and actors. */ public void shutdown() throws Exception { synchronized (this) { actorSystemLoader.close(); if (!sharedHaServices && highAvailabilityServices != null) { highAvailabilityServices.close(); } } }
/** * Reattaches to a running from the supplied job id. * @param jobID The job id of the job to attach to * @return The JobExecutionResult for the jobID * @throws JobExecutionException if an error occurs during monitoring the job execution */ public JobExecutionResult retrieveJob(JobID jobID) throws JobExecutionException { final ActorSystem actorSystem; try { actorSystem = actorSystemLoader.get(); } catch (FlinkException fe) { throw new JobExecutionException( jobID, "Could not start the ActorSystem needed to talk to the JobManager.", fe); } final JobListeningContext listeningContext = JobClient.attachToRunningJob( jobID, flinkConfig, actorSystem, highAvailabilityServices, timeout, printStatusDuringExecution); return JobClient.awaitJobResult(listeningContext); }
/** * Creates a new ApplicationClient actor or returns an existing one. May start an ActorSystem. * @return ActorSystem */ public ActorRef get() throws FlinkException { if (applicationClient == null) { // start application client LOG.info("Start application client."); final ActorSystem actorSystem; try { actorSystem = actorSystemLoader.get(); } catch (FlinkException fle) { throw new FlinkException("Could not start the ClusterClient's ActorSystem.", fle); } try { applicationClient = actorSystem.actorOf( Props.create( ApplicationClient.class, flinkConfig, highAvailabilityServices.getJobManagerLeaderRetriever(HighAvailabilityServices.DEFAULT_JOB_ID)), "applicationClient"); } catch (Exception e) { throw new FlinkException("Could not start the ApplicationClient.", e); } } return applicationClient; } }
actorSystem = actorSystemLoader.get(); } catch (FlinkException fe) { throw new ProgramInvocationException("Could not start the ActorSystem needed to talk to the " +
/** * Returns the {@link ActorGateway} of the current job manager leader using * the {@link LeaderRetrievalService}. * * @return ActorGateway of the current job manager leader * @throws Exception */ public ActorGateway getJobManagerGateway() throws FlinkException { log.debug("Looking up JobManager"); try { return LeaderRetrievalUtils.retrieveLeaderGateway( highAvailabilityServices.getJobManagerLeaderRetriever(HighAvailabilityServices.DEFAULT_JOB_ID), actorSystemLoader.get(), lookupTimeout); } catch (LeaderRetrievalException lre) { throw new FlinkException("Could not connect to the leading JobManager. Please check that the " + "JobManager is running.", lre); } }
/** * Reattaches to a running job with the given job id. * * @param jobID The job id of the job to attach to * @return The JobExecutionResult for the jobID * @throws JobExecutionException if an error occurs during monitoring the job execution */ public JobListeningContext connectToJob(JobID jobID) throws JobExecutionException { final ActorSystem actorSystem; try { actorSystem = actorSystemLoader.get(); } catch (FlinkException fe) { throw new JobExecutionException( jobID, "Could not start the ActorSystem needed to talk to the JobManager.", fe); } return JobClient.attachToRunningJob( jobID, flinkConfig, actorSystem, highAvailabilityServices, timeout, printStatusDuringExecution); }
/** * Reattaches to a running from the supplied job id. * @param jobID The job id of the job to attach to * @return The JobExecutionResult for the jobID * @throws JobExecutionException if an error occurs during monitoring the job execution */ public JobExecutionResult retrieveJob(JobID jobID) throws JobExecutionException { final ActorSystem actorSystem; try { actorSystem = actorSystemLoader.get(); } catch (FlinkException fe) { throw new JobExecutionException( jobID, "Could not start the ActorSystem needed to talk to the JobManager.", fe); } final JobListeningContext listeningContext = JobClient.attachToRunningJob( jobID, flinkConfig, actorSystem, highAvailabilityServices, timeout, printStatusDuringExecution); return JobClient.awaitJobResult(listeningContext); }
/** * Creates a new ApplicationClient actor or returns an existing one. May start an ActorSystem. * @return ActorSystem */ public ActorRef get() throws FlinkException { if (applicationClient == null) { // start application client LOG.info("Start application client."); final ActorSystem actorSystem; try { actorSystem = actorSystemLoader.get(); } catch (FlinkException fle) { throw new FlinkException("Could not start the ClusterClient's ActorSystem.", fle); } try { applicationClient = actorSystem.actorOf( Props.create( ApplicationClient.class, flinkConfig, highAvailabilityServices.getJobManagerLeaderRetriever(HighAvailabilityServices.DEFAULT_JOB_ID)), "applicationClient"); } catch (Exception e) { throw new FlinkException("Could not start the ApplicationClient.", e); } } return applicationClient; } }
/** * Creates a new ApplicationClient actor or returns an existing one. May start an ActorSystem. * @return ActorSystem */ public ActorRef get() throws FlinkException { if (applicationClient == null) { // start application client LOG.info("Start application client."); final ActorSystem actorSystem; try { actorSystem = actorSystemLoader.get(); } catch (FlinkException fle) { throw new FlinkException("Could not start the ClusterClient's ActorSystem.", fle); } try { applicationClient = actorSystem.actorOf( Props.create( ApplicationClient.class, flinkConfig, highAvailabilityServices.getJobManagerLeaderRetriever(HighAvailabilityServices.DEFAULT_JOB_ID)), "applicationClient"); } catch (Exception e) { throw new FlinkException("Could not start the ApplicationClient.", e); } } return applicationClient; } }
actorSystem = actorSystemLoader.get(); } catch (FlinkException fe) { throw new ProgramInvocationException("Could not start the ActorSystem needed to talk to the " +