Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2091 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/4043/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2091 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/4044/ --- |
In reply to this post by qiuchenjian-2
Github user zzcclp commented on the issue:
https://github.com/apache/carbondata/pull/2091 retest this please --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2091 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/4549/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2091 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/3322/ --- |
In reply to this post by qiuchenjian-2
Github user zzcclp commented on the issue:
https://github.com/apache/carbondata/pull/2091 @jackylk @ravipesala please help to review, thanks --- |
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/2091#discussion_r176903880 --- Diff: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java --- @@ -1602,8 +1602,20 @@ // default value is 2 days public static final String CARBON_SEGMENT_LOCK_FILES_PRESERVE_HOURS_DEFAULT = "48"; + /** + * The number of invisible segment info which will be preserved in tablestatus file, + * if it exceeds this value, they will be removed and write to tablestatus.history file. + */ + @CarbonProperty + public static final String CARBON_INVISIBLE_SEGMENTS_PRESERVE_COUNT = + "carbon.invisible.segments.preserve.count"; + + /** + * default value is 20, it means that it will preserve 20 invisible segment info --- End diff -- The default is 200 right. Please update comment --- |
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/2091#discussion_r176903993 --- Diff: core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java --- @@ -913,4 +950,91 @@ public static void deleteLoadsAndUpdateMetadata( CarbonLockUtil.deleteExpiredSegmentLockFiles(carbonTable); } + /** + * Get the number of invisible segment info from segment info list. + */ + public static int countInvisibleSegments(LoadMetadataDetails[] segmentList) { + int invisibleSegmentCnt = 0; + if (segmentList.length != 0) { + for (LoadMetadataDetails eachSeg : segmentList) { + // can not remove segment 0, there are some info will be used later + // for example: updateStatusFileName + if (!eachSeg.getLoadName().equalsIgnoreCase("0") + && eachSeg.getVisibility().equalsIgnoreCase("false")) { + invisibleSegmentCnt += 1; + } + } + } + return invisibleSegmentCnt; + } + + private static class TableStatusReturnTuple { + LoadMetadataDetails[] arrayOfLoadDetails; + LoadMetadataDetails[] arrayOfLoadHistoryDetails; + TableStatusReturnTuple(LoadMetadataDetails[] arrayOfLoadDetails, + LoadMetadataDetails[] arrayOfLoadHistoryDetails) { + this.arrayOfLoadDetails = arrayOfLoadDetails; + this.arrayOfLoadHistoryDetails = arrayOfLoadHistoryDetails; + } + } + + /** + * Separate visible and invisible segments into two array. + */ + public static TableStatusReturnTuple separateVisibleAndInvisibleSegments( + LoadMetadataDetails[] oldList, + LoadMetadataDetails[] newList, + int invisibleSegmentCnt) { + int newSegmentsLength = newList.length; + int visibleSegmentCnt = newSegmentsLength - invisibleSegmentCnt; + LoadMetadataDetails[] arrayOfVisibleSegments = new LoadMetadataDetails[visibleSegmentCnt]; + LoadMetadataDetails[] arrayOfInvisibleSegments = new LoadMetadataDetails[invisibleSegmentCnt]; + int oldSegmentsLength = oldList.length; + int visibleIdx = 0; + int invisibleIdx = 0; + for (int i = 0; i < newSegmentsLength; i++) { + LoadMetadataDetails newSegment = newList[i]; + if (i < oldSegmentsLength) { + LoadMetadataDetails oldSegment = oldList[i]; + if (newSegment.getLoadName().equalsIgnoreCase("0")) { + newSegment.setVisibility(oldSegment.getVisibility()); + arrayOfVisibleSegments[visibleIdx] = newSegment; + visibleIdx++; + } else if ("false".equalsIgnoreCase(oldSegment.getVisibility())) { + newSegment.setVisibility("false"); + arrayOfInvisibleSegments[invisibleIdx] = newSegment; + invisibleIdx++; + } else { + arrayOfVisibleSegments[visibleIdx] = newSegment; + visibleIdx++; + } + } else { + arrayOfVisibleSegments[visibleIdx] = newSegment; + visibleIdx++; + } + } + return new TableStatusReturnTuple(arrayOfVisibleSegments, arrayOfInvisibleSegments); + } + + /** + * Append new invisible segment info to old list. --- End diff -- change to `Pick all invisible segment entries in appendList and add them into historyList` --- |
In reply to this post by qiuchenjian-2
Github user zzcclp commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2091#discussion_r176907586 --- Diff: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java --- @@ -1602,8 +1602,20 @@ // default value is 2 days public static final String CARBON_SEGMENT_LOCK_FILES_PRESERVE_HOURS_DEFAULT = "48"; + /** + * The number of invisible segment info which will be preserved in tablestatus file, + * if it exceeds this value, they will be removed and write to tablestatus.history file. + */ + @CarbonProperty + public static final String CARBON_INVISIBLE_SEGMENTS_PRESERVE_COUNT = + "carbon.invisible.segments.preserve.count"; + + /** + * default value is 20, it means that it will preserve 20 invisible segment info --- End diff -- Done --- |
In reply to this post by qiuchenjian-2
Github user zzcclp commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2091#discussion_r176907591 --- Diff: core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java --- @@ -913,4 +950,91 @@ public static void deleteLoadsAndUpdateMetadata( CarbonLockUtil.deleteExpiredSegmentLockFiles(carbonTable); } + /** + * Get the number of invisible segment info from segment info list. + */ + public static int countInvisibleSegments(LoadMetadataDetails[] segmentList) { + int invisibleSegmentCnt = 0; + if (segmentList.length != 0) { + for (LoadMetadataDetails eachSeg : segmentList) { + // can not remove segment 0, there are some info will be used later + // for example: updateStatusFileName + if (!eachSeg.getLoadName().equalsIgnoreCase("0") + && eachSeg.getVisibility().equalsIgnoreCase("false")) { + invisibleSegmentCnt += 1; + } + } + } + return invisibleSegmentCnt; + } + + private static class TableStatusReturnTuple { + LoadMetadataDetails[] arrayOfLoadDetails; + LoadMetadataDetails[] arrayOfLoadHistoryDetails; + TableStatusReturnTuple(LoadMetadataDetails[] arrayOfLoadDetails, + LoadMetadataDetails[] arrayOfLoadHistoryDetails) { + this.arrayOfLoadDetails = arrayOfLoadDetails; + this.arrayOfLoadHistoryDetails = arrayOfLoadHistoryDetails; + } + } + + /** + * Separate visible and invisible segments into two array. + */ + public static TableStatusReturnTuple separateVisibleAndInvisibleSegments( + LoadMetadataDetails[] oldList, + LoadMetadataDetails[] newList, + int invisibleSegmentCnt) { + int newSegmentsLength = newList.length; + int visibleSegmentCnt = newSegmentsLength - invisibleSegmentCnt; + LoadMetadataDetails[] arrayOfVisibleSegments = new LoadMetadataDetails[visibleSegmentCnt]; + LoadMetadataDetails[] arrayOfInvisibleSegments = new LoadMetadataDetails[invisibleSegmentCnt]; + int oldSegmentsLength = oldList.length; + int visibleIdx = 0; + int invisibleIdx = 0; + for (int i = 0; i < newSegmentsLength; i++) { + LoadMetadataDetails newSegment = newList[i]; + if (i < oldSegmentsLength) { + LoadMetadataDetails oldSegment = oldList[i]; + if (newSegment.getLoadName().equalsIgnoreCase("0")) { + newSegment.setVisibility(oldSegment.getVisibility()); + arrayOfVisibleSegments[visibleIdx] = newSegment; + visibleIdx++; + } else if ("false".equalsIgnoreCase(oldSegment.getVisibility())) { + newSegment.setVisibility("false"); + arrayOfInvisibleSegments[invisibleIdx] = newSegment; + invisibleIdx++; + } else { + arrayOfVisibleSegments[visibleIdx] = newSegment; + visibleIdx++; + } + } else { + arrayOfVisibleSegments[visibleIdx] = newSegment; + visibleIdx++; + } + } + return new TableStatusReturnTuple(arrayOfVisibleSegments, arrayOfInvisibleSegments); + } + + /** + * Append new invisible segment info to old list. --- End diff -- Done --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2091 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/3339/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2091 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/4565/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2091 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/4061/ --- |
In reply to this post by qiuchenjian-2
|
In reply to this post by qiuchenjian-2
|
Free forum by Nabble | Edit this page |