@Override public void close() throws Exception { lock.lock(); try { // close only once if (closed) { return; } closed = true; Throwable exception = null; try { blobStoreService.close(); } catch (Throwable t) { exception = t; } // we do not propagate exceptions here, but only log them try { hadoopFileSystem.close(); } catch (Throwable t) { exception = ExceptionUtils.firstOrSuppressed(t, exception); } if (exception != null) { ExceptionUtils.rethrowException(exception, "Could not properly close the YarnHighAvailabilityServices."); } } finally { lock.unlock(); } }
@Nonnull private static JobGraph getJobGraphWithMissingBlobKey() { final JobGraph jobGraph = getWorkingJobGraph(); jobGraph.addUserJarBlobKey(new PermanentBlobKey()); return jobGraph; }
blobStoreService.closeAndCleanupAllData(); } catch (Throwable t) { exception = t;
new BlobCacheService(mock(PermanentBlobCache.class), mock(TransientBlobCache.class)); blobService, new BlobLibraryCacheManager( blobService.getPermanentBlobService(), FlinkUserCodeClassLoaders.ResolveOrder.CHILD_FIRST, new String[0]), new FileCache(new String[] { EnvironmentInformation.getTemporaryFileDirectory() }, blobService.getPermanentBlobService()), new TestingTaskManagerRuntimeInfo(), UnregisteredMetricGroups.createUnregisteredTaskMetricGroup(),
/** * Closes the connection socket and lets the thread exit. */ public void close() { closeSilently(clientSocket, LOG); interrupt(); }
@Override public TransientBlobKey putTransient(byte[] value) throws IOException { try (BlobClient bc = createClient()) { return (TransientBlobKey) bc.putBuffer(null, value, 0, value.length, TRANSIENT_BLOB); } }
@Override public TransientBlobKey putTransient(InputStream inputStream) throws IOException { try (BlobClient bc = createClient()) { return (TransientBlobKey) bc.putInputStream(null, inputStream, TRANSIENT_BLOB); } }
blobStoreService = new FileSystemBlobStore(flinkFileSystem, haDataDirectory.toString());
final InetSocketAddress address = new InetSocketAddress(gateway.getHostname(), blobServerPort); try { ClientUtils.extractAndUploadJobGraphFiles(jobGraph, () -> new BlobClient(address, configuration)); } catch (FlinkException e) { throw new CompletionException(e);
/** * Sets the address of the {@link BlobServer}. * * @param blobServerAddress address of the {@link BlobServer}. */ public void setBlobServerAddress(InetSocketAddress blobServerAddress) { permanentBlobCache.setBlobServerAddress(blobServerAddress); transientBlobCache.setBlobServerAddress(blobServerAddress); }
@Override public void get(BlobKey blobKey, File localFile) throws IOException { get(BlobUtils.getRecoveryPath(basePath, blobKey), localFile); }
new BlobCacheService(mock(PermanentBlobCache.class), mock(TransientBlobCache.class));
new TestingSlotProvider(ignored -> new CompletableFuture<>()), ExecutionGraph.class.getClassLoader(), VoidBlobWriter.getInstance(), AkkaUtils.getDefaultTimeout()); try {
new BlobCacheService(mock(PermanentBlobCache.class), mock(TransientBlobCache.class)); blobService, new BlobLibraryCacheManager( blobService.getPermanentBlobService(), FlinkUserCodeClassLoaders.ResolveOrder.CHILD_FIRST, new String[0]), new FileCache(new String[] { EnvironmentInformation.getTemporaryFileDirectory() }, blobService.getPermanentBlobService()), new TestingTaskManagerRuntimeInfo(), UnregisteredMetricGroups.createUnregisteredTaskMetricGroup(),
/** * Closes the connection socket and lets the thread exit. */ public void close() { closeSilently(clientSocket, LOG); interrupt(); }
@Override public TransientBlobKey putTransient(byte[] value) throws IOException { try (BlobClient bc = createClient()) { return (TransientBlobKey) bc.putBuffer(null, value, 0, value.length, TRANSIENT_BLOB); } }
new BlobCacheService(mock(PermanentBlobCache.class), mock(TransientBlobCache.class)); blobService, new BlobLibraryCacheManager( blobService.getPermanentBlobService(), FlinkUserCodeClassLoaders.ResolveOrder.CHILD_FIRST, new String[0]),
/** * Closes the connection socket and lets the thread exit. */ public void close() { closeSilently(clientSocket, LOG); interrupt(); }