public final static int getCoordinateOffset(Coordinate coordinate) throws HyracksDataException { switch (coordinate) { case X: return 1; case Y: return 9; default: throw new HyracksDataException("Wrong coordinate"); } } }
@Override public void put(ITreeIndexMetadataFrame frame, IValueReference key, IValueReference value) throws HyracksDataException { throw new HyracksDataException("Unsupported Operation"); }
public final static int getUpperRightCoordinateOffset(Coordinate coordinate) throws HyracksDataException { switch (coordinate) { case X: return 17; case Y: return 25; default: throw new HyracksDataException("Wrong coordinate"); } } }
public final static int getEndPointCoordinateOffset(Coordinate coordinate) throws HyracksDataException { switch (coordinate) { case X: return 17; case Y: return 25; default: throw new HyracksDataException("Wrong coordinate"); } } }
private void validateDatasetLifecycleManagerState() throws HyracksDataException { if (stopped) { throw new HyracksDataException(DatasetLifecycleManager.class.getSimpleName() + " was stopped."); } }
@Override public Object call() throws HyracksDataException { count++; throw new HyracksDataException(errorMessage); }
public void parseUUIDString(char[] buffer, int begin, int len) throws HyracksDataException { if (len != UUID_CHARS) { throw new HyracksDataException("This is not a correct UUID value: " + new String(buffer, begin, len)); } for (int i = 0; i < len; i++) { hexBytesBuffer[i] = (byte) buffer[begin + i]; } parseUUIDHexBytes(hexBytesBuffer, 0); }
@Override public void nextFrame(ByteBuffer buffer) throws HyracksDataException { if (!state.frameSorter.insertFrame(buffer)) { throw new HyracksDataException("Failed to insert the given frame into sorting buffer. " + "Please increase the sorting memory budget to enable the in-memory sorting, " + "or you could use ExternalSort instead."); } }
@Override public void register(String resourcePath, IIndex index) throws HyracksDataException { if (indexInfos.containsKey(resourcePath)) { throw new HyracksDataException("Index with resource name " + resourcePath + " already exists."); } indexInfos.put(resourcePath, new IndexInfo(index)); }
@SuppressWarnings("deprecation") private void failCompile(Behavior behavior) throws HyracksDataException { if (behavior == Behavior.FAIL_COMPILE || behavior == Behavior.STEP_FAIL_COMPILE) { throw new HyracksDataException("Compilation Failure"); } }
@SuppressWarnings("deprecation") @Override public void before(ILSMMemoryComponent c) throws HyracksDataException { throw new HyracksDataException("Fail on allocate callback"); }
public static HyracksDataException create(int code, Throwable cause, SourceLocation sourceLoc, Serializable... params) { return new HyracksDataException(ErrorCode.HYRACKS, code, ErrorCode.getErrorMessage(code), cause, sourceLoc, params); }
@Override public synchronized void insert(LocalResource resource) throws HyracksDataException { long id = resource.getId(); if (id2ResourceMap.containsKey(id)) { throw new HyracksDataException("Duplicate resource"); } id2ResourceMap.put(id, resource); name2ResourceMap.put(resource.getPath(), resource); }
public FrameSpiller(IHyracksTaskContext ctx, String fileNamePrefix, long budgetInBytes) throws HyracksDataException { this.frame = new VSizeFrame(ctx); this.fileNamePrefix = fileNamePrefix; this.budget = (int) Math.min(budgetInBytes / ctx.getInitialFrameSize(), Integer.MAX_VALUE); if (budget <= 0) { throw new HyracksDataException("Invalid budget " + budgetInBytes + ". Budget must be larger than 0"); } }
@Override public void before(Semaphore t) throws HyracksDataException { secondaryFlushSemaphore.release(); throw new HyracksDataException("Kill the fluhs thread"); }
@Override public void writeNull(DataOutput out) throws HyracksDataException { XDMConstants.setEmptySequence(vp); try { out.write(vp.getByteArray(), vp.getStartOffset(), vp.getLength()); } catch (IOException e) { throw new HyracksDataException(e); } } };
@Override public void after(Semaphore t) throws HyracksDataException { // manually set the current memory component as modified index.getCurrentMemoryComponent().setModified(); throw new HyracksDataException("Fail the job"); } });
public long getEndValue() throws HyracksDataException { switch (getTypeTag()) { case DATE: case TIME: return IntegerPointable.getInteger(bytes, getEndOffset()); case DATETIME: return LongPointable.getLong(bytes, getEndOffset()); default: throw new HyracksDataException("Unsupported interval type: " + getTypeTag() + "."); } }
private void flushBigProbeObjectToDisk(int pid, FrameTupleAccessor accessorProbe, int i) throws HyracksDataException { if (bigProbeFrameAppender == null) { bigProbeFrameAppender = new FrameTupleAppender(new VSizeFrame(ctx)); } RunFileWriter runFileWriter = getSpillWriterOrCreateNewOneIfNotExist(pid, SIDE.PROBE); if (!bigProbeFrameAppender.append(accessorProbe, i)) { throw new HyracksDataException("The given tuple is too big"); } bigProbeFrameAppender.write(runFileWriter, true); }
private void deleteTupleFromBuffer(BufferInfo bufferInfo) throws HyracksDataException { if (bufferInfo.getBuffer() != appendFrame.getBuffer()) { appendFrame.reset(bufferInfo.getBuffer()); appender.reset(appendFrame, false); } if (!appender.cancelAppend()) { throw new HyracksDataException("Undoing the last insertion in the given frame couldn't be done."); } }