You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by kevinjmh <gi...@git.apache.org> on 2018/07/23 04:04:57 UTC
[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...
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 <ke...@...>
Date: 2018-07-23T04:01:34Z
fix compatible problem when getShardName
----
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by kevinjmh <gi...@git.apache.org>.
Github user kevinjmh commented on the issue:
https://github.com/apache/carbondata/pull/2538
retest this please
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by CarbonDataQA <gi...@git.apache.org>.
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/
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by ravipesala <gi...@git.apache.org>.
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/5978/
---
[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...
Posted by kevinjmh <gi...@git.apache.org>.
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
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by ravipesala <gi...@git.apache.org>.
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/
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on the issue:
https://github.com/apache/carbondata/pull/2538
LGTM
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by ravipesala <gi...@git.apache.org>.
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/
---
[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...
Posted by kevinjmh <gi...@git.apache.org>.
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
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by xuchuanyin <gi...@git.apache.org>.
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.
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by CarbonDataQA <gi...@git.apache.org>.
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/
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by CarbonDataQA <gi...@git.apache.org>.
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/
---
[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...
Posted by jackylk <gi...@git.apache.org>.
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
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by CarbonDataQA <gi...@git.apache.org>.
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/
---
[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...
Posted by xuchuanyin <gi...@git.apache.org>.
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
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by CarbonDataQA <gi...@git.apache.org>.
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/
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on the issue:
https://github.com/apache/carbondata/pull/2538
LGTM
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on the issue:
https://github.com/apache/carbondata/pull/2538
LGTM
---
[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/carbondata/pull/2538
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by CarbonDataQA <gi...@git.apache.org>.
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/
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by CarbonDataQA <gi...@git.apache.org>.
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/
---
[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...
Posted by CarbonDataQA <gi...@git.apache.org>.
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/
---
[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...
Posted by jackylk <gi...@git.apache.org>.
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?
---