You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "chl-wxp (via GitHub)" <gi...@apache.org> on 2026/04/27 04:53:05 UTC
[I] [Bug] [Zeta] Get the read and write rate in scientific notation [seatunnel]
chl-wxp opened a new issue, #10823:
URL: https://github.com/apache/seatunnel/issues/10823
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
### What happened
When I get the read and write rate metrics, scientific notation appears as shown in the screenshot:
<img width="1081" height="712" alt="Image" src="https://github.com/user-attachments/assets/a936452b-48fa-47a3-b07e-ec14e49aca7d" />
### SeaTunnel Version
2.3.13
### SeaTunnel Config
```conf
env {
"job.mode"="BATCH"
"job.name"="10"
}
source {
Jdbc {
url="jdbc:mysql://127.0.0.1:3306/whl?useUnicode=true&rewriteBatchedStatements=true&serverTimezone=Asia%2FShanghai&zeroDateTimeBehavior=convertToNull&characterEncoding=utf-8&useSSL=false"
driver="com.mysql.jdbc.Driver"
user="xxx"
password="xxxxxxx"
query="SELECT `id`,`name`,`gender`,`birth_date`,`id_number`,`phone_number`,`email`,`home_address`,`marital_status`,`education`,`major`,`graduate_school`,`work_experience`,`position`,`company_name`,`join_date`,`leave_date`,`monthly_salary`,`social_security_number`,`emergency_contact`,`emergency_contact_phone`,`is_party_member`,`health_status`,`height`,`weight`,`blood_type`,`household_registration_address`,`current_address`,`hobbies`,`remarks`,`is_employed`,`employee_number`,`department`,`work_location`,`bank_account_number`,`bank_name`,`skills`,`certificates`,`social_media_account`,`created_at`,`updated_at` FROM `qjq`.`personnel_information_1000w` WHERE 1=1 AND id < 1000000 and id > 10"
"fetch_size"="100000"
}
}
transform {
}
sink {
Console{}
}
```
### Running Command
```shell
./seatunnel.sh -c test/config
```
### Error Exception
```log
none
```
### Zeta or Flink or Spark Version
2.3.13
### Java or Scala Version
1.8
### Screenshots
_No response_
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Zeta] Get the read and write rate in scientific notation [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10823:
URL: https://github.com/apache/seatunnel/issues/10823#issuecomment-4376680972
Thanks for opening PR #10824. I rechecked the current scope against this issue, and it stays aligned with the actual problem path here.
In the current code, `BaseService.metricsToJsonObject(...)` still serializes numeric metric values through the default string conversion path, which is exactly why the REST layer can emit scientific notation even though the underlying counters are fine. Your PR keeps the fix on that presentation path and adds focused coverage for plain-string serialization, which is the right direction for this issue.
Let's continue the detailed review in the PR thread and keep this issue open until the fix lands in `dev`. Thanks again for driving it forward.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Zeta] Get the read and write rate in scientific notation [seatunnel]
Posted by "chl-wxp (via GitHub)" <gi...@apache.org>.
chl-wxp closed issue #10823: [Bug] [Zeta] Get the read and write rate in scientific notation
URL: https://github.com/apache/seatunnel/issues/10823
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Zeta] Get the read and write rate in scientific notation [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10823:
URL: https://github.com/apache/seatunnel/issues/10823#issuecomment-4324343347
Thanks for reporting this with the version and config details.
I traced the current metrics aggregation / REST formatting path in the current `dev` branch, and this looks like a real formatting bug rather than a problem in the underlying read/write counters.
The likely path is that rate metrics are aggregated as `Double` values, and the REST metrics response finally serializes them with default string formatting. For very small or very large rates, that can surface as scientific notation. So the job behavior itself is not necessarily wrong, but the presentation layer is not formatting the metric in a user-friendly way.
If the value you are reading comes from the Web / REST metrics view, that is the path I would expect to be affected.
As a temporary workaround, please treat the returned value as a numeric metric and format it on the client side if you control the consumer. I do not see a current `dev`-side fix linked to this issue yet, so this is worth keeping open for follow-up. A PR is also welcome if you would like to help adjust the metrics formatting path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org