[GitHub] carbondata pull request #2463: [CARBONDATA-2708][BloomDataMap] clear index f...

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

[GitHub] carbondata pull request #2463: [CARBONDATA-2708][BloomDataMap] clear index f...

qiuchenjian-2
GitHub user xuchuanyin opened a pull request:

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

    [CARBONDATA-2708][BloomDataMap]  clear index file in case of data load failure

    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/xuchuanyin/carbondata CARBONDATA_2708_clear_index_file_load_fail

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/2463.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 #2463
   
----
commit 6ae51a9754cbfdbbaace06cd282af95ca24bf006
Author: xuchuanyin <xuchuanyin@...>
Date:   2018-07-09T03:36:13Z

    clear bloom index files after segment is deleted
   
    clear bloom index files after corresponding segment is deleted and
    cleaned

commit f848ba282d57e48300ee3a1e1efa1283298c03ee
Author: xuchuanyin <xuchuanyin@...>
Date:   2018-07-09T07:56:51Z

    clear index file in case of data load failure

----


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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

qiuchenjian-2
Github user xuchuanyin commented on the issue:

    https://github.com/apache/carbondata/pull/2463
 
    This PR depends on PR #2461


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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

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

    https://github.com/apache/carbondata/pull/2463
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6943/



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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

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

    https://github.com/apache/carbondata/pull/2463
 
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5726/



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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

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

    https://github.com/apache/carbondata/pull/2463
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6954/



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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

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

    https://github.com/apache/carbondata/pull/2463
 
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5716/



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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

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

    https://github.com/apache/carbondata/pull/2463
 
    retest this please


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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

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

    https://github.com/apache/carbondata/pull/2463
 
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5736/



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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

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

    https://github.com/apache/carbondata/pull/2463
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/6966/



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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

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

    https://github.com/apache/carbondata/pull/2463
 
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5746/



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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

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

    https://github.com/apache/carbondata/pull/2463
 
    retest sdv please


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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

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

    https://github.com/apache/carbondata/pull/2463
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5750/



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

[GitHub] carbondata pull request #2463: [CARBONDATA-2708][BloomDataMap] clear index f...

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/2463#discussion_r201586698
 
    --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala ---
    @@ -588,6 +591,21 @@ object CarbonDataRDDFactory {
         }
       }
     
    +  /**
    +   * clear datamap files for segment
    +   */
    +  private def clearDataMapFiles(carbonTable: CarbonTable, segmentId: String): Unit = {
    +    try {
    +      DataMapStoreManager.getInstance().getAllDataMap(carbonTable).asScala
    +        .filter(_.getDataMapSchema.isIndexDataMap).foreach { p =>
    +        p.deleteDatamapData(List(new Segment(segmentId)).asJava)
    --- End diff --
   
    move `List(new Segment(segmentId)).asJava` before the loop and move `foreach` to next line, to make it better formatted


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

[GitHub] carbondata pull request #2463: [CARBONDATA-2708][BloomDataMap] clear index f...

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/2463#discussion_r201586829
 
    --- Diff: datamap/lucene/src/main/java/org/apache/carbondata/datamap/lucene/LuceneDataMapFactoryBase.java ---
    @@ -270,6 +260,22 @@ public void clear() {
     
       }
     
    +  @Override public void deleteDatamapData(Segment segment) {
    --- End diff --
   
    move @Override to previous line


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

[GitHub] carbondata pull request #2463: [CARBONDATA-2708][BloomDataMap] clear index f...

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/2463#discussion_r201590879
 
    --- Diff: datamap/lucene/src/main/java/org/apache/carbondata/datamap/lucene/LuceneDataMapFactoryBase.java ---
    @@ -270,6 +260,22 @@ public void clear() {
     
       }
     
    +  @Override public void deleteDatamapData(Segment segment) {
    +    try {
    +      String segmentId = segment.getSegmentNo();
    +      String datamapPath = CarbonTablePath
    +          .getDataMapStorePath(tableIdentifier.getTablePath(), segmentId, dataMapName);
    +      if (FileFactory.isFileExist(datamapPath)) {
    +        CarbonFile file = FileFactory.getCarbonFile(datamapPath,
    +            FileFactory.getFileType(datamapPath));
    +        CarbonUtil.deleteFoldersAndFilesSilent(file);
    +      }
    +    } catch (IOException | InterruptedException ex) {
    +      throw new RuntimeException(
    --- End diff --
   
    Seems throw IOException is better, then catch it and log it in out most caller


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

[GitHub] carbondata pull request #2463: [CARBONDATA-2708][BloomDataMap] clear index f...

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/2463#discussion_r201590946
 
    --- Diff: datamap/lucene/src/main/java/org/apache/carbondata/datamap/lucene/LuceneDataMapFactoryBase.java ---
    @@ -270,6 +260,22 @@ public void clear() {
     
       }
     
    +  @Override public void deleteDatamapData(Segment segment) {
    +    try {
    +      String segmentId = segment.getSegmentNo();
    +      String datamapPath = CarbonTablePath
    +          .getDataMapStorePath(tableIdentifier.getTablePath(), segmentId, dataMapName);
    +      if (FileFactory.isFileExist(datamapPath)) {
    +        CarbonFile file = FileFactory.getCarbonFile(datamapPath,
    +            FileFactory.getFileType(datamapPath));
    +        CarbonUtil.deleteFoldersAndFilesSilent(file);
    +      }
    +    } catch (IOException | InterruptedException ex) {
    +      throw new RuntimeException(
    --- End diff --
   
    please do the same for line 279


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

[GitHub] carbondata pull request #2463: [CARBONDATA-2708][BloomDataMap] clear index f...

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/2463#discussion_r201597054
 
    --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala ---
    @@ -588,6 +591,21 @@ object CarbonDataRDDFactory {
         }
       }
     
    +  /**
    +   * clear datamap files for segment
    +   */
    +  private def clearDataMapFiles(carbonTable: CarbonTable, segmentId: String): Unit = {
    +    try {
    +      DataMapStoreManager.getInstance().getAllDataMap(carbonTable).asScala
    +        .filter(_.getDataMapSchema.isIndexDataMap).foreach { p =>
    +        p.deleteDatamapData(List(new Segment(segmentId)).asJava)
    --- End diff --
   
    OK


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

[GitHub] carbondata pull request #2463: [CARBONDATA-2708][BloomDataMap] clear index f...

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/2463#discussion_r201597172
 
    --- Diff: datamap/lucene/src/main/java/org/apache/carbondata/datamap/lucene/LuceneDataMapFactoryBase.java ---
    @@ -270,6 +260,22 @@ public void clear() {
     
       }
     
    +  @Override public void deleteDatamapData(Segment segment) {
    --- End diff --
   
    OK


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

[GitHub] carbondata pull request #2463: [CARBONDATA-2708][BloomDataMap] clear index f...

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/2463#discussion_r201601598
 
    --- Diff: datamap/lucene/src/main/java/org/apache/carbondata/datamap/lucene/LuceneDataMapFactoryBase.java ---
    @@ -270,6 +260,22 @@ public void clear() {
     
       }
     
    +  @Override public void deleteDatamapData(Segment segment) {
    +    try {
    +      String segmentId = segment.getSegmentNo();
    +      String datamapPath = CarbonTablePath
    +          .getDataMapStorePath(tableIdentifier.getTablePath(), segmentId, dataMapName);
    +      if (FileFactory.isFileExist(datamapPath)) {
    +        CarbonFile file = FileFactory.getCarbonFile(datamapPath,
    +            FileFactory.getFileType(datamapPath));
    +        CarbonUtil.deleteFoldersAndFilesSilent(file);
    +      }
    +    } catch (IOException | InterruptedException ex) {
    +      throw new RuntimeException(
    --- End diff --
   
    OK


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

[GitHub] carbondata issue #2463: [CARBONDATA-2708][BloomDataMap] clear index file in ...

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

    https://github.com/apache/carbondata/pull/2463
 
    review comments are resolved


---
12