[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...

qiuchenjian-2
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

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...

qiuchenjian-2
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


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...

qiuchenjian-2
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


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on the issue:

    https://github.com/apache/carbondata/pull/2538
 
    LGTM


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...

qiuchenjian-2
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?


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...

qiuchenjian-2
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


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...

qiuchenjian-2
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


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #2538: [CARBONDATA-2769] Fix bug when getting shard name fr...

qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #2538: [CARBONDATA-2769] Fix bug when getting shard ...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:

    https://github.com/apache/carbondata/pull/2538


---
12