void next(OrcStruct next)
            {
                if (recordReader.hasNext())
                {
                    nextRecord = (OrcStruct)recordReader.next(next);
                    // set the key
                    key.setValues(OrcRecordUpdater.getOriginalTransaction(nextRecord),
                                  OrcRecordUpdater.getBucket(nextRecord),
                                  OrcRecordUpdater.getRowId(nextRecord),
                                  OrcRecordUpdater.getCurrentTransaction(nextRecord),
                                  statementId);

                    // if this record is larger than maxKey, we need to stop
                    if (maxKey != null && key.compareRow(maxKey) > 0)
                    {
                        LOG.debug("key " + key + " > maxkey " + maxKey);
                        nextRecord = null;
                        recordReader.Dispose();
                    }
                }
                else
                {
                    nextRecord = null;
                    recordReader.Dispose();
                }
            }
Ejemplo n.º 2
0
            protected override void Dispose(bool disposing)
            {
                if (!usingStockReader)
                {
                    reader.Dispose();
                }

                base.Dispose(disposing);
            }