/** * Persist all data indexed through this driver so far. Returns a future of persisted commitMetadata. * <p> * Should be called after all data has been added through {@link #add(InputRow, String, Supplier, boolean, boolean)}. * * @param committer committer representing all data that has been added so far * * @return future containing commitMetadata persisted */ public ListenableFuture<Object> persistAsync(final Committer committer) { return appenderator.persistAll(wrapCommitter(committer)); }
/** * Persist all data indexed through this driver so far. Blocks until complete. * <p> * Should be called after all data has been added through {@link #add(InputRow, String, Supplier, boolean, boolean)}. * * @param committer committer representing all data that has been added so far * * @return commitMetadata persisted */ public Object persist(final Committer committer) throws InterruptedException { try { log.info("Persisting data."); final long start = System.currentTimeMillis(); final Object commitMetadata = appenderator.persistAll(wrapCommitter(committer)).get(); log.info("Persisted pending data in %,dms.", System.currentTimeMillis() - start); return commitMetadata; } catch (InterruptedException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }
pushInBackground(wrapCommitter(committer), theSegments, true), sam -> publishInBackground( sam,
/** * Persist all data indexed through this driver so far. Returns a future of persisted commitMetadata. * * Should be called after all data has been added through {@link #add(InputRow, String, Supplier, boolean, boolean)}. * * @param committer committer representing all data that has been added so far * * @return future containing commitMetadata persisted */ public ListenableFuture<Object> persistAsync(final Committer committer) { return appenderator.persistAll(wrapCommitter(committer)); }
/** * Persist all data indexed through this driver so far. Blocks until complete. * * Should be called after all data has been added through {@link #add(InputRow, String, Supplier, boolean, boolean)}. * * @param committer committer representing all data that has been added so far * * @return commitMetadata persisted */ public Object persist(final Committer committer) throws InterruptedException { try { log.info("Persisting data."); final long start = System.currentTimeMillis(); final Object commitMetadata = appenderator.persistAll(wrapCommitter(committer)).get(); log.info("Persisted pending data in %,dms.", System.currentTimeMillis() - start); return commitMetadata; } catch (InterruptedException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }
pushInBackground(wrapCommitter(committer), theSegments, true), sam -> publishInBackground( sam,