final InetSocketAddress address = new InetSocketAddress(gateway.getHostname(), blobServerPort); try { ClientUtils.extractAndUploadJobGraphFiles(jobGraph, () -> new BlobClient(address, configuration)); } catch (FlinkException e) { throw new CompletionException(e);
@Override public BlobClient createClient() throws IOException { return new BlobClient(serverAddress, blobClientConfig); }
private BlobClient createClient() throws IOException { final InetSocketAddress currentServerAddress = serverAddress; if (currentServerAddress != null) { return new BlobClient(currentServerAddress, blobClientConfig); } else { throw new IOException("Could not create BlobClient because the BlobServer address is unknown."); } }
private BlobClient createClient() throws IOException { final InetSocketAddress currentServerAddress = serverAddress; if (currentServerAddress != null) { return new BlobClient(currentServerAddress, blobClientConfig); } else { throw new IOException("Could not create BlobClient because the BlobServer address is unknown."); } }
private BlobClient createClient() throws IOException { final InetSocketAddress currentServerAddress = serverAddress; if (currentServerAddress != null) { return new BlobClient(currentServerAddress, blobClientConfig); } else { throw new IOException("Could not create BlobClient because the BlobServer address is unknown."); } }
protected BlobClient createClient() throws IOException { return new BlobClient(new InetSocketAddress(serverSocket.getInetAddress(), getPort()), blobServiceConfiguration); }
protected BlobClient createClient() throws IOException { return new BlobClient(new InetSocketAddress(serverSocket.getInetAddress(), getPort()), blobServiceConfiguration); }
@Override public BlobClient createClient() throws IOException { return new BlobClient(new InetSocketAddress(serverSocket.getInetAddress(), getPort()), blobServiceConfiguration); }
protected BlobClient createClient() throws IOException { return new BlobClient(new InetSocketAddress(serverSocket.getInetAddress(), getPort()), blobServiceConfiguration); }
private CompletableFuture<Void> uploadAndSetJobFiles(final CompletableFuture<InetSocketAddress> blobServerAddressFuture, final JobGraph job) { return blobServerAddressFuture.thenAccept(blobServerAddress -> { try { ClientUtils.extractAndUploadJobGraphFiles(job, () -> new BlobClient(blobServerAddress, miniClusterConfiguration.getConfiguration())); } catch (FlinkException e) { throw new CompletionException(e); } }); }
List<PermanentBlobKey> blobKeys = new ArrayList<>(); try (BlobClient blobClient = new BlobClient(serverAddress, clientConfig)) { for (final Path file : files) { final PermanentBlobKey key = blobClient.uploadFile(jobId, file);
private CompletableFuture<Void> uploadAndSetJobFiles(final CompletableFuture<InetSocketAddress> blobServerAddressFuture, final JobGraph job) { return blobServerAddressFuture.thenAccept(blobServerAddress -> { try { ClientUtils.extractAndUploadJobGraphFiles(job, () -> new BlobClient(blobServerAddress, miniClusterConfiguration.getConfiguration())); } catch (FlinkException e) { throw new CompletionException(e); } }); }
private CompletableFuture<Void> uploadAndSetJobFiles(final CompletableFuture<InetSocketAddress> blobServerAddressFuture, final JobGraph job) { return blobServerAddressFuture.thenAccept(blobServerAddress -> { try { ClientUtils.extractAndUploadJobGraphFiles(job, () -> new BlobClient(blobServerAddress, miniClusterConfiguration.getConfiguration())); } catch (FlinkException e) { throw new CompletionException(e); } }); }
List<PermanentBlobKey> blobKeys = new ArrayList<>(); try (BlobClient blobClient = new BlobClient(serverAddress, clientConfig)) { for (final Path file : files) { final PermanentBlobKey key = blobClient.uploadFile(jobId, file);
List<PermanentBlobKey> blobKeys = new ArrayList<>(); try (BlobClient blobClient = new BlobClient(serverAddress, clientConfig)) { for (final Path file : files) { final PermanentBlobKey key = blobClient.uploadFile(jobId, file);
List<BlobKey> blobKeys = new ArrayList<>(); try (BlobClient blobClient = new BlobClient(serverAddress, clientConfig)) { for (final Path jar : jars) { final FileSystem fs = jar.getFileSystem();
private CompletableFuture<JobGraph> uploadJobGraphFiles( DispatcherGateway gateway, CompletableFuture<JobGraph> jobGraphFuture, Collection<Path> jarFiles, Collection<Tuple2<String, Path>> artifacts, Configuration configuration) { CompletableFuture<Integer> blobServerPortFuture = gateway.getBlobServerPort(timeout); return jobGraphFuture.thenCombine(blobServerPortFuture, (JobGraph jobGraph, Integer blobServerPort) -> { final InetSocketAddress address = new InetSocketAddress(gateway.getHostname(), blobServerPort); try { // Add users jars located in dfs for (Path path : jobGraph.getUserJars()) { if (path.getFileSystem().isDistributedFS()) { jarFiles.add(path); } } log.info("Uploading jarFiles {} and userArtifacts {} to blob server", jarFiles.toString(), artifacts.toString()); ClientUtils.uploadJobGraphFiles(jobGraph, jarFiles, artifacts, () -> new BlobClient(address, configuration)); } catch (IOException | FlinkException e) { throw new CompletionException(new RestHandlerException( "Could not upload job files.", HttpResponseStatus.INTERNAL_SERVER_ERROR, e)); } return jobGraph; }); }
private CompletableFuture<JobGraph> uploadJobGraphFiles( DispatcherGateway gateway, CompletableFuture<JobGraph> jobGraphFuture, Collection<Path> jarFiles, Collection<Tuple2<String, Path>> artifacts, Configuration configuration) { CompletableFuture<Integer> blobServerPortFuture = gateway.getBlobServerPort(timeout); return jobGraphFuture.thenCombine(blobServerPortFuture, (JobGraph jobGraph, Integer blobServerPort) -> { final InetSocketAddress address = new InetSocketAddress(gateway.getHostname(), blobServerPort); try { ClientUtils.uploadJobGraphFiles(jobGraph, jarFiles, artifacts, () -> new BlobClient(address, configuration)); } catch (FlinkException e) { throw new CompletionException(new RestHandlerException( "Could not upload job files.", HttpResponseStatus.INTERNAL_SERVER_ERROR, e)); } return jobGraph; }); }
private CompletableFuture<JobGraph> uploadJobGraphFiles( DispatcherGateway gateway, CompletableFuture<JobGraph> jobGraphFuture, Collection<Path> jarFiles, Collection<Tuple2<String, Path>> artifacts, Configuration configuration) { CompletableFuture<Integer> blobServerPortFuture = gateway.getBlobServerPort(timeout); return jobGraphFuture.thenCombine(blobServerPortFuture, (JobGraph jobGraph, Integer blobServerPort) -> { final InetSocketAddress address = new InetSocketAddress(gateway.getHostname(), blobServerPort); try { ClientUtils.uploadJobGraphFiles(jobGraph, jarFiles, artifacts, () -> new BlobClient(address, configuration)); } catch (FlinkException e) { throw new CompletionException(new RestHandlerException( "Could not upload job files.", HttpResponseStatus.INTERNAL_SERVER_ERROR, e)); } return jobGraph; }); }
final InetSocketAddress address = new InetSocketAddress(gateway.getHostname(), blobServerPort); try { ClientUtils.extractAndUploadJobGraphFiles(jobGraph, () -> new BlobClient(address, configuration)); } catch (FlinkException e) { throw new CompletionException(e);