From issues-return-146623-archive-asf-public=cust-asf.ponee.io@flink.apache.org Mon Jan 8 13:26:07 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 7748F180607 for ; Mon, 8 Jan 2018 13:26:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6751A160C3F; Mon, 8 Jan 2018 12:26:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AAC0C160C1E for ; Mon, 8 Jan 2018 13:26:06 +0100 (CET) Received: (qmail 8262 invoked by uid 500); 8 Jan 2018 12:26:05 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 8253 invoked by uid 99); 8 Jan 2018 12:26:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2018 12:26:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 51DFEC1968 for ; Mon, 8 Jan 2018 12:26:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.711 X-Spam-Level: X-Spam-Status: No, score=-100.711 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 2nOHu0wFEOAC for ; Mon, 8 Jan 2018 12:26:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 389E15FBA8 for ; Mon, 8 Jan 2018 12:26:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5CFFAE25B6 for ; Mon, 8 Jan 2018 12:26:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6A6C12410E for ; Mon, 8 Jan 2018 12:26:00 +0000 (UTC) Date: Mon, 8 Jan 2018 12:26:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-8299) Retrieve ExecutionResult by REST polling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16316207#comment-16316207 ] ASF GitHub Bot commented on FLINK-8299: --------------------------------------- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/5207#discussion_r160127783 --- Diff: flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java --- @@ -104,11 +122,26 @@ protected JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoad } catch (JobSubmissionException e) { throw new ProgramInvocationException(e); } - // don't return just a JobSubmissionResult here, the signature is lying - // The CliFrontend expects this to be a JobExecutionResult - // TOOD: do not exit this method until job is finished - return new JobExecutionResult(jobGraph.getJobID(), 1, Collections.emptyMap()); + final JobExecutionResult jobExecutionResult = waitForJobExecutionResult(jobGraph.getJobID()); + + if (jobExecutionResult.getSerializedThrowable().isPresent()) { + final SerializedThrowable serializedThrowable = jobExecutionResult.getSerializedThrowable().get(); + final Throwable throwable = serializedThrowable.deserializeError(classLoader); + throw new ProgramInvocationException(throwable); + } + + try { + // don't return just a JobSubmissionResult here, the signature is lying + // The CliFrontend expects this to be a JobExecutionResult + this.lastJobExecutionResult = new SerializedJobExecutionResult( + jobExecutionResult.getJobId(), + jobExecutionResult.getNetRuntime(), + jobExecutionResult.getAccumulatorResults()).toJobExecutionResult(classLoader); --- End diff -- We could also directly use `AccumulatorHelper#deserializeAccumulators`. > Retrieve ExecutionResult by REST polling > ---------------------------------------- > > Key: FLINK-8299 > URL: https://issues.apache.org/jira/browse/FLINK-8299 > Project: Flink > Issue Type: Sub-task > Components: REST > Affects Versions: 1.5.0 > Reporter: Gary Yao > Assignee: Gary Yao > Priority: Blocker > Labels: flip-6 > Fix For: 1.5.0 > > > Retrieve the {{ExecutionResult}} from a finished Flink job via the {{RestClusterClient}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029)