You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/08/17 01:06:35 UTC

[GitHub] [hudi] AyachiNene opened a new pull request #3487: [HUDI-2301] fix FileSliceMetrics utils bug

AyachiNene opened a new pull request #3487:
URL: https://github.com/apache/hudi/pull/3487


   ## *Tips*
   - *Thank you very much for contributing to Apache Hudi.*
   - *Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.*
   
   ## What is the purpose of the pull request
   
   To fix bug of metrics calculation error
   In the original code, the calculation of totalReadIO and totalWriteIO will only obtain the size of one of the Fileslice
   
   *(For example: This pull request adds quick-start document.)*
   
   ## Brief change log
   
   *(for example:)*
     - *Modify AnnotationLocation checkstyle rule in checkstyle.xml*
   
   ## Verify this pull request
   
   *(Please pick either of the following options)*
   
   This pull request is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   *(example:)*
   
     - *Added integration tests for end-to-end.*
     - *Added HoodieClientWriteTest to verify the change.*
     - *Manually verified the change by running a job locally.*
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
   


-- 
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@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot edited a comment on pull request #3487: [HUDI-2301] fix FileSliceMetrics utils bug

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3487:
URL: https://github.com/apache/hudi/pull/3487#issuecomment-899918669


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1780",
       "triggerID" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d55632b80944ae166d424eb34c660dd63c9c8deb Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1780) 
   * bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot edited a comment on pull request #3487: [HUDI-2301] fix FileSliceMetrics utils bug

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3487:
URL: https://github.com/apache/hudi/pull/3487#issuecomment-899918669


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1780",
       "triggerID" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1781",
       "triggerID" : "bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d55632b80944ae166d424eb34c660dd63c9c8deb Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1780) 
   * bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1781) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot edited a comment on pull request #3487: [HUDI-2301] fix FileSliceMetrics utils bug

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3487:
URL: https://github.com/apache/hudi/pull/3487#issuecomment-899918669


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1780",
       "triggerID" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d55632b80944ae166d424eb34c660dd63c9c8deb Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1780) 
   * bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] lw309637554 commented on a change in pull request #3487: [HUDI-2301] fix FileSliceMetrics utils bug

Posted by GitBox <gi...@apache.org>.
lw309637554 commented on a change in pull request #3487:
URL: https://github.com/apache/hudi/pull/3487#discussion_r689961526



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/utils/FileSliceMetricUtils.java
##########
@@ -44,19 +44,23 @@ public static void addFileSliceCommonMetrics(List<FileSlice> fileSlices, Map<Str
     long totalIO = 0;
 
     for (FileSlice slice : fileSlices) {
-      numLogFiles +=  slice.getLogFiles().count();
+      numLogFiles += slice.getLogFiles().count();
       // Total size of all the log files
       totalLogFileSize += slice.getLogFiles().map(HoodieLogFile::getFileSize).filter(size -> size >= 0)
           .reduce(Long::sum).orElse(0L);
 
       long baseFileSize = slice.getBaseFile().isPresent() ? slice.getBaseFile().get().getFileSize() : 0L;
       // Total read will be the base file + all the log files
-      totalIORead = FSUtils.getSizeInMB(baseFileSize + totalLogFileSize);
+      totalIORead += baseFileSize;
       // Total write will be similar to the size of the base file
-      totalIOWrite = FSUtils.getSizeInMB(baseFileSize > 0 ? baseFileSize : defaultBaseFileSize);
-      // Total IO will the the IO for read + write
-      totalIO = totalIORead + totalIOWrite;
+      totalIOWrite += baseFileSize > 0 ? baseFileSize : defaultBaseFileSize;
+
     }
+    // Total IO will the the IO for read + write

Review comment:
       Total IO will the the IO for read + write -> Total IO will the IO for read + write




-- 
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@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] satishkotha merged pull request #3487: [HUDI-2301] fix FileSliceMetrics utils bug

Posted by GitBox <gi...@apache.org>.
satishkotha merged pull request #3487:
URL: https://github.com/apache/hudi/pull/3487


   


-- 
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@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] satishkotha merged pull request #3487: [HUDI-2301] fix FileSliceMetrics utils bug

Posted by GitBox <gi...@apache.org>.
satishkotha merged pull request #3487:
URL: https://github.com/apache/hudi/pull/3487


   


-- 
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@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot edited a comment on pull request #3487: [HUDI-2301] fix FileSliceMetrics utils bug

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3487:
URL: https://github.com/apache/hudi/pull/3487#issuecomment-899918669


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1780",
       "triggerID" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d55632b80944ae166d424eb34c660dd63c9c8deb Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1780) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot commented on pull request #3487: [HUDI-2301] fix FileSliceMetrics utils bug

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #3487:
URL: https://github.com/apache/hudi/pull/3487#issuecomment-899918669


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d55632b80944ae166d424eb34c660dd63c9c8deb UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot edited a comment on pull request #3487: [HUDI-2301] fix FileSliceMetrics utils bug

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3487:
URL: https://github.com/apache/hudi/pull/3487#issuecomment-899918669


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1780",
       "triggerID" : "d55632b80944ae166d424eb34c660dd63c9c8deb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1781",
       "triggerID" : "bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * bbc16a6e393d3ff3e8859bbe5f3d6b1337aca017 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1781) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] lw309637554 commented on pull request #3487: [HUDI-2301] fix FileSliceMetrics utils bug

Posted by GitBox <gi...@apache.org>.
lw309637554 commented on pull request #3487:
URL: https://github.com/apache/hudi/pull/3487#issuecomment-899949796


   LGTM, good job @AyachiNene .
   


-- 
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@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org