incubator-streampark icon indicating copy to clipboard operation
incubator-streampark copied to clipboard

[Bug] app_name

Open jweicai opened this issue 1 year ago • 10 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Java Version

No response

Scala Version

2.12.x

StreamPark Version

2.1.2

Flink Version

1.17.1

deploy mode

None

What happened

When creating a sparksql task, app_name can be a very long string. However, when you copy a task and have a very long app_name, an error will be reported, and the error level is relatively high. This should not be a reasonable operation.

Error Exception

internal server error: ### Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'cluster_id' at row 1 ### The error may exist in org/apache/streampark/console/core/mapper/ApplicationMapper.java (best guess) ### The error may involve org.apache.streampark.console.core.mapper.ApplicationMapper.insert-Inline ### The error occurred while setting parameters ### SQL: INSERT INTO t_flink_app ( team_id, job_type, user_id, job_name, version_id, cluster_id, flink_image, k8s_namespace, state, `release`, restart_size, option_state, alert_id, args, options, hot_params, resolve_order, execution_mode, dynamic_properties, app_type, tracking, cp_max_failure_interval, cp_failure_rate_interval, cp_failure_action, description, create_time, k8s_hadoop_integration, tags ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) ### Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'cluster_id' at row 1 ; Data truncation: Data too long for column 'cluster_id' at row 1; nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'cluster_id' at row 1

Screenshots

No response

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!(您是否要贡献这个PR?)

Code of Conduct

jweicai avatar Jan 15 '24 02:01 jweicai

hi,i want to fix this bug。

ihadoop avatar Feb 14 '24 12:02 ihadoop

hi,i want to fix this bug。

Looking forward to your PR to fix this bug! 🛠️

wolfboys avatar Feb 15 '24 07:02 wolfboys

hi,i want to fix this bug。

Looking forward to your PR to fix this bug! 🛠️

image

hi,i viewed the code and found that when job is not session model, original job name will be set as cluster_id. i want to know when is not session model ,this value can be set as null

ihadoop avatar Feb 16 '24 08:02 ihadoop

hi,i want to fix this bug。

Looking forward to your PR to fix this bug! 🛠️

image

hi,i viewed the code and found that when job is not session model, original job name will be set as cluster_id. i want to know when is not session model ,this value can be set as null

Seems to be coming from the front end, maybe you need to debug to make sure

caicancai avatar Feb 18 '24 05:02 caicancai

hi,i want to fix this bug。

Looking forward to your PR to fix this bug! 🛠️

image hi,i viewed the code and found that when job is not session model, original job name will be set as cluster_id. i want to know when is not session model ,this value can be set as null

Seems to be coming from the front end, maybe you need to debug to make sure

it’s not from front end,i means why set jobname as cluster_id if is not session model

ihadoop avatar Feb 18 '24 06:02 ihadoop

I didn't modify the cluster_id, I just copied a task and filled in the app_name I needed.

在 2024-02-18 14:41:37,"sunshine" @.***> 写道:

hi,i want to fix this bug。

Looking forward to your PR to fix this bug! ️

hi,i viewed the code and found that when job is not session model, original job name will be set as cluster_id. i want to know when is not session model ,this value can be set as null

Seems to be coming from the front end, maybe you need to debug to make sure

it’s not from front end,i means why set jobname as cluster_id if is not session model

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

jweicai avatar Feb 18 '24 06:02 jweicai

I didn't modify the cluster_id, I just copied a task and filled in the app_name I needed. 在 2024-02-18 14:41:37,"sunshine" @.> 写道: hi,i want to fix this bug。 Looking forward to your PR to fix this bug! ️ hi,i viewed the code and found that when job is not session model, original job name will be set as cluster_id. i want to know when is not session model ,this value can be set as null Seems to be coming from the front end, maybe you need to debug to make sure it’s not from front end,i means why set jobname as cluster_id if is not session model — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

but if old is session mode,it will set new job name as cluster_id,i want to know why ?

newApp.setClusterId(
      FlinkExecutionMode.isSessionMode(oldApp.getFlinkExecutionMode())
          ? oldApp.getClusterId()
          : jobName);

ihadoop avatar Feb 18 '24 14:02 ihadoop

I just find this bug I don’t know why

---- Replied Message ---- | From | @.> | | Date | 02/18/2024 22:03 | | To | apache/incubator-streampark @.> | | Cc | charonjiang @.>, Author @.> | | Subject | Re: [apache/incubator-streampark] [Bug] app_name (Issue #3490) |

I didn't modify the cluster_id, I just copied a task and filled in the app_name I needed. 在 2024-02-18 14:41:37,"sunshine" @.> 写道: hi,i want to fix this bug。 Looking forward to your PR to fix this bug! ️ hi,i viewed the code and found that when job is not session model, original job name will be set as cluster_id. i want to know when is not session model ,this value can be set as null Seems to be coming from the front end, maybe you need to debug to make sure it’s not from front end,i means why set jobname as cluster_id if is not session model — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

but if old is session mode,it will set new job name as cluster_id,i want to know why ?

newApp.setClusterId( FlinkExecutionMode.isSessionMode(oldApp.getFlinkExecutionMode()) ? oldApp.getClusterId() : jobName);

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

jweicai avatar Feb 18 '24 14:02 jweicai

I didn't modify the cluster_id, I just copied a task and filled in the app_name I needed. 在 2024-02-18 14:41:37,"sunshine" @.> 写道: hi,i want to fix this bug。 Looking forward to your PR to fix this bug! ️ hi,i viewed the code and found that when job is not session model, original job name will be set as cluster_id. i want to know when is not session model ,this value can be set as null Seems to be coming from the front end, maybe you need to debug to make sure it’s not from front end,i means why set jobname as cluster_id if is not session model — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: _@**.**_>

but if old is session mode,it will set new job name as cluster_id,i want to know why ?

newApp.setClusterId(
      FlinkExecutionMode.isSessionMode(oldApp.getFlinkExecutionMode())
          ? oldApp.getClusterId()
          : jobName);

?I'll take a look at it later

caicancai avatar Feb 19 '24 02:02 caicancai

I didn't modify the cluster_id, I just copied a task and filled in the app_name I needed. 在 2024-02-18 14:41:37,"sunshine" @.> 写道: hi,i want to fix this bug。 Looking forward to your PR to fix this bug! ️ hi,i viewed the code and found that when job is not session model, original job name will be set as cluster_id. i want to know when is not session model ,this value can be set as null Seems to be coming from the front end, maybe you need to debug to make sure it’s not from front end,i means why set jobname as cluster_id if is not session model — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: _@**.**_>

but if old is session mode,it will set new job name as cluster_id,i want to know why ?

newApp.setClusterId(
      FlinkExecutionMode.isSessionMode(oldApp.getFlinkExecutionMode())
          ? oldApp.getClusterId()
          : jobName);

?I'll take a look at it later

????

ihadoop avatar Feb 23 '24 07:02 ihadoop

fixed

wolfboys avatar Mar 30 '24 09:03 wolfboys