GitHub user ndwangsen opened a pull request:
https://github.com/apache/carbondata/pull/2488 [CARBONDATA-2724][DataMap]Unsupported create datamap on table with V1 or V2 format data [CARBONDATA-2724]Unsupported create datamap on table with V1 or V2 format data Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [ ] Any interfaces changed? NA - [ ] Any backward compatibility impacted? NA - [ ] Document update required? NA - [ ] 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. test pass in environment - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. NA You can merge this pull request into a Git repository by running: $ git pull https://github.com/ndwangsen/incubator-carbondata dm_block_v1_v2 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/2488.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 #2488 ---- commit c16331b78837d9e7ddb15497b9cf8acad4517d91 Author: ndwangsen <luffy.wang@...> Date: 2018-07-11T09:41:25Z [CARBONDATA-2724]Unsupported create datamap on table with V1 or V2 format data ---- --- |
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2488 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7025/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2488 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5805/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2488 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5776/ --- |
In reply to this post by qiuchenjian-2
Github user ndwangsen commented on the issue:
https://github.com/apache/carbondata/pull/2488 retest this please --- |
In reply to this post by qiuchenjian-2
Github user ndwangsen commented on the issue:
https://github.com/apache/carbondata/pull/2488 retest this please --- |
In reply to this post by qiuchenjian-2
Github user ndwangsen commented on the issue:
https://github.com/apache/carbondata/pull/2488 retest sdv please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2488 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7057/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2488 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5834/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2488 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5803/ --- |
In reply to this post by qiuchenjian-2
Github user ndwangsen commented on the issue:
https://github.com/apache/carbondata/pull/2488 retest sdv please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2488 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7084/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2488 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5861/ --- |
In reply to this post by qiuchenjian-2
Github user ndwangsen commented on the issue:
https://github.com/apache/carbondata/pull/2488 retest sdv please --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2488 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5833/ --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2488#discussion_r202544216 --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java --- @@ -3231,4 +3231,42 @@ private static int unsetLocalDictForComplexColumns(List<ColumnSchema> allColumns } return columnLocalDictGenMap; } + + /** + * This method get the carbon file format version + * + * @param carbonTable + * carbon Table + */ + public static ColumnarFormatVersion getFormatVersion(CarbonTable carbonTable) throws IOException + { + String tablePath = carbonTable.getTablePath(); + CarbonFile[] carbonFiles = FileFactory + .getCarbonFile(tablePath) + .listFiles(new CarbonFileFilter() { + @Override + public boolean accept(CarbonFile file) { + if (file == null) { + return false; + } + return file.getName().endsWith("carbonindex"); --- End diff -- I think it is better to get the version from data file instead of index file which is an optional file --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2488#discussion_r202544231 --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java --- @@ -3231,4 +3231,42 @@ private static int unsetLocalDictForComplexColumns(List<ColumnSchema> allColumns } return columnLocalDictGenMap; } + + /** + * This method get the carbon file format version + * + * @param carbonTable + * carbon Table + */ + public static ColumnarFormatVersion getFormatVersion(CarbonTable carbonTable) throws IOException + { + String tablePath = carbonTable.getTablePath(); + CarbonFile[] carbonFiles = FileFactory + .getCarbonFile(tablePath) + .listFiles(new CarbonFileFilter() { + @Override + public boolean accept(CarbonFile file) { + if (file == null) { + return false; + } + return file.getName().endsWith("carbonindex"); --- End diff -- @ravipesala Is there any utility func to get the version from file footer already? --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2488#discussion_r202575655 --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java --- @@ -3231,4 +3231,42 @@ private static int unsetLocalDictForComplexColumns(List<ColumnSchema> allColumns } return columnLocalDictGenMap; } + + /** + * This method get the carbon file format version + * + * @param carbonTable + * carbon Table + */ + public static ColumnarFormatVersion getFormatVersion(CarbonTable carbonTable) throws IOException + { + String tablePath = carbonTable.getTablePath(); --- End diff -- This check would be wrong, carbon files not always be under table path directly. --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2488#discussion_r202575874 --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java --- @@ -3231,4 +3231,42 @@ private static int unsetLocalDictForComplexColumns(List<ColumnSchema> allColumns } return columnLocalDictGenMap; } + + /** + * This method get the carbon file format version + * + * @param carbonTable + * carbon Table + */ + public static ColumnarFormatVersion getFormatVersion(CarbonTable carbonTable) throws IOException + { + String tablePath = carbonTable.getTablePath(); + CarbonFile[] carbonFiles = FileFactory + .getCarbonFile(tablePath) + .listFiles(new CarbonFileFilter() { + @Override + public boolean accept(CarbonFile file) { + if (file == null) { + return false; + } + return file.getName().endsWith("carbonindex"); --- End diff -- It should not be under carbontable object. It is file version and it is related to each load, not table. @manishgupta88 I think your PR already handles the validation of datamap loading on old formats right? --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2488#discussion_r202583993 --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java --- @@ -3231,4 +3231,42 @@ private static int unsetLocalDictForComplexColumns(List<ColumnSchema> allColumns } return columnLocalDictGenMap; } + + /** + * This method get the carbon file format version + * + * @param carbonTable + * carbon Table + */ + public static ColumnarFormatVersion getFormatVersion(CarbonTable carbonTable) throws IOException + { --- End diff -- Why this format can pass the checkstyle? --- |
Free forum by Nabble | Edit this page |