flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uce <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2354] Add job graph and checkpoint reco...
Date Wed, 07 Oct 2015 14:50:29 GMT
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1153#discussion_r41399491
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/StandaloneSubmittedJobGraphs.java
---
    @@ -0,0 +1,65 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.runtime.jobmanager;
    +
    +import org.apache.flink.api.common.JobID;
    +import org.apache.flink.runtime.jobgraph.JobGraph;
    +
    +import java.util.Collections;
    +import java.util.List;
    +
    +/**
    + * {@link SubmittedJobGraph} instances for JobManagers running in {@link RecoveryMode#STANDALONE}.
    + *
    + * <p>All operations are NoOps, because {@link JobGraph} instances cannot be recovered
in this
    + * recovery mode.
    + */
    +public class StandaloneSubmittedJobGraphs implements SubmittedJobGraphs {
    +
    +	@Override
    +	public void start(SubmittedJobGraphListener jobGraphListener) throws Exception {
    +		// Nothing to do
    +	}
    +
    +	@Override
    +	public void stop() {
    +		// Nothing to do
    +	}
    +
    +	@Override
    +	public void putJobGraph(SubmittedJobGraph jobGraph) throws Exception {
    +		// Nothing to do
    +	}
    +
    +	@Override
    +	public void removeJobGraph(JobID jobId) throws Exception {
    +		// Nothing to do
    +	}
    +
    +	@Override
    +	public SubmittedJobGraph recoverJobGraph(JobID jobId) throws Exception {
    +		throw new IllegalStateException("StandaloneSubmittedJobGraphs cannot recover job graphs.
" +
    +				"How did you end up here?");
    +	}
    +
    +	@Override
    +	public List<SubmittedJobGraph> recoverJobGraphs() throws Exception {
    +		return Collections.emptyList();
    --- End diff --
    
    Resolved (returning an Optional)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message