Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-34965

optimize code of ServiceType

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • kubernetes
    • 1.9.4
    • None

    Description

      In the class of [ServiceType|https://github.com/apache/flink/blob/bf60c8813598d3119375cec057930240642699d4/flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/services/ServiceType.java
      now the code as below,in ServiceType.java

      .endMetadata()
      .withNewSpec()
      .withType(
      kubernetesJobManagerParameters
      .getRestServiceExposedType()
      .serviceType()
      .getType())
      .withSelector(kubernetesJobManagerParameters.getSelectors())
      .addNewPort()
      .withName(Constants.REST_PORT_NAME) 

      since the process context is in class ServiceType,then the type of service type should get from the self class,Instead of from `kubernetesJobManagerParameters`

      .endMetadata()
      .withNewSpec()
      .withType(
      // modify to
      this .getType())
      .withSelector(kubernetesJobManagerParameters.getSelectors())
      .addNewPort()
      .withName(Constants.REST_PORT_NAME) 

      i think that would be better

      Attachments

        Activity

          People

            Unassigned Unassigned
            baisui bai sui
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified