Java Code Examples for org.apache.flink.util.IOUtils#closeAllQuietly()
The following examples show how to use
org.apache.flink.util.IOUtils#closeAllQuietly() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RocksDBIncrementalRestoreOperation.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public void close() { List<ColumnFamilyOptions> columnFamilyOptions = new ArrayList<>(columnFamilyDescriptors.size() + 1); columnFamilyDescriptors.forEach((cfd) -> columnFamilyOptions.add(cfd.getOptions())); RocksDBOperationUtils.addColumnFamilyOptionsToCloseLater(columnFamilyOptions, defaultColumnFamilyHandle); IOUtils.closeQuietly(defaultColumnFamilyHandle); IOUtils.closeAllQuietly(columnFamilyHandles); IOUtils.closeQuietly(db); IOUtils.closeAllQuietly(columnFamilyOptions); }
Example 2
Source File: RocksStatesPerKeyGroupMergeIterator.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public void close() { IOUtils.closeQuietly(currentSubIterator); currentSubIterator = null; IOUtils.closeAllQuietly(heap); heap.clear(); }
Example 3
Source File: RocksDBIncrementalRestoreOperation.java From flink with Apache License 2.0 | 5 votes |
@Override public void close() { List<ColumnFamilyOptions> columnFamilyOptions = new ArrayList<>(columnFamilyDescriptors.size() + 1); columnFamilyDescriptors.forEach((cfd) -> columnFamilyOptions.add(cfd.getOptions())); RocksDBOperationUtils.addColumnFamilyOptionsToCloseLater(columnFamilyOptions, defaultColumnFamilyHandle); IOUtils.closeQuietly(defaultColumnFamilyHandle); IOUtils.closeAllQuietly(columnFamilyHandles); IOUtils.closeQuietly(db); IOUtils.closeAllQuietly(columnFamilyOptions); }
Example 4
Source File: RocksStatesPerKeyGroupMergeIterator.java From flink with Apache License 2.0 | 5 votes |
@Override public void close() { IOUtils.closeQuietly(currentSubIterator); currentSubIterator = null; IOUtils.closeAllQuietly(heap); heap.clear(); }
Example 5
Source File: RocksDBCheckpointIterator.java From bravo with Apache License 2.0 | 5 votes |
@Override public void close() throws IOException { IOUtils.closeQuietly(cancelStreamRegistry); IOUtils.closeAllQuietly(stateColumnFamilyHandles); IOUtils.closeQuietly(db); IOUtils.closeQuietly(dbOptions); IOUtils.closeQuietly(colOptions); FileUtils.deleteDirectoryQuietly(new File(localPath)); }
Example 6
Source File: RocksDBIncrementalRestoreOperation.java From flink with Apache License 2.0 | 5 votes |
@Override public void close() { List<ColumnFamilyOptions> columnFamilyOptions = new ArrayList<>(columnFamilyDescriptors.size() + 1); columnFamilyDescriptors.forEach((cfd) -> columnFamilyOptions.add(cfd.getOptions())); RocksDBOperationUtils.addColumnFamilyOptionsToCloseLater(columnFamilyOptions, defaultColumnFamilyHandle); IOUtils.closeQuietly(defaultColumnFamilyHandle); IOUtils.closeAllQuietly(columnFamilyHandles); IOUtils.closeQuietly(db); IOUtils.closeAllQuietly(columnFamilyOptions); IOUtils.closeQuietly(readOptions); }
Example 7
Source File: RocksStatesPerKeyGroupMergeIterator.java From flink with Apache License 2.0 | 5 votes |
@Override public void close() { IOUtils.closeQuietly(currentSubIterator); currentSubIterator = null; IOUtils.closeAllQuietly(heap); heap.clear(); }
Example 8
Source File: SubtaskCheckpointCoordinatorImpl.java From flink with Apache License 2.0 | 5 votes |
@Override public void close() throws IOException { List<AsyncCheckpointRunnable> asyncCheckpointRunnables = null; synchronized (lock) { if (!closed) { closed = true; asyncCheckpointRunnables = new ArrayList<>(checkpoints.values()); checkpoints.clear(); } } IOUtils.closeAllQuietly(asyncCheckpointRunnables); channelStateWriter.close(); }
Example 9
Source File: Checkpoints.java From flink-statefun with Apache License 2.0 | 4 votes |
@Override public void close() { IOUtils.closeAllQuietly(uncompletedCheckpoints.values()); uncompletedCheckpoints.clear(); }
Example 10
Source File: RocksDBKeyedStateInputFormat.java From bravo with Apache License 2.0 | 4 votes |
@Override public void close() throws IOException { IOUtils.closeAllQuietly(iterators); iterators.clear(); }