You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/10 13:53:24 UTC

[GitHub] [flink] dawidwys opened a new pull request #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

dawidwys opened a new pull request #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829
 
 
   ## What is the purpose of the change
   
   Make the formatting of MemorySize and Duration a bit nicer in the documentation.
   
   ## Verifying this change
   
   This change added tests:
   * TimeUtilsPrettyPrintingTest
   * MemorySizePrettyPrintingTest
   
   ## 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, Yarn/Mesos, 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? (yes / **no**)
     - If yes, how is the feature documented? (not applicable / **docs** / JavaDocs / not documented)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573045352
 
 
   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit fee72bbaf51f4d910d7185757ba7034c6a19af75 (Fri Jan 10 13:57:14 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] dawidwys closed pull request #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
dawidwys closed pull request #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573052559
 
 
   <!--
   Meta data
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/143899744 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   -->
   ## CI report:
   
   * c289f16e336e54931105f5c3ec143f8a9fd69021 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/143899744) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573052559
 
 
   <!--
   Meta data
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143899744 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144468485 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   -->
   ## CI report:
   
   * c289f16e336e54931105f5c3ec143f8a9fd69021 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143899744) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259) 
   * 3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144468485) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] dawidwys commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
dawidwys commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573548100
 
 
   Hi @xintongsong,
   I am positive that in the docs we should always print only the exact value.
   
   I don't have enough expertise in other places, but personally I am a bit sceptical if it is a good idea to print approximated values. I am fine adjusting my PR so that this logic is used only in the docs, if the approximation is prefferred for the `toString` method.
   
   @azagrebin @tillrohrmann What is your opinion?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on a change in pull request #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#discussion_r366472877
 
 

 ##########
 File path: flink-core/src/test/java/org/apache/flink/configuration/MemorySizePrettyPrintingTest.java
 ##########
 @@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.configuration;
+
+import org.apache.flink.configuration.MemorySize.MemoryUnit;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * Tests for {@link MemorySize#toString()}.
+ */
+@RunWith(Parameterized.class)
+public class MemorySizePrettyPrintingTest {
 
 Review comment:
   `extends TestLogger` is missing.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573052559
 
 
   <!--
   Meta data
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143899744 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   -->
   ## CI report:
   
   * c289f16e336e54931105f5c3ec143f8a9fd69021 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143899744) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573052559
 
 
   <!--
   Meta data
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143899744 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144468485 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   Hash:8d561e4bfa6e371d472b891b162119d7e7c0a311 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/144516034 TriggerType:PUSH TriggerID:8d561e4bfa6e371d472b891b162119d7e7c0a311
   Hash:8d561e4bfa6e371d472b891b162119d7e7c0a311 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4371 TriggerType:PUSH TriggerID:8d561e4bfa6e371d472b891b162119d7e7c0a311
   -->
   ## CI report:
   
   * c289f16e336e54931105f5c3ec143f8a9fd69021 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143899744) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259) 
   * 3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144468485) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357) 
   * 8d561e4bfa6e371d472b891b162119d7e7c0a311 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/144516034) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4371) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] zentol commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
zentol commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573047220
 
 
   This seems to conflict with #10785; @dawidwys @xintongsong could you two sync to figure this out?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on a change in pull request #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#discussion_r366474018
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java
 ##########
 @@ -117,7 +121,30 @@ public boolean equals(Object obj) {
 
 	@Override
 	public String toString() {
-		return bytes + " bytes";
+		List<MemoryUnit> orderedUnits = Arrays.asList(
+			BYTES,
+			KILO_BYTES,
+			MEGA_BYTES,
+			GIGA_BYTES,
+			TERA_BYTES);
+
+		MemoryUnit highestIntegerUnit = IntStream.range(0, orderedUnits.size())
+			.sequential()
+			.filter(idx -> bytes % orderedUnits.get(idx).getMultiplier() != 0)
+			.boxed()
+			.findFirst()
+			.map(idx -> {
+				if (idx == 0) {
+					return orderedUnits.get(0);
+				} else {
+					return orderedUnits.get(idx - 1);
+				}
+			}).orElse(BYTES);
+
+		return String.format(
+			"%d %s",
+			bytes / highestIntegerUnit.getMultiplier(),
+			highestIntegerUnit.getUnits()[1]);
 
 Review comment:
   Since this is a rather complex operation, I would suggest to cache the result similar to what we are doing in `AbstractID`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573052559
 
 
   <!--
   Meta data
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143899744 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144468485 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   Hash:8d561e4bfa6e371d472b891b162119d7e7c0a311 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:8d561e4bfa6e371d472b891b162119d7e7c0a311
   -->
   ## CI report:
   
   * c289f16e336e54931105f5c3ec143f8a9fd69021 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143899744) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259) 
   * 3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144468485) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357) 
   * 8d561e4bfa6e371d472b891b162119d7e7c0a311 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573052559
 
 
   <!--
   Meta data
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143899744 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144468485 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   Hash:8d561e4bfa6e371d472b891b162119d7e7c0a311 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/144516034 TriggerType:PUSH TriggerID:8d561e4bfa6e371d472b891b162119d7e7c0a311
   Hash:8d561e4bfa6e371d472b891b162119d7e7c0a311 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4371 TriggerType:PUSH TriggerID:8d561e4bfa6e371d472b891b162119d7e7c0a311
   -->
   ## CI report:
   
   * c289f16e336e54931105f5c3ec143f8a9fd69021 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143899744) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259) 
   * 3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144468485) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357) 
   * 8d561e4bfa6e371d472b891b162119d7e7c0a311 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/144516034) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4371) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573052559
 
 
   <!--
   Meta data
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143899744 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   -->
   ## CI report:
   
   * c289f16e336e54931105f5c3ec143f8a9fd69021 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143899744) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259) 
   * 3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573052559
 
 
   <!--
   Meta data
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143899744 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144468485 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   Hash:8d561e4bfa6e371d472b891b162119d7e7c0a311 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/144516034 TriggerType:PUSH TriggerID:8d561e4bfa6e371d472b891b162119d7e7c0a311
   Hash:8d561e4bfa6e371d472b891b162119d7e7c0a311 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4371 TriggerType:PUSH TriggerID:8d561e4bfa6e371d472b891b162119d7e7c0a311
   -->
   ## CI report:
   
   * c289f16e336e54931105f5c3ec143f8a9fd69021 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143899744) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259) 
   * 3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144468485) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357) 
   * 8d561e4bfa6e371d472b891b162119d7e7c0a311 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/144516034) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4371) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] xintongsong commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
xintongsong commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-574548126
 
 
   @dawidwys Thanks for asking. What @tillrohrmann said sounds good to me.
   
   My only concern was that, as @tillrohrmann mentioned, it is more difficult to make sure always log MemorySize with some method other than `toString`. If we consider the approximate value as a special format that one should explicitly consent to, then it makes sense to me and I do not have other objections.
   
   +1 for merging this PR as MemorySize prints exact values in `toString`. I'll adjust mine #10785.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573052559
 
 
   <!--
   Meta data
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143899744 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259 TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   Hash:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/144468485 TriggerType:PUSH TriggerID:3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480
   -->
   ## CI report:
   
   * c289f16e336e54931105f5c3ec143f8a9fd69021 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143899744) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4259) 
   * 3ca46b8869aa81fcb4df59a6cd45b6d3b16d7480 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/144468485) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4357) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] dawidwys commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
dawidwys commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-574544636
 
 
   @xintongsong what is your comment to what @tillrohrmann said? Would you be ok with merging this PR first as it prints exact values and later adjusting your #10785 ?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] tillrohrmann commented on a change in pull request #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#discussion_r366473104
 
 

 ##########
 File path: flink-core/src/test/java/org/apache/flink/util/TimeUtilsPrettyPrintingTest.java
 ##########
 @@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.util;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import java.time.Duration;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * Tests for {@link TimeUtils#formatWithHighestUnit(Duration)}.
+ */
+@RunWith(Parameterized.class)
+public class TimeUtilsPrettyPrintingTest {
 
 Review comment:
   Same here `extends TestLogger`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] xintongsong commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
xintongsong commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573274699
 
 
   Thanks for pointing me to this, @zentol.
   
   Hi @dawidwys, thanks for the PR.
   
   I agree it would be nice to have higher granularity unit in the docs. However, `MemorySize#toString` does not only affect the docs, but also logs.
   
   There are cases that memory sizes are derived from a total size and a fraction (e.g. managed memory). In those cases, a memory size could be large but not integer with high granularity units. Therefore, I think it would make sense to print both the exact bytes for accuracy and the coarse high granularity value for readability (as in #10785).
   
   WDYT?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] xintongsong commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
xintongsong commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-574142242
 
 
   Thank you @dawidwys, 
   It also sounds good to me that to print only the exact value for the docs, while also keep the approximate for the logs.
   Let's wait for @azagrebin and @tillrohrmann 's feedback.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10829: [FLINK-14853][docs] Use higher granularity units in generated docs for Duration & MemorySize if possible
URL: https://github.com/apache/flink/pull/10829#issuecomment-573052559
 
 
   <!--
   Meta data
   Hash:c289f16e336e54931105f5c3ec143f8a9fd69021 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:c289f16e336e54931105f5c3ec143f8a9fd69021
   -->
   ## CI report:
   
   * c289f16e336e54931105f5c3ec143f8a9fd69021 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services