@Override public void close() throws Exception { AutoCloseables.close(parser, inputStream); } }
/** * Get the Dremio version from pom * @return the version number as x.y.z */ public static String getVersion() { return VERSION.getVersion(); }
private void deleteAllIterators(DeferredException ex) { // It is "safe" to iterate while adding/removing entries (also changes might not be visible) // It is not safe to have two threads iterating at the same time synchronized(iteratorSet) { for(IteratorReference ref : iteratorSet){ ex.suppressingClose(ref); } } }
@Override public void submissionFailed(UserException ex) { AutoCloseables.closeNoChecked(allocator); this.ex = ex; }
/** * If an exception exists, will throw the exception and then clear it. This is so in cases where want to reuse * DeferredException, we don't double report the same exception. * * @throws Exception */ public synchronized void throwAndClear() throws Exception { final Exception e = getAndClear(); if (e != null) { throw e; } }
/** * Get the Dremio build number from pom * @return z if assuming the version number is x.y.z(.b)(-suffix) */ public static int getBuildNumber() { return VERSION.getPatchVersion(); }
/** * Called before committing the KV value to the store (and before incrementVersion is called). * * In the case of an remote KV store, this is called before the version retrieved from the master is set. * * @param value that is being committed * @return a AutoClosable that is called if the commit fails */ default AutoCloseable preCommit(T value) { return AutoCloseables.noop(); }
@Override public synchronized void close() throws Exception { try { throwAndClear(); } finally { isClosed = true; } } }
@Override public void finalPrel(final Prel prel) { serializedExec.execute(new DeferredRunnable() { @Override public void doRun() { innerObserver.finalPrel(prel); } }); }
@Override public void close() throws Exception { AutoCloseables.close(workbookStream); } }
@Override public void planNormalized(final long millisTaken, final List<RelNode> normalizedQueryPlans) { serializedExec.execute(new DeferredRunnable() { @Override public void doRun() { innerObserver.planNormalized(millisTaken, normalizedQueryPlans); } }); }
@Override public void planText(final String text, final long millisTaken) { serializedExec.execute(new DeferredRunnable() { @Override public void doRun() { innerObserver.planText(text, millisTaken); } }); }
@Override public void close() throws Exception { AutoCloseables.close(children); } }
@Override public void planParallelStart() { serializedExec.execute(new DeferredRunnable() { @Override public void doRun() { innerObserver.planParallelStart(); } }); }
@Override public void close() throws Exception { AutoCloseables.close(inputStream, diskPartition); } }
@Override public void substitutionFailures(Iterable<String> errors) { serializedExec.execute(new DeferredRunnable() { @Override void doRun() { innerObserver.substitutionFailures(errors); } }); }
@Override public void close() throws Exception { AutoCloseables.close(pkgInputStream, sheetInputStream); } }
@Override public void planGenerationTime(final long millisTaken) { serializedExec.execute(new DeferredRunnable(){ @Override public void doRun() { innerObserver.planGenerationTime(millisTaken); }}); }
@Override public void tablesCollected(Iterable<DremioTable> tables) { serializedExec.execute(new DeferredRunnable() { @Override void doRun() { innerObserver.tablesCollected(tables); } }); } }