public TableStatusReadCommittedScope(AbsoluteTableIdentifier identifier, Configuration configuration) throws IOException { this.identifier = identifier; this.configuration = configuration; takeCarbonIndexFileSnapShot(); }
public ReadCommittedScope getReadCommitted(JobContext job, AbsoluteTableIdentifier identifier) throws IOException { if (readCommittedScope == null) { ReadCommittedScope readCommittedScope; if (job.getConfiguration().getBoolean(CARBON_TRANSACTIONAL_TABLE, true)) { readCommittedScope = new TableStatusReadCommittedScope(identifier, job.getConfiguration()); } else { readCommittedScope = getReadCommittedScope(job.getConfiguration()); if (readCommittedScope == null) { readCommittedScope = new LatestFilesReadCommittedScope(identifier.getTablePath(), job.getConfiguration()); } } this.readCommittedScope = readCommittedScope; } return readCommittedScope; } }
if (uniqueSegments.get(segmentId) == null) { segments.add(Segment.toSegment(segmentId, new TableStatusReadCommittedScope(table.getAbsoluteTableIdentifier(), loadMetadataDetails, FileFactory.getConfiguration()))); uniqueSegments.put(segmentId, 1);
readCommittedScope = new TableStatusReadCommittedScope(identifier, loadMetadataDetails, configuration);
@Override public LoadMetadataDetails[] getSegmentList() throws IOException { try { if (loadMetadataDetails == null) { takeCarbonIndexFileSnapShot(); } return loadMetadataDetails; } catch (IOException ex) { throw new IOException("Problem encountered while reading the Table Status file.", ex); } }