GitHub user akashrn5 opened a pull request:
https://github.com/apache/carbondata/pull/1435 [WIP]add data size and index size in tabl status file 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 to add PR description including - the root cause/problem statement - What is the implemented solution - [ ] Any interfaces changed? - [ ] Any backward compatibility impacted? - [ ] Document update required? - [ ] Testing done Please provide details on - Whether new unit test cases have been added or why no new tests are required? - How it is tested? Please attach test report. - Is it a performance related change? Please attach the performance test report. - 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/akashrn5/incubator-carbondata file_size Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/1435.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 #1435 ---- commit 168722091558902200c20526cd19d5ab7d0c4c6f Author: akashrn5 <[hidden email]> Date: 2017-10-25T09:57:37Z add carbondata size and index size in table status file ---- --- |
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1435 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/675/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1435 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1312/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1435 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/678/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1435 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1315/ --- |
In reply to this post by qiuchenjian-2
Github user akashrn5 commented on the issue:
https://github.com/apache/carbondata/pull/1435 @jackylk please review --- |
In reply to this post by qiuchenjian-2
Github user akashrn5 commented on the issue:
https://github.com/apache/carbondata/pull/1435 @gvramana please review --- |
In reply to this post by qiuchenjian-2
Github user akashrn5 commented on the issue:
https://github.com/apache/carbondata/pull/1435 @ravipesala please review --- |
In reply to this post by qiuchenjian-2
Github user mohammadshahidkhan commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1435#discussion_r147471059 --- Diff: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java --- @@ -1376,6 +1376,32 @@ public static final String BITSET_PIPE_LINE_DEFAULT = "true"; + /** + * The total size of carbon data + */ + public static final String CARBON_TOTAL_DATA_SIZE = "datasize"; + + /** + * The total size of carbon index + */ + public static final String CARBON_TOTAL_INDEX_SIZE = "indexsize"; + + /** + * ENABLE_CALCULATE_DATA_INDEX_SIZE + */ + @CarbonProperty public static final String ENABLE_CALCULATE_SIZE = "carbon.enable.calculate.size"; + + /** + * DEFAULT_ENABLE_CALCULATE_DATA_INDEX_SIZE + */ + @CarbonProperty public static final String DEFAULT_ENABLE_CALCULATE_SIZE = "true"; --- End diff -- for constant variable/keys CarbonProperty anotation not required --- |
In reply to this post by qiuchenjian-2
Github user akashrn5 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1435#discussion_r148957017 --- Diff: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java --- @@ -1376,6 +1376,32 @@ public static final String BITSET_PIPE_LINE_DEFAULT = "true"; + /** + * The total size of carbon data + */ + public static final String CARBON_TOTAL_DATA_SIZE = "datasize"; + + /** + * The total size of carbon index + */ + public static final String CARBON_TOTAL_INDEX_SIZE = "indexsize"; + + /** + * ENABLE_CALCULATE_DATA_INDEX_SIZE + */ + @CarbonProperty public static final String ENABLE_CALCULATE_SIZE = "carbon.enable.calculate.size"; + + /** + * DEFAULT_ENABLE_CALCULATE_DATA_INDEX_SIZE + */ + @CarbonProperty public static final String DEFAULT_ENABLE_CALCULATE_SIZE = "true"; --- End diff -- ok --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1435 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1115/ --- |
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1435#discussion_r150856173 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java --- @@ -509,7 +512,7 @@ public static boolean createNewLockFile(String filePath, FileType fileType) thro } public enum FileType { - LOCAL, HDFS, ALLUXIO, VIEWFS + LOCAL, HDFS, ALLUXIO, VIEWFS, S3 --- End diff -- S3 is not supported yet. --- |
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1435#discussion_r150857833 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java --- @@ -606,4 +609,53 @@ public static FileSystem getFileSystem(Path path) throws IOException { return path.getFileSystem(configuration); } + // Get the total size of carbon data and the total size of carbon index + public static HashMap<String, Long> getDataSizeAndIndexSize(CarbonTablePath carbonTablePath, --- End diff -- This method cannot be in FileFactory, as it in not generic filesystem operation. --- |
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1435#discussion_r150857977 --- Diff: core/src/main/java/org/apache/carbondata/core/memory/HeapMemoryAllocator.java --- @@ -17,11 +17,11 @@ package org.apache.carbondata.core.memory; -import javax.annotation.concurrent.GuardedBy; import java.lang.ref.WeakReference; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; +import javax.annotation.concurrent.GuardedBy; --- End diff -- why is this added? --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1435 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1714/ --- |
In reply to this post by qiuchenjian-2
Github user akashrn5 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1435#discussion_r151421484 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java --- @@ -606,4 +609,53 @@ public static FileSystem getFileSystem(Path path) throws IOException { return path.getFileSystem(configuration); } + // Get the total size of carbon data and the total size of carbon index + public static HashMap<String, Long> getDataSizeAndIndexSize(CarbonTablePath carbonTablePath, --- End diff -- handled comments --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1435 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1191/ --- |
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1435#discussion_r151458293 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala --- @@ -292,6 +290,35 @@ object CarbonDataRDDFactory { var executorMessage: String = "" val isSortTable = carbonTable.getNumberOfSortColumns > 0 val sortScope = CarbonDataProcessorUtil.getSortScope(carbonLoadModel.getSortScope) + + def updateStatus(status: Array[(String, (LoadMetadataDetails, ExecutionErrors))], --- End diff -- do not update table status file separately in separate method for size, add size while adding loadmetadata details to table status --- |
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1435#discussion_r151446545 --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java --- @@ -2119,5 +2127,146 @@ public static String getNewTablePath(Path carbonTablePath, return parentPath.toString() + CarbonCommonConstants.FILE_SEPARATOR + carbonTableIdentifier .getTableName(); } + + /* + * This method will add data size and index size into tablestatus for each segment + */ + public static void addDataIndexSizeIntoMetaEntry(LoadMetadataDetails loadMetadataDetails, + String segmentId, CarbonTable carbonTable) throws IOException { + CarbonTablePath carbonTablePath = + CarbonStorePath.getCarbonTablePath((carbonTable.getAbsoluteTableIdentifier())); + HashMap<String, Long> dataIndexSize = + FileFactory.getDataSizeAndIndexSize(carbonTablePath, segmentId); + loadMetadataDetails + .setDataSize(dataIndexSize.get(CarbonCommonConstants.CARBON_TOTAL_DATA_SIZE).toString()); + loadMetadataDetails + .setIndexSize(dataIndexSize.get(CarbonCommonConstants.CARBON_TOTAL_INDEX_SIZE).toString()); + } + + /** + * This method will calculate the data size and index size for carbon table + */ + public static HashMap<String, Long> calculateSize(CarbonTable carbonTable) --- End diff -- Update the method signature Map<String, Long> --- |
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1435#discussion_r151446750 --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java --- @@ -2119,5 +2127,146 @@ public static String getNewTablePath(Path carbonTablePath, return parentPath.toString() + CarbonCommonConstants.FILE_SEPARATOR + carbonTableIdentifier .getTableName(); } + + /* + * This method will add data size and index size into tablestatus for each segment + */ + public static void addDataIndexSizeIntoMetaEntry(LoadMetadataDetails loadMetadataDetails, + String segmentId, CarbonTable carbonTable) throws IOException { + CarbonTablePath carbonTablePath = + CarbonStorePath.getCarbonTablePath((carbonTable.getAbsoluteTableIdentifier())); + HashMap<String, Long> dataIndexSize = --- End diff -- Change it to Map<String,Long> --- |
Free forum by Nabble | Edit this page |