GitHub user kevinjmh opened a pull request:
https://github.com/apache/carbondata/pull/2538 [CARBONDATA-2769] Fix bug when getting shard name from data before version 1.4 Return proper shardName when getting from data before version 1.4 Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [ ] 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/kevinjmh/carbondata dm_on_old_data Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/2538.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 #2538 ---- commit c82eeadbd7f07654d4f5d6b52eab7df42408a1a4 Author: Manhua <kevinjmh@...> Date: 2018-07-23T04:01:34Z fix compatible problem when getShardName ---- --- |
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2538 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7381/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2538 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6142/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2538 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5957/ --- |
In reply to this post by qiuchenjian-2
Github user kevinjmh commented on the issue:
https://github.com/apache/carbondata/pull/2538 retest this please --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on the issue:
https://github.com/apache/carbondata/pull/2538 The description only described the solution. Better to describe the problem/phenomenon and root cause as well for better understanding. --- |
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/2538#discussion_r204293746 --- Diff: core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java --- @@ -665,9 +665,18 @@ public static String getCarbonIndexFileName(String actualBlockName) { * @return */ public static String getShardName(String actualBlockName) { - return DataFileUtil.getTaskNo(actualBlockName) + "-" + DataFileUtil.getBucketNo(actualBlockName) - + "-" + DataFileUtil.getSegmentNo(actualBlockName) + "-" + DataFileUtil - .getTimeStampFromFileName(actualBlockName); + String segmentNoStr = DataFileUtil.getSegmentNo(actualBlockName); + // data before version 1.4 does not have segmentId + if (null != segmentNoStr) { + return DataFileUtil.getTaskNo(actualBlockName) + "-" + --- End diff -- better to use stringbuilder if concat more than 3 strings --- |
In reply to this post by qiuchenjian-2
Github user kevinjmh commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2538#discussion_r204298466 --- Diff: core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java --- @@ -665,9 +665,18 @@ public static String getCarbonIndexFileName(String actualBlockName) { * @return */ public static String getShardName(String actualBlockName) { - return DataFileUtil.getTaskNo(actualBlockName) + "-" + DataFileUtil.getBucketNo(actualBlockName) - + "-" + DataFileUtil.getSegmentNo(actualBlockName) + "-" + DataFileUtil - .getTimeStampFromFileName(actualBlockName); + String segmentNoStr = DataFileUtil.getSegmentNo(actualBlockName); + // data before version 1.4 does not have segmentId + if (null != segmentNoStr) { + return DataFileUtil.getTaskNo(actualBlockName) + "-" + --- End diff -- fixed --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2538 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7386/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2538 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6147/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2538 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7393/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2538 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6154/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2538 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5964/ --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on the issue:
https://github.com/apache/carbondata/pull/2538 LGTM --- |
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/2538#discussion_r204608952 --- Diff: core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java --- @@ -665,9 +665,21 @@ public static String getCarbonIndexFileName(String actualBlockName) { * @return */ public static String getShardName(String actualBlockName) { - return DataFileUtil.getTaskNo(actualBlockName) + "-" + DataFileUtil.getBucketNo(actualBlockName) - + "-" + DataFileUtil.getSegmentNo(actualBlockName) + "-" + DataFileUtil - .getTimeStampFromFileName(actualBlockName); + String segmentNoStr = DataFileUtil.getSegmentNo(actualBlockName); + StringBuilder shardName = new StringBuilder(); + // data before version 1.4 does not have segmentNo in filename --- End diff -- Should this be moved to else block? --- |
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/2538#discussion_r204609104 --- Diff: core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java --- @@ -665,9 +665,21 @@ public static String getCarbonIndexFileName(String actualBlockName) { * @return */ public static String getShardName(String actualBlockName) { - return DataFileUtil.getTaskNo(actualBlockName) + "-" + DataFileUtil.getBucketNo(actualBlockName) - + "-" + DataFileUtil.getSegmentNo(actualBlockName) + "-" + DataFileUtil - .getTimeStampFromFileName(actualBlockName); + String segmentNoStr = DataFileUtil.getSegmentNo(actualBlockName); + StringBuilder shardName = new StringBuilder(); + // data before version 1.4 does not have segmentNo in filename --- End diff -- And please add comment in function header to describe what is the component in shard name string --- |
In reply to this post by qiuchenjian-2
Github user kevinjmh commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2538#discussion_r204614072 --- Diff: core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java --- @@ -665,9 +665,21 @@ public static String getCarbonIndexFileName(String actualBlockName) { * @return */ public static String getShardName(String actualBlockName) { - return DataFileUtil.getTaskNo(actualBlockName) + "-" + DataFileUtil.getBucketNo(actualBlockName) - + "-" + DataFileUtil.getSegmentNo(actualBlockName) + "-" + DataFileUtil - .getTimeStampFromFileName(actualBlockName); + String segmentNoStr = DataFileUtil.getSegmentNo(actualBlockName); + StringBuilder shardName = new StringBuilder(); + // data before version 1.4 does not have segmentNo in filename --- End diff -- Fixed --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2538 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7425/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2538 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6184/ --- |
In reply to this post by qiuchenjian-2
|
Free forum by Nabble | Edit this page |