@Override public void close() throws HyracksDataException { ctx.setStateObject(state); }
@Override public void close() throws HyracksDataException { ctx.setStateObject(state); }
@Override public void close() throws HyracksDataException { state.joiner.closeCache(); ctx.setStateObject(state); }
@Override public void close() throws HyracksDataException { state.close(); ctx.setStateObject(state); }
@Override public void close() throws HyracksDataException { state.frameSorter.sort(); ctx.setStateObject(state); }
@Override public void close() throws HyracksDataException { state.hybridHJ.closeBuild(); if (isFailed) { state.hybridHJ.clearBuildTempFiles(); } else { ctx.setStateObject(state); if (LOGGER.isTraceEnabled()) { LOGGER.trace("OptimizedHybridHashJoin closed its build phase"); } } }
@Override public void close() throws HyracksDataException { if (isFailed && state.getRuns() != null) { for (RunFileWriter run : state.getRuns()) { if (run != null) { run.erase(); } } } else { externalGroupBy.flushSpilledPartitions(); ctx.setStateObject(state); if (LOGGER.isDebugEnabled()) { int numOfPartition = state.getSpillableTable().getNumPartitions(); int numOfSpilledPart = 0; for (int i = 0; i < numOfPartition; i++) { if (state.getSpilledNumTuples()[i] > 0) { numOfSpilledPart++; } } LOGGER.debug("level 0:" + "build with " + numOfPartition + " partitions" + ", spilled " + numOfSpilledPart + " partitions"); } } state = null; externalGroupBy = null; }
@Override public void close() throws HyracksDataException { HyracksDataException hde = null; try { if (requiresMaterialization) { state.close(); ctx.setStateObject(state); } } finally { for (int i = 0; i < numberOfNonMaterializedOutputs; i++) { if (isOpen[i]) { try { writers[i].close(); } catch (Throwable th) { if (hde == null) { hde = HyracksDataException.create(th); } else { hde.addSuppressed(th); } } } } } if (hde != null) { throw hde; } }
@Override public void close() throws HyracksDataException { SortTaskState state = new SortTaskState(ctx.getJobletContext().getJobId(), new TaskId(getActivityId(), partition)); runGen.close(); state.generatedRunFileReaders = runGen.getRuns(); state.sorter = runGen.getSorter(); if (LOGGER.isTraceEnabled()) { LOGGER.trace("InitialNumberOfRuns:" + runGen.getRuns().size()); } ctx.setStateObject(state); }
@Override public void close() throws HyracksDataException { // expecting a range map if (numFields <= 0 || splitValues == null || splitValuesEndOffsets == null) { throw HyracksDataException.create(ErrorCode.NO_RANGEMAP_PRODUCED, sourceLoc); } // store the range map in the state object of ctx so that next activity (forward) could retrieve it TaskId rangeMapReaderTaskId = new TaskId(activityId, partition); RangeMapState rangeMapState = new RangeMapState(ctx.getJobletContext().getJobId(), rangeMapReaderTaskId); rangeMapState.rangeMap = new RangeMap(numFields, splitValues, splitValuesEndOffsets); ctx.setStateObject(rangeMapState); } }
@Override public void open() throws HyracksDataException { super.open(); deletedTupleCounter = new DeletedTupleCounter(ctx.getJobletContext().getJobId(), partition); ctx.setStateObject(deletedTupleCounter); try { tb = new ArrayTupleBuilder(recordDesc.getFieldCount()); dos = tb.getDataOutput(); appender = new FrameTupleAppender(new VSizeFrame(ctx), true); } catch (Exception e) { throw HyracksDataException.create(e); } }