@Override public void revertResize() { if (!resizeAttempted) { /* because this is invoked for all accumulators under NestedAccumulator, * it will be a NO-OP for some accumulators if we failed in the middle * of NestedAccumulator. */ return; } this.accumulators[batches - 1].close(); /* not really necessary */ this.accumulators[batches - 1] = null; this.bitAddresses[batches - 1] = 0; this.valueAddresses[batches - 1] = 0L; resizeAttempted = false; batches--; checkNotNull(); }
@Override public void close() throws IOException { parser.close(); for (Dictionary dictionary : dictionaries.values()) { dictionary.getVector().close(); } }
@Override public void close() { final Collection<FieldVector> vectors = getChildren(); for (final FieldVector v : vectors) { v.close(); } vectors.clear(); valueCount = 0; super.close(); }
/** * Close resources, including vector schema root and dictionary vectors. If the flag * closeReadChannel is true then close the underlying read source, otherwise leave it open. * * @param closeReadSource Flag to control if closing the underlying read source * @throws IOException on error */ public void close(boolean closeReadSource) throws IOException { if (initialized) { root.close(); for (Dictionary dictionary : dictionaries.values()) { dictionary.getVector().close(); } } if (closeReadSource) { closeReadSource(); } }