@Override public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) { synchronized (copies) { return new SourceSwitchingIterator(source.getDeepCopyDataSource(env), onlySwitchAfterRow, copies); } }
public synchronized MemoryIterator skvIterator(SamplerConfigurationImpl iteratorSamplerConfig) { if (map == null) throw new NullPointerException(); if (deleted) throw new IllegalStateException("Can not obtain iterator after map deleted"); int mc = kvCount.get(); MemoryDataSource mds = new MemoryDataSource(iteratorSamplerConfig); // TODO seems like a bug that two MemoryDataSources are created... may need to fix in older // branches SourceSwitchingIterator ssi = new SourceSwitchingIterator(mds); MemoryIterator mi = new MemoryIterator(new PartialMutationSkippingIterator(ssi, mc)); mi.setSSI(ssi); mi.setMDS(mds); activeIters.add(mi); return mi; }
public void checkConditions(ConditionChecker checker, Authorizations authorizations, AtomicBoolean iFlag) throws IOException { ScanDataSource dataSource = new ScanDataSource(this, authorizations, this.defaultSecurityLabel, iFlag); try { SortedKeyValueIterator<Key,Value> iter = new SourceSwitchingIterator(dataSource); checker.check(iter); } catch (IOException ioe) { dataSource.close(true); throw ioe; } finally { // code in finally block because always want // to return mapfiles, even when exception is thrown dataSource.close(false); } }
SortedKeyValueIterator<Key,Value> iter = new SourceSwitchingIterator(dataSource); result = lookup(iter, ranges, columns, results, maxResultSize, batchTimeOut); return result;
FileDataSource fds = new FileDataSource(filename, source); dataSources.add(fds); SourceSwitchingIterator ssi = new SourceSwitchingIterator(fds); iter = new ProblemReportingIterator(context, tablet.getTableId(), filename, continueOnFailure, ssi);
isolatedIter = new SourceSwitchingIterator(dataSource, true); else isolatedDataSource.reattachFileManager(); iter = isolatedIter; } else { iter = new SourceSwitchingIterator(dataSource, false);
@Override public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) { synchronized (copies) { return new SourceSwitchingIterator(source.getDeepCopyDataSource(env), onlySwitchAfterRow, copies); } }
public synchronized MemoryIterator skvIterator(SamplerConfigurationImpl iteratorSamplerConfig) { if (map == null) throw new NullPointerException(); if (deleted) throw new IllegalStateException("Can not obtain iterator after map deleted"); int mc = kvCount.get(); MemoryDataSource mds = new MemoryDataSource(iteratorSamplerConfig); // TODO seems like a bug that two MemoryDataSources are created... may need to fix in older // branches SourceSwitchingIterator ssi = new SourceSwitchingIterator(mds); MemoryIterator mi = new MemoryIterator(new PartialMutationSkippingIterator(ssi, mc)); mi.setSSI(ssi); mi.setMDS(mds); activeIters.add(mi); return mi; }
public synchronized MemoryIterator skvIterator() { if (map == null) throw new NullPointerException(); if (deleted) throw new IllegalStateException("Can not obtain iterator after map deleted"); int mc = kvCount.get(); MemoryDataSource mds = new MemoryDataSource(); SourceSwitchingIterator ssi = new SourceSwitchingIterator(new MemoryDataSource()); MemoryIterator mi = new MemoryIterator(new PartialMutationSkippingIterator(ssi, mc)); mi.setSSI(ssi); mi.setMDS(mds); activeIters.add(mi); return mi; }
synchronized List<InterruptibleIterator> openFiles(Map<String,DataFileValue> files, boolean detachable) throws IOException { List<FileSKVIterator> newlyReservedReaders = openFiles(files.keySet()); ArrayList<InterruptibleIterator> iters = new ArrayList<InterruptibleIterator>(); for (FileSKVIterator reader : newlyReservedReaders) { String filename = getReservedReadeFilename(reader); InterruptibleIterator iter; if (detachable) { FileDataSource fds = new FileDataSource(filename, reader); dataSources.add(fds); SourceSwitchingIterator ssi = new SourceSwitchingIterator(fds); iter = new ProblemReportingIterator(tablet.getTableId().toString(), filename, continueOnFailure, ssi); } else { iter = new ProblemReportingIterator(tablet.getTableId().toString(), filename, continueOnFailure, reader); } if (files.get(filename).isTimeSet()) { iter = new TimeSettingIterator(iter, files.get(filename).getTime()); } iters.add(iter); } return iters; }
SortedKeyValueIterator<Key,Value> iter = new SourceSwitchingIterator(dataSource); result = lookup(iter, ranges, columns, results, maxResultSize); return result;
public void checkConditions(ConditionChecker checker, Authorizations authorizations, AtomicBoolean iFlag) throws IOException { ScanDataSource dataSource = new ScanDataSource(this, authorizations, this.defaultSecurityLabel, iFlag); try { SortedKeyValueIterator<Key,Value> iter = new SourceSwitchingIterator(dataSource); checker.check(iter); } catch (IOException ioe) { dataSource.close(true); throw ioe; } finally { // code in finally block because always want // to return mapfiles, even when exception is thrown dataSource.close(false); } }
SortedKeyValueIterator<Key,Value> iter = new SourceSwitchingIterator(dataSource); result = lookup(iter, ranges, columns, results, maxResultSize, batchTimeOut); return result;
FileDataSource fds = new FileDataSource(filename, source); dataSources.add(fds); SourceSwitchingIterator ssi = new SourceSwitchingIterator(fds); iter = new ProblemReportingIterator(context, tablet.getTableId(), filename, continueOnFailure, ssi);
isolatedIter = new SourceSwitchingIterator(dataSource, true); else isolatedDataSource.fileManager.reattach(); iter = isolatedIter; } else { iter = new SourceSwitchingIterator(dataSource, false);
isolatedIter = new SourceSwitchingIterator(dataSource, true); else isolatedDataSource.reattachFileManager(); iter = isolatedIter; } else { iter = new SourceSwitchingIterator(dataSource, false);