You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GJL <gi...@git.apache.org> on 2018/02/25 12:21:10 UTC

[GitHub] flink pull request #5577: [FLINK-8776][flip6] Use correct port for job submi...

GitHub user GJL opened a pull request:

    https://github.com/apache/flink/pull/5577

    [FLINK-8776][flip6] Use correct port for job submission from Web UI

    ## What is the purpose of the change
    
    *Use correct port for job submission from Web UI when Flink is deployed in YARN session mode.*
    
    cc: @tillrohrmann 
    
    ## Brief change log
      - *Use address of local WebMonitorEndpoint for the job submission from the Web UI.*
      - *Rename TestingLeaderRetrievalService to SettableLeaderRetrievalService and move class out of test directory.*
    
    ## Verifying this change
    
    This change added tests and can be verified as follows:
    
      - *Added unit tests for SettableLeaderRetrievalService.*
      - *Manually submitted Job in YARN session.*
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (yes / **no**)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
      - The serializers: (yes / **no** / don't know)
      - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (**yes** / no / don't know)
      - The S3 file system connector: (yes / **no** / don't know)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (yes / **no**)
      - If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not documented)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/GJL/flink FLINK-8776

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/5577.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5577
    
----
commit 6890ff359b557e86b10877af84ec0277805135c1
Author: gyao <ga...@...>
Date:   2018-02-25T11:53:53Z

    [FLINK-8776][flip6] Use correct port for job submission from Web UI.
    
    Use address of local WebMonitorEndpoint for the job submission from the Web UI.
    Rename TestingLeaderRetrievalService to SettableLeaderRetrievalService and move
    class out of test directory.

----


---

[GitHub] flink pull request #5577: [FLINK-8776][flip6] Use correct port for job submi...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/5577


---

[GitHub] flink pull request #5577: [FLINK-8776][flip6] Use correct port for job submi...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5577#discussion_r170526240
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/SettableLeaderRetrievalService.java ---
    @@ -16,36 +16,34 @@
      * limitations under the License.
      */
     
    -package org.apache.flink.runtime.leaderelection;
    +package org.apache.flink.runtime.leaderretrieval;
     
    -import org.apache.flink.runtime.leaderretrieval.LeaderRetrievalListener;
    -import org.apache.flink.runtime.leaderretrieval.LeaderRetrievalService;
     import org.apache.flink.util.Preconditions;
     
     import java.util.UUID;
     
     /**
    - * Test {@link LeaderRetrievalService} implementation which directly forwards calls of
    + * {@link LeaderRetrievalService} implementation which directly forwards calls of
      * notifyListener to the listener.
      */
    -public class TestingLeaderRetrievalService implements LeaderRetrievalService {
    +public class SettableLeaderRetrievalService implements LeaderRetrievalService {
     
    -	private volatile String leaderAddress;
    -	private volatile UUID leaderSessionID;
    +	private String leaderAddress;
    +	private UUID leaderSessionID;
     
    -	private volatile LeaderRetrievalListener listener;
    +	private LeaderRetrievalListener listener;
     
    -	public TestingLeaderRetrievalService() {
    +	public SettableLeaderRetrievalService() {
     		this(null, null);
     	}
     
    -	public TestingLeaderRetrievalService(String leaderAddress, UUID leaderSessionID) {
    +	public SettableLeaderRetrievalService(String leaderAddress, UUID leaderSessionID) {
    --- End diff --
    
    `Nullable` annotations are missing


---

[GitHub] flink pull request #5577: [FLINK-8776][flip6] Use correct port for job submi...

Posted by GJL <gi...@git.apache.org>.
Github user GJL commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5577#discussion_r170537784
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/SettableLeaderRetrievalService.java ---
    @@ -16,36 +16,34 @@
      * limitations under the License.
      */
     
    -package org.apache.flink.runtime.leaderelection;
    +package org.apache.flink.runtime.leaderretrieval;
     
    -import org.apache.flink.runtime.leaderretrieval.LeaderRetrievalListener;
    -import org.apache.flink.runtime.leaderretrieval.LeaderRetrievalService;
     import org.apache.flink.util.Preconditions;
     
     import java.util.UUID;
     
     /**
    - * Test {@link LeaderRetrievalService} implementation which directly forwards calls of
    + * {@link LeaderRetrievalService} implementation which directly forwards calls of
      * notifyListener to the listener.
      */
    -public class TestingLeaderRetrievalService implements LeaderRetrievalService {
    +public class SettableLeaderRetrievalService implements LeaderRetrievalService {
     
    -	private volatile String leaderAddress;
    -	private volatile UUID leaderSessionID;
    +	private String leaderAddress;
    +	private UUID leaderSessionID;
     
    -	private volatile LeaderRetrievalListener listener;
    +	private LeaderRetrievalListener listener;
     
    -	public TestingLeaderRetrievalService() {
    +	public SettableLeaderRetrievalService() {
     		this(null, null);
     	}
     
    -	public TestingLeaderRetrievalService(String leaderAddress, UUID leaderSessionID) {
    +	public SettableLeaderRetrievalService(String leaderAddress, UUID leaderSessionID) {
    --- End diff --
    
    fixed


---

[GitHub] flink pull request #5577: [FLINK-8776][flip6] Use correct port for job submi...

Posted by GJL <gi...@git.apache.org>.
Github user GJL commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5577#discussion_r170537772
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/leaderretrieval/SettableLeaderRetrievalServiceTest.java ---
    @@ -0,0 +1,66 @@
    +/*
    + * 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.leaderretrieval;
    +
    +import org.apache.flink.runtime.highavailability.HighAvailabilityServices;
    +import org.apache.flink.runtime.leaderelection.TestingListener;
    +
    +import org.junit.Before;
    +import org.junit.Test;
    +
    +import static org.hamcrest.Matchers.equalTo;
    +import static org.junit.Assert.assertThat;
    +
    +/**
    + * Tests for {@link SettableLeaderRetrievalService}.
    + */
    +public class SettableLeaderRetrievalServiceTest {
    --- End diff --
    
    fixed


---

[GitHub] flink pull request #5577: [FLINK-8776][flip6] Use correct port for job submi...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5577#discussion_r170526651
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/leaderretrieval/SettableLeaderRetrievalServiceTest.java ---
    @@ -0,0 +1,66 @@
    +/*
    + * 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.leaderretrieval;
    +
    +import org.apache.flink.runtime.highavailability.HighAvailabilityServices;
    +import org.apache.flink.runtime.leaderelection.TestingListener;
    +
    +import org.junit.Before;
    +import org.junit.Test;
    +
    +import static org.hamcrest.Matchers.equalTo;
    +import static org.junit.Assert.assertThat;
    +
    +/**
    + * Tests for {@link SettableLeaderRetrievalService}.
    + */
    +public class SettableLeaderRetrievalServiceTest {
    --- End diff --
    
    `TestLogger` missing.


---