You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "slfan1989 (via GitHub)" <gi...@apache.org> on 2023/02/27 01:38:08 UTC
[GitHub] [flink] slfan1989 opened a new pull request, #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
slfan1989 opened a new pull request, #22028:
URL: https://github.com/apache/flink/pull/22028
<!--
*Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
*Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
## Contribution Checklist
- Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
- Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
- Each pull request should address only one issue, not mix up code from multiple issues.
- Each commit in the pull request has a meaningful commit message (including the JIRA id)
- Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
**(The sections below can be removed for hotfixes of typos)**
-->
## What is the purpose of the change
JIRA: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
When we use the yarn-session.sh -q command, the basic information of the NM will be printed, and the memory unit is MB. If we have 128GB of memory, it will display 131072 MB. At the same time, if we have multiple NMs, finally totalMemeory doesn't show units.
This jira will use hadoop's StringUtil to format unit output.
## Brief change log
Improve memory unit display.
## Verifying this change
Manually verified.
## 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, Kubernetes/Yarn, 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? no
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on PR #22028:
URL: https://github.com/apache/flink/pull/22028#issuecomment-1465524698
@1996fanrui Can you help review this PR again? Thank you very much!
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] huwh commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "huwh (via GitHub)" <gi...@apache.org>.
huwh commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1160704473
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -1265,11 +1266,9 @@ private ApplicationReport startAppMaster(
if (appState != lastAppState) {
LOG.info("Deploying cluster, current state " + appState);
}
- if (System.currentTimeMillis() - lastLogTime > 60000) {
- lastLogTime = System.currentTimeMillis();
+ if (System.currentTimeMillis() - startTime > 60000) {
LOG.info(
- "Deployment took more than {} seconds. Please check if the requested resources are available in the YARN cluster",
- (lastLogTime - startTime) / 1000);
+ "Deployment took more than 60 seconds. Please check if the requested resources are available in the YARN cluster");
Review Comment:
@slfan1989 Never mind.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on PR #22028:
URL: https://github.com/apache/flink/pull/22028#issuecomment-1451097816
@flinkbot run azure
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on PR #22028:
URL: https://github.com/apache/flink/pull/22028#issuecomment-1451118911
@flinkbot run azure
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] 1996fanrui commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1132185351
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -170,6 +171,8 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
private YarnConfigOptions.UserJarInclusion userJarInclusion;
+ private static final long BYTES_IN_MB = 1024 * 1024;
+
Review Comment:
```suggestion
```
It can be deleted.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1160653403
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -1265,11 +1266,9 @@ private ApplicationReport startAppMaster(
if (appState != lastAppState) {
LOG.info("Deploying cluster, current state " + appState);
}
- if (System.currentTimeMillis() - lastLogTime > 60000) {
- lastLogTime = System.currentTimeMillis();
+ if (System.currentTimeMillis() - startTime > 60000) {
LOG.info(
- "Deployment took more than {} seconds. Please check if the requested resources are available in the YARN cluster",
- (lastLogTime - startTime) / 1000);
+ "Deployment took more than 60 seconds. Please check if the requested resources are available in the YARN cluster");
Review Comment:
@1996fanrui @huwh Sorry, I didn't see the feedback question. When I rebase the master code later, I will be more careful.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] huwh commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "huwh (via GitHub)" <gi...@apache.org>.
huwh commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1146026138
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -1265,11 +1266,9 @@ private ApplicationReport startAppMaster(
if (appState != lastAppState) {
LOG.info("Deploying cluster, current state " + appState);
}
- if (System.currentTimeMillis() - lastLogTime > 60000) {
- lastLogTime = System.currentTimeMillis();
+ if (System.currentTimeMillis() - startTime > 60000) {
LOG.info(
- "Deployment took more than {} seconds. Please check if the requested resources are available in the YARN cluster",
- (lastLogTime - startTime) / 1000);
+ "Deployment took more than 60 seconds. Please check if the requested resources are available in the YARN cluster");
Review Comment:
can i ask why do we need change this log report?
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] 1996fanrui merged pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui merged PR #22028:
URL: https://github.com/apache/flink/pull/22028
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on PR #22028:
URL: https://github.com/apache/flink/pull/22028#issuecomment-1447328496
@flinkbot run azure
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] 1996fanrui commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1123963326
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -1441,13 +1444,17 @@ public String getClusterDescription() {
totalMemory += res.getMemory();
totalCores += res.getVirtualCores();
ps.format(format, "NodeID", rep.getNodeId());
- ps.format(format, "Memory", res.getMemory() + " MB");
+ ps.format(format, "Memory", getDisplayMemory(res.getMemory()));
Review Comment:
I prefer using the `MemorySize of flink` instead of `StringUtils.byteDesc of hadoop`, because flink already has similar feature. WDYT?
```suggestion
ps.format(format, "Memory", MemorySize.ofMebiBytes(128).toHumanReadableString()));
```
And I have a demo here.

##########
flink-yarn/src/test/java/org/apache/flink/yarn/YarnClusterDescriptorTest.java:
##########
@@ -912,4 +913,17 @@ private Map<String, String> getTestMasterEnv(
appId.toString());
}
}
+
+ @Test
+ public void testByteDesc() {
+ long bytesInMB = 1024 * 1024;
+ // 128 MB
+ assertThat(StringUtils.byteDesc(bytesInMB * 128)).isEqualTo("128 MB");
+ // 512 MB
+ assertThat(StringUtils.byteDesc(bytesInMB * 512)).isEqualTo("512 MB");
+ // 1 GB
+ assertThat(StringUtils.byteDesc(bytesInMB * 1024)).isEqualTo("1 GB");
+ // 128 GB
+ assertThat(StringUtils.byteDesc(bytesInMB * 131072)).isEqualTo("128 GB");
+ }
Review Comment:
Flink unit test shouldn't check the feature of others services, such as: yarn, hdfs, zookeeper and jdk.
Flink unit test should check the feature in the flink side.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on PR #22028:
URL: https://github.com/apache/flink/pull/22028#issuecomment-1479403111
@1996fanrui Thank you very much for helping to review the code! I have rebase and force-push the code.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1123982178
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -1441,13 +1444,17 @@ public String getClusterDescription() {
totalMemory += res.getMemory();
totalCores += res.getVirtualCores();
ps.format(format, "NodeID", rep.getNodeId());
- ps.format(format, "Memory", res.getMemory() + " MB");
+ ps.format(format, "Memory", getDisplayMemory(res.getMemory()));
Review Comment:
I will modify the code.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] huwh commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "huwh (via GitHub)" <gi...@apache.org>.
huwh commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1147075029
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -1265,11 +1266,9 @@ private ApplicationReport startAppMaster(
if (appState != lastAppState) {
LOG.info("Deploying cluster, current state " + appState);
}
- if (System.currentTimeMillis() - lastLogTime > 60000) {
- lastLogTime = System.currentTimeMillis();
+ if (System.currentTimeMillis() - startTime > 60000) {
LOG.info(
- "Deployment took more than {} seconds. Please check if the requested resources are available in the YARN cluster",
- (lastLogTime - startTime) / 1000);
+ "Deployment took more than 60 seconds. Please check if the requested resources are available in the YARN cluster");
Review Comment:
@1996fanrui Thanks for your attention.
This will print log in every loop(250 milliseconds) if JobManager not started in 60 seconds.
We reduced the frequency of printing logs in https://issues.apache.org/jira/browse/FLINK-30517
If these changes are not expected, Should I submit a pr to fix it?
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] 1996fanrui commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1147080385
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -1265,11 +1266,9 @@ private ApplicationReport startAppMaster(
if (appState != lastAppState) {
LOG.info("Deploying cluster, current state " + appState);
}
- if (System.currentTimeMillis() - lastLogTime > 60000) {
- lastLogTime = System.currentTimeMillis();
+ if (System.currentTimeMillis() - startTime > 60000) {
LOG.info(
- "Deployment took more than {} seconds. Please check if the requested resources are available in the YARN cluster",
- (lastLogTime - startTime) / 1000);
+ "Deployment took more than 60 seconds. Please check if the requested resources are available in the YARN cluster");
Review Comment:
Sorry.
From #21569 , I think this change is caused by rebase master. You can fix it, and please cc me after the PR is ready. And sorry again for the mistake.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] 1996fanrui commented on pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui commented on PR #22028:
URL: https://github.com/apache/flink/pull/22028#issuecomment-1482430280
#22260 reverted some unexpected changes of this PR.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on PR #22028:
URL: https://github.com/apache/flink/pull/22028#issuecomment-1452782443
@1996fanrui Can you help review this pr? Thank you very much!
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] 1996fanrui commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1147066605
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -844,7 +846,7 @@ private ApplicationReport startAppMaster(
final ApplicationId appId = appContext.getApplicationId();
- // ------------------ Add Zookeeper namespace to local flinkConfiguration ------
+ // ------------------ Add Zookeeper namespace to local flinkConfiguraton ------
Review Comment:
This line shouldn't be changed as well.
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -1265,11 +1266,9 @@ private ApplicationReport startAppMaster(
if (appState != lastAppState) {
LOG.info("Deploying cluster, current state " + appState);
}
- if (System.currentTimeMillis() - lastLogTime > 60000) {
- lastLogTime = System.currentTimeMillis();
+ if (System.currentTimeMillis() - startTime > 60000) {
LOG.info(
- "Deployment took more than {} seconds. Please check if the requested resources are available in the YARN cluster",
- (lastLogTime - startTime) / 1000);
+ "Deployment took more than 60 seconds. Please check if the requested resources are available in the YARN cluster");
Review Comment:
I guess there is a `while(true)`, so the 60s can work well. And please @slfan1989 help double check.
Anyway, I think it was my mistake, this PR should only improve the memory unit and shouldn't include other changes.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] 1996fanrui commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1147080699
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -844,7 +846,7 @@ private ApplicationReport startAppMaster(
final ApplicationId appId = appContext.getApplicationId();
- // ------------------ Add Zookeeper namespace to local flinkConfiguration ------
+ // ------------------ Add Zookeeper namespace to local flinkConfiguraton ------
Review Comment:
@huwh Could you fix it as well?
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1132205743
##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -170,6 +171,8 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
private YarnConfigOptions.UserJarInclusion userJarInclusion;
+ private static final long BYTES_IN_MB = 1024 * 1024;
+
Review Comment:
Thanks for your suggestion, I will modify the code.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #22028:
URL: https://github.com/apache/flink/pull/22028#issuecomment-1445547559
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "08c662fee24f32931227f95dc333471e4676e5f1",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "08c662fee24f32931227f95dc333471e4676e5f1",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 08c662fee24f32931227f95dc333471e4676e5f1 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on PR #22028:
URL: https://github.com/apache/flink/pull/22028#issuecomment-1447722200
@flinkbot run azure
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1123981772
##########
flink-yarn/src/test/java/org/apache/flink/yarn/YarnClusterDescriptorTest.java:
##########
@@ -912,4 +913,17 @@ private Map<String, String> getTestMasterEnv(
appId.toString());
}
}
+
+ @Test
+ public void testByteDesc() {
+ long bytesInMB = 1024 * 1024;
+ // 128 MB
+ assertThat(StringUtils.byteDesc(bytesInMB * 128)).isEqualTo("128 MB");
+ // 512 MB
+ assertThat(StringUtils.byteDesc(bytesInMB * 512)).isEqualTo("512 MB");
+ // 1 GB
+ assertThat(StringUtils.byteDesc(bytesInMB * 1024)).isEqualTo("1 GB");
+ // 128 GB
+ assertThat(StringUtils.byteDesc(bytesInMB * 131072)).isEqualTo("128 GB");
+ }
Review Comment:
Thanks for your suggestion! I will modify the code.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] slfan1989 commented on a diff in pull request #22028: [FLINK-31230] Improve YarnClusterDescriptor memory unit display.
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on code in PR #22028:
URL: https://github.com/apache/flink/pull/22028#discussion_r1123981772
##########
flink-yarn/src/test/java/org/apache/flink/yarn/YarnClusterDescriptorTest.java:
##########
@@ -912,4 +913,17 @@ private Map<String, String> getTestMasterEnv(
appId.toString());
}
}
+
+ @Test
+ public void testByteDesc() {
+ long bytesInMB = 1024 * 1024;
+ // 128 MB
+ assertThat(StringUtils.byteDesc(bytesInMB * 128)).isEqualTo("128 MB");
+ // 512 MB
+ assertThat(StringUtils.byteDesc(bytesInMB * 512)).isEqualTo("512 MB");
+ // 1 GB
+ assertThat(StringUtils.byteDesc(bytesInMB * 1024)).isEqualTo("1 GB");
+ // 128 GB
+ assertThat(StringUtils.byteDesc(bytesInMB * 131072)).isEqualTo("128 GB");
+ }
Review Comment:
Thank you for your suggestion!
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org