From issues-return-168974-archive-asf-public=cust-asf.ponee.io@flink.apache.org Mon May 28 10:29:10 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B42D7180677 for ; Mon, 28 May 2018 10:29:09 +0200 (CEST) Received: (qmail 56340 invoked by uid 500); 28 May 2018 08:29:08 -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 56331 invoked by uid 99); 28 May 2018 08:29:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 May 2018 08:29:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 620DFC0101 for ; Mon, 28 May 2018 08:29:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id F0gIJNiKs0Db for ; Mon, 28 May 2018 08:29:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 778455F24C for ; Mon, 28 May 2018 08:29:06 +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 AE76EE0CCC for ; Mon, 28 May 2018 08:29:00 +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 4EA4620EAB for ; Mon, 28 May 2018 08:29:00 +0000 (UTC) Date: Mon, 28 May 2018 08:29:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-9143) Restart strategy defined in flink-conf.yaml is ignored MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-9143?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1649= 2398#comment-16492398 ]=20 ASF GitHub Bot commented on FLINK-9143: --------------------------------------- Github user yuqi1129 commented on a diff in the pull request: https://github.com/apache/flink/pull/5846#discussion_r191143746 =20 --- Diff: flink-clients/src/main/java/org/apache/flink/client/program/C= lusterClient.java --- @@ -896,6 +898,10 @@ public static JobGraph getJobGraph(Configuration f= linkConfig, FlinkPlan optPlan, =09=09=09job =3D gen.compileJobGraph((OptimizedPlan) optPlan); =09=09} =20 +=09=09// if we disable checkpoint and do not set restart strategy, Re= start strategy will be set as in flink-conf.yaml +=09=09// in flip6, jobmaster do not set this conf, so we have set thi= s conf here. --- End diff -- =20 before flip6, cluster site will set restart strategy: ``` val restartStrategy =3D Option(jobGraph.getSerializedExecutionConfig() .deserializeValue(userCodeLoader) .getRestartStrategy()) .map(RestartStrategyFactory.createRestartStrategy) .filter(p =3D> p !=3D null) match { case Some(strategy) =3D> strategy case None =3D> restartStrategyFactory.createRestartStrategy= () } ``` in Jobmanger.java =20 in flip6, cluster will directly use jobgraph deserialized from client s= ize > Restart strategy defined in flink-conf.yaml is ignored > ------------------------------------------------------ > > Key: FLINK-9143 > URL: https://issues.apache.org/jira/browse/FLINK-9143 > Project: Flink > Issue Type: Bug > Components: Configuration > Affects Versions: 1.4.2 > Reporter: Alex Smirnov > Assignee: yuqi > Priority: Major > Attachments: execution_config.png, jobmanager.log, jobmanager.png > > > Restart strategy defined in flink-conf.yaml is disregarded,=C2=A0when use= r enables checkpointing. > Steps to reproduce: > 1. Download flink distribution (1.4.2), update flink-conf.yaml: > =C2=A0 > restart-strategy: none > state.backend: rocksdb > state.backend.fs.checkpointdir: [file:///tmp/nfsrecovery/flink-checkpoin= ts-metadata] > state.backend.rocksdb.checkpointdir: [file:///tmp/nfsrecovery/flink-chec= kpoints-rocksdb] > =C2=A0 > 2. create new java project as described at=C2=A0[https://ci.apache.org/p= rojects/flink/flink-docs-release-1.4/quickstart/java_api_quickstart.html] > here's the code: > public class FailedJob > { > =C2=A0 =C2=A0 static final Logger LOGGER =3D LoggerFactory.getLogger(Fai= ledJob.class); > =C2=A0 =C2=A0 public static void main( String[] args ) throws Exception > =C2=A0 =C2=A0 { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 final StreamExecutionEnvironment env =3D Str= eamExecutionEnvironment.getExecutionEnvironment(); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 env.enableCheckpointing(5000, CheckpointingM= ode.EXACTLY_ONCE); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 DataStream stream =3D env.fromCollec= tion(Arrays.asList("test")); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 stream.map(new MapFunction()= { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 @Override > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 public String map(String obj) > { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 throw new NullP= ointerException("NPE"); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } > =C2=A0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 }); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 env.execute("Failed job"); > =C2=A0 =C2=A0 } > } > =C2=A0 > 3. Compile: mvn clean package; submit it to the cluster > =C2=A0 > 4. Go to Job Manager configuration in WebUI, ensure settings from flink-= conf.yaml is there (screenshot attached) > =C2=A0 > 5. Go to Job's configuration, see Execution Configuration section > =C2=A0 > *Expected result*: restart strategy as defined in flink-conf.yaml > =C2=A0 > *Actual result*:=C2=A0Restart with fixed delay (10000 ms). #2147483647 r= estart attempts. > =C2=A0 > =C2=A0 > see attached screenshots and jobmanager log (line 1 and 31) > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)