Github user xubo245 commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2290#discussion_r191450160 --- Diff: core/src/main/java/org/apache/carbondata/core/readcommitter/LatestFilesReadCommittedScope.java --- @@ -42,10 +39,27 @@ public class LatestFilesReadCommittedScope implements ReadCommittedScope { private String carbonFilePath; + private String segmentId; private ReadCommittedIndexFileSnapShot readCommittedIndexFileSnapShot; private LoadMetadataDetails[] loadMetadataDetails; - public LatestFilesReadCommittedScope(String path) { + /** + * a new constructor of this class, which supports obtain lucene index in search mode + * + * @param path carbon file path + * @param segmentId segment id + */ + public LatestFilesReadCommittedScope(String path, String segmentId) { + this.carbonFilePath = path; + this.segmentId = segmentId; + try { + takeCarbonIndexFileSnapShot(); + } catch (IOException ex) { + throw new RuntimeException("Error while taking index snapshot", ex); + } + } + + public LatestFilesReadCommittedScope(String path) { --- End diff -- ok, done
---