Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature][Flink] Add external configuration parameters #5480

Merged
merged 17 commits into from
Oct 26, 2023

Conversation

zhilinli123
Copy link
Contributor

Purpose of this pull request

Check list

@ruanwenjun
Copy link
Member

ruanwenjun commented Sep 14, 2023

LGTM, please add doc about this.
https://github.com/apache/seatunnel/blob/dev/docs/en/other-engine/flink.md

ruanwenjun
ruanwenjun previously approved these changes Sep 14, 2023
Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhilinli123
Copy link
Contributor Author

There is a problem with some parameter configuration. I am working on it. Do not merge it
@ruanwenjun @TyrantLucifer

@TyrantLucifer
Copy link
Member

There is a problem with some parameter configuration. I am working on it. Do not merge it @ruanwenjun @TyrantLucifer

Waiting CI/CD and offer some screenshots to verify it worked.

Copy link
Member

@TyrantLucifer TyrantLucifer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix dead links in your docs.

@zhilinli123 zhilinli123 reopened this Sep 15, 2023
@zhilinli123
Copy link
Contributor Author

PTAL: @TyrantLucifer @ruanwenjun I added some CI

@TyrantLucifer
Copy link
Member

PTAL: @TyrantLucifer @ruanwenjun I added some CI

Overall LGTM, but the test case that you added I didn't any way to see the parameter worded really. Could you please compiled the project and try verify it in a local flink env and offer the screen shots for it?

@zhilinli123
Copy link
Contributor Author

zhilinli123 commented Sep 17, 2023

conf file

env {
  # You can set flink configuration here
  execution.parallelism = 2
  job.mode = "STREAMING"
  flink.execution.checkpointing.interval = 5000
  flink.execution.checkpointing.unaligned.enabled = true
  flink.execution.checkpointing.aligned-checkpoint-timeout = 100000
  flink.jobstore.cache-size = 52428801
  flink.state.backend.rocksdb.predefined-options = SPINNING_DISK_OPTIMIZED_HIGH_MEM
}

source {
  # This is a example source plugin **only for test and demonstrate the feature source plugin**
  FakeSource {
    parallelism = 2
    result_table_name = "fake"
    row.num = 16
    schema = {
      fields {
        name = "string"
        age = "int"
      }
    }
  }

  # If you would like to get more information about how to configure seatunnel and see full list of source plugins,
  # please go to https://seatunnel.apache.org/docs/category/source-v2
}

transform {

  # If you would like to get more information about how to configure seatunnel and see full list of transform plugins,
  # please go to https://seatunnel.apache.org/docs/category/transform-v2
}

sink {
  Console {
    parallelism = 3
  }

  # If you would like to get more information about how to configure seatunnel and see full list of sink plugins,
  # please go to https://seatunnel.apache.org/docs/category/sink-v2
}

TestFlinkParameter

image
image

org.apache.seatunnel.example.flink.v2.SeaTunnelApiExample

image
PTAL: @TyrantLucifer @ruanwenjun @EricJoy2048 I added some screenshots to demonstrate this

@Hisoka-X Hisoka-X changed the title [feature][flink][job][conf] Add external configuration parameters [Feature][Flink] Add external configuration parameters Sep 19, 2023
@Hisoka-X Hisoka-X added the feature New feature label Sep 19, 2023
@Hisoka-X Hisoka-X added this to the 2.3.4 milestone Sep 19, 2023
@zhilinli123 zhilinli123 reopened this Sep 21, 2023
@TyrantLucifer
Copy link
Member

conf file

env {
  # You can set flink configuration here
  execution.parallelism = 2
  job.mode = "STREAMING"
  flink.execution.checkpointing.interval = 5000
  flink.execution.checkpointing.unaligned.enabled = true
  flink.execution.checkpointing.aligned-checkpoint-timeout = 100000
  flink.jobstore.cache-size = 52428801
  flink.state.backend.rocksdb.predefined-options = SPINNING_DISK_OPTIMIZED_HIGH_MEM
}

source {
  # This is a example source plugin **only for test and demonstrate the feature source plugin**
  FakeSource {
    parallelism = 2
    result_table_name = "fake"
    row.num = 16
    schema = {
      fields {
        name = "string"
        age = "int"
      }
    }
  }

  # If you would like to get more information about how to configure seatunnel and see full list of source plugins,
  # please go to https://seatunnel.apache.org/docs/category/source-v2
}

transform {

  # If you would like to get more information about how to configure seatunnel and see full list of transform plugins,
  # please go to https://seatunnel.apache.org/docs/category/transform-v2
}

sink {
  Console {
    parallelism = 3
  }

  # If you would like to get more information about how to configure seatunnel and see full list of sink plugins,
  # please go to https://seatunnel.apache.org/docs/category/sink-v2
}

TestFlinkParameter

image image

org.apache.seatunnel.example.flink.v2.SeaTunnelApiExample

image PTAL: @TyrantLucifer @ruanwenjun @EricJoy2048 I added some screenshots to demonstrate this

I think you should ensure the parameters injected in real flink jobs, not only codes. You should submit a seatunnel on flink engine and make a snapshot to verify it worked.

@zhilinli123
Copy link
Contributor Author

zhilinli123 commented Oct 17, 2023

conf file

env {
  # You can set flink configuration here
  execution.parallelism = 2
  job.mode = "STREAMING"
  flink.execution.checkpointing.interval = 5000
  flink.execution.checkpointing.unaligned.enabled = true
  flink.execution.checkpointing.aligned-checkpoint-timeout = 100000
  flink.jobstore.cache-size = 52428801
  flink.state.backend.rocksdb.predefined-options = SPINNING_DISK_OPTIMIZED_HIGH_MEM
}

source {
  # This is a example source plugin **only for test and demonstrate the feature source plugin**
  FakeSource {
    parallelism = 2
    result_table_name = "fake"
    row.num = 16
    schema = {
      fields {
        name = "string"
        age = "int"
      }
    }
  }

  # If you would like to get more information about how to configure seatunnel and see full list of source plugins,
  # please go to https://seatunnel.apache.org/docs/category/source-v2
}

transform {

  # If you would like to get more information about how to configure seatunnel and see full list of transform plugins,
  # please go to https://seatunnel.apache.org/docs/category/transform-v2
}

sink {
  Console {
    parallelism = 3
  }

  # If you would like to get more information about how to configure seatunnel and see full list of sink plugins,
  # please go to https://seatunnel.apache.org/docs/category/sink-v2
}

TestFlinkParameter

image image

org.apache.seatunnel.example.flink.v2.SeaTunnelApiExample

image PTAL: @TyrantLucifer @ruanwenjun @EricJoy2048 I added some screenshots to demonstrate this

I think you should ensure the parameters injected in real flink jobs, not only codes. You should submit a seatunnel on flink engine and make a snapshot to verify it worked.
image
image
image
image

I provide some screenshots of the flink run web Ui

Copy link
Member

@EricJoy2048 EricJoy2048 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@zhilinli123
Copy link
Contributor Author

PTAL: @Hisoka-X

Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Thanks @zhilinli123 .

@Hisoka-X
Copy link
Member

@TyrantLucifer Could you take a look again?

@hailin0
Copy link
Member

hailin0 commented Oct 25, 2023

LGTM

@Hisoka-X Hisoka-X merged commit 90bc2fe into apache:dev Oct 26, 2023
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature flink
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants