You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by Jay357089 <gi...@git.apache.org> on 2016/10/12 03:23:44 UTC

[GitHub] incubator-carbondata pull request #230: []Add block size info in descFormatt...

GitHub user Jay357089 opened a pull request:

    https://github.com/apache/incubator-carbondata/pull/230

    []Add block size info in descFormatted and executor log

    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
    
     - [ ] Make sure the PR title is formatted like:
       `[CARBONDATA-<Jira issue #>] Description of pull request`
     - [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [ ] If this contribution is large, please file an Apache
           [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).
     - [ ] Testing done
     
            Please provide details on 
            - Whether new unit test cases have been added or why no new tests are required?
            - What manual testing you have done?
            - Any additional information to help reviewers in testing this change.
             
     - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. 
                     
    ---
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Jay357089/incubator-carbondata addblocksizeDesc

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-carbondata/pull/230.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #230
    
----
commit cd100291edc63466b385e6fb8d74f08bfd705bfb
Author: Jay357089 <li...@huawei.com>
Date:   2016-10-12T03:21:44Z

    add block size info in descFormatted and executor log

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by Jay357089 <gi...@git.apache.org>.
Github user Jay357089 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83352166
  
    --- Diff: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala ---
    @@ -1422,6 +1422,7 @@ private[sql] case class DescribeCommandFormatted(
         results ++= Seq(("Table Name : ", relation.tableMeta.carbonTableIdentifier.getTableName, ""))
         results ++= Seq(("CARBON Store Path : ", relation.tableMeta.storePath, ""))
         val carbonTable = relation.tableMeta.carbonTable
    +    results ++= Seq(("Table Block Size : ", carbonTable.getBlocksize + " MB", ""))
    --- End diff --
    
    in carbonTable, block size is set in MB, it's already readable, so i don't think it need to format


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-carbondata/pull/230


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83349683
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -252,6 +252,15 @@ private static long getMaxOfBlockAndFileSize(long blockSize, long fileSize) {
         if (remainder > 0) {
           maxSize = maxSize + HDFS_CHECKSUM_LENGTH - remainder;
         }
    +    long setBlockSizeInMb = blockSize / CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR /
    +            CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR;
    +    // actual file size may be less than 1KB or 1MB, need to classify.
    +    String readableFileSize = ByteUtil.convertByteToReadable(fileSize);
    +    long maxSizeInMb = maxSize / CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR /
    +            CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR;
    +    LOGGER.info("The configured block size is " + setBlockSizeInMb + " MB, " +
    --- End diff --
    
    Use the new function here to format readable 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by Jay357089 <gi...@git.apache.org>.
Github user Jay357089 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83354112
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -252,6 +252,15 @@ private static long getMaxOfBlockAndFileSize(long blockSize, long fileSize) {
         if (remainder > 0) {
           maxSize = maxSize + HDFS_CHECKSUM_LENGTH - remainder;
         }
    +    long setBlockSizeInMb = blockSize / CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR /
    +            CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR;
    +    // actual file size may be less than 1KB or 1MB, need to classify.
    +    String readableFileSize = ByteUtil.convertByteToReadable(fileSize);
    +    long maxSizeInMb = maxSize / CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR /
    +            CarbonCommonConstants.BYTE_TO_KB_CONVERSION_FACTOR;
    +    LOGGER.info("The configured block size is " + setBlockSizeInMb + " MB, " +
    --- End diff --
    
    done. CI passed. http://136.243.101.176:8080/job/ApacheCarbonManualPRBuilder/427/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-carbondata/pull/230


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83028164
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -252,6 +252,9 @@ private static long getMaxOfBlockAndFileSize(long blockSize, long fileSize) {
         if (remainder > 0) {
           maxSize = maxSize + HDFS_CHECKSUM_LENGTH - remainder;
         }
    +    LOGGER.info("The configured block size is " + blockSize + " byte, " +
    --- End diff --
    
    Suggest to have the `blockSize` convert to a proper number before logging it, otherwise it is hard to check this value by human


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83021340
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -252,6 +252,9 @@ private static long getMaxOfBlockAndFileSize(long blockSize, long fileSize) {
         if (remainder > 0) {
           maxSize = maxSize + HDFS_CHECKSUM_LENGTH - remainder;
         }
    +    LOGGER.info("The configured block size is " + blockSize + " byte, " +
    --- End diff --
    
    Is `blockSize` in bytes or MB?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by Zhangshunyu <gi...@git.apache.org>.
Github user Zhangshunyu commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83139950
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -252,6 +252,9 @@ private static long getMaxOfBlockAndFileSize(long blockSize, long fileSize) {
         if (remainder > 0) {
           maxSize = maxSize + HDFS_CHECKSUM_LENGTH - remainder;
         }
    +    LOGGER.info("The configured block size is " + blockSize + " byte, " +
    --- End diff --
    
    @Jay357089 I think this is a good idea to extract ConvertByteToReadable as a method, since it can be used in many logs, especially for analyzing performance.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by Jay357089 <gi...@git.apache.org>.
Github user Jay357089 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83376650
  
    --- Diff: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala ---
    @@ -1422,6 +1422,7 @@ private[sql] case class DescribeCommandFormatted(
         results ++= Seq(("Table Name : ", relation.tableMeta.carbonTableIdentifier.getTableName, ""))
         results ++= Seq(("CARBON Store Path : ", relation.tableMeta.storePath, ""))
         val carbonTable = relation.tableMeta.carbonTable
    +    results ++= Seq(("Table Block Size : ", carbonTable.getBlocksize + " MB", ""))
    --- End diff --
    
    done. CI passed. http://136.243.101.176:8080/job/ApacheCarbonManualPRBuilder/429/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by Zhangshunyu <gi...@git.apache.org>.
Github user Zhangshunyu commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83027603
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -252,6 +252,9 @@ private static long getMaxOfBlockAndFileSize(long blockSize, long fileSize) {
         if (remainder > 0) {
           maxSize = maxSize + HDFS_CHECKSUM_LENGTH - remainder;
         }
    +    LOGGER.info("The configured block size is " + blockSize + " byte, " +
    --- End diff --
    
    @jackylk set in mb\uff0cbut here already converted to byte.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by Jay357089 <gi...@git.apache.org>.
Github user Jay357089 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83139600
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -252,6 +252,9 @@ private static long getMaxOfBlockAndFileSize(long blockSize, long fileSize) {
         if (remainder > 0) {
           maxSize = maxSize + HDFS_CHECKSUM_LENGTH - remainder;
         }
    +    LOGGER.info("The configured block size is " + blockSize + " byte, " +
    --- End diff --
    
    @jackylk  Maybe i should extract if .. else part to a method called ConvertByteToReadable, what's your opinion?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83349721
  
    --- Diff: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala ---
    @@ -1422,6 +1422,7 @@ private[sql] case class DescribeCommandFormatted(
         results ++= Seq(("Table Name : ", relation.tableMeta.carbonTableIdentifier.getTableName, ""))
         results ++= Seq(("CARBON Store Path : ", relation.tableMeta.storePath, ""))
         val carbonTable = relation.tableMeta.carbonTable
    +    results ++= Seq(("Table Block Size : ", carbonTable.getBlocksize + " MB", ""))
    --- End diff --
    
    Use the new function here to format readable


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by Jay357089 <gi...@git.apache.org>.
Github user Jay357089 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83208043
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java ---
    @@ -252,6 +252,9 @@ private static long getMaxOfBlockAndFileSize(long blockSize, long fileSize) {
         if (remainder > 0) {
           maxSize = maxSize + HDFS_CHECKSUM_LENGTH - remainder;
         }
    +    LOGGER.info("The configured block size is " + blockSize + " byte, " +
    --- End diff --
    
    @jackylk  @Zhangshunyu done.
    
    CI passed. 
    http://136.243.101.176:8080/job/ApacheCarbonManualPRBuilder/424/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83421288
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/mdkeygen/MDKeyGenStep.java ---
    @@ -314,7 +314,7 @@ private boolean setStepConfiguration() {
         wrapperColumnSchema = CarbonUtil
             .getColumnSchemaList(carbonTable.getDimensionByTableName(tableName),
                 carbonTable.getMeasureByTableName(tableName));
    -    blocksize = carbonTable.getBlocksize();
    +    blocksize = carbonTable.getBlocksizeInMB();
    --- End diff --
    
    should be `getBlockSizeInMB`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #230: [CARBONDATA-306]Add block size info ...

Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/230#discussion_r83361557
  
    --- Diff: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala ---
    @@ -1422,6 +1422,7 @@ private[sql] case class DescribeCommandFormatted(
         results ++= Seq(("Table Name : ", relation.tableMeta.carbonTableIdentifier.getTableName, ""))
         results ++= Seq(("CARBON Store Path : ", relation.tableMeta.storePath, ""))
         val carbonTable = relation.tableMeta.carbonTable
    +    results ++= Seq(("Table Block Size : ", carbonTable.getBlocksize + " MB", ""))
    --- End diff --
    
    If so, can you change the corresponding variable name and function name to indicate it is bytes in MB,  like `getBlockSizeInMB` and  add comment to `CarbonCommonConstants.TABLE_BLOCKSIZE`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---