@Override public void close() throws IOException { permanentBlobCache.close(); transientBlobCache.close(); }
@Override public int getPort() { // NOTE: both blob stores connect to the same server! return permanentBlobCache.getPort(); } }
/** * 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); }
try { permanentBlobCache = new PermanentBlobCache(config, highAvailabilityServices.createBlobStore(), serverAddress); } catch (IOException e) { throw new JobRetrievalException( for (PermanentBlobKey blobKey : props.requiredJarFiles()) { try { allURLs[pos++] = permanentBlobCache.getFile(jobID, blobKey).toURI().toURL(); } catch (Exception e) { try { permanentBlobCache.close(); } catch (IOException ioe) { LOG.warn("Could not properly close the BlobClient.", ioe);
FileSystemSafetyNet.initializeSafetyNetForThread(); blobService.getPermanentBlobService().registerJob(jobId); blobService.getPermanentBlobService().releaseJob(jobId);
/** * Instantiates a new BLOB cache. * * @param blobClientConfig * global configuration * @param blobView * (distributed) blob store file system to retrieve files from first * @param serverAddress * address of the {@link BlobServer} to use for fetching files from or {@code null} if none yet * @throws IOException * thrown if the (local or distributed) file storage cannot be created or is not usable */ public BlobCacheService( final Configuration blobClientConfig, final BlobView blobView, @Nullable final InetSocketAddress serverAddress) throws IOException { this(new PermanentBlobCache(blobClientConfig, blobView, serverAddress), new TransientBlobCache(blobClientConfig, serverAddress)); }
/** * Returns the path to a local copy of the file associated with the provided job ID and blob * key. * * <p>We will first attempt to serve the BLOB from the local storage. If the BLOB is not in * there, we will try to download it from the HA store, or directly from the {@link BlobServer}. * * @param jobId * ID of the job this blob belongs to * @param key * blob key associated with the requested file * * @return The path to the file. * * @throws java.io.FileNotFoundException * if the BLOB does not exist; * @throws IOException * if any other error occurs when retrieving the file */ @Override public File getFile(JobID jobId, PermanentBlobKey key) throws IOException { checkNotNull(jobId); return getFileInternal(jobId, key); }
try { permanentBlobCache = new PermanentBlobCache(config, highAvailabilityServices.createBlobStore(), serverAddress); } catch (IOException e) { throw new JobRetrievalException( for (PermanentBlobKey blobKey : props.requiredJarFiles()) { try { allURLs[pos++] = permanentBlobCache.getFile(jobID, blobKey).toURI().toURL(); } catch (Exception e) { try { permanentBlobCache.close(); } catch (IOException ioe) { LOG.warn("Could not properly close the BlobClient.", ioe);
FileSystemSafetyNet.initializeSafetyNetForThread(); blobService.getPermanentBlobService().registerJob(jobId); blobService.getPermanentBlobService().releaseJob(jobId);
/** * Instantiates a new BLOB cache. * * @param blobClientConfig * global configuration * @param blobView * (distributed) blob store file system to retrieve files from first * @param serverAddress * address of the {@link BlobServer} to use for fetching files from or {@code null} if none yet * @throws IOException * thrown if the (local or distributed) file storage cannot be created or is not usable */ public BlobCacheService( final Configuration blobClientConfig, final BlobView blobView, @Nullable final InetSocketAddress serverAddress) throws IOException { this(new PermanentBlobCache(blobClientConfig, blobView, serverAddress), new TransientBlobCache(blobClientConfig, serverAddress)); }
/** * Returns the path to a local copy of the file associated with the provided job ID and blob * key. * * <p>We will first attempt to serve the BLOB from the local storage. If the BLOB is not in * there, we will try to download it from the HA store, or directly from the {@link BlobServer}. * * @param jobId * ID of the job this blob belongs to * @param key * blob key associated with the requested file * * @return The path to the file. * * @throws java.io.FileNotFoundException * if the BLOB does not exist; * @throws IOException * if any other error occurs when retrieving the file */ @Override public File getFile(JobID jobId, PermanentBlobKey key) throws IOException { checkNotNull(jobId); return getFileInternal(jobId, key); }
try { permanentBlobCache = new PermanentBlobCache(config, highAvailabilityServices.createBlobStore(), serverAddress); } catch (IOException e) { throw new JobRetrievalException( for (PermanentBlobKey blobKey : props.requiredJarFiles()) { try { allURLs[pos++] = permanentBlobCache.getFile(jobID, blobKey).toURI().toURL(); } catch (Exception e) { try { permanentBlobCache.close(); } catch (IOException ioe) { LOG.warn("Could not properly close the BlobClient.", ioe);
FileSystemSafetyNet.initializeSafetyNetForThread(); blobService.getPermanentBlobService().registerJob(jobId); blobService.getPermanentBlobService().releaseJob(jobId);
/** * 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 int getPort() { // NOTE: both blob stores connect to the same server! return permanentBlobCache.getPort(); } }
@Override public void close() throws IOException { permanentBlobCache.close(); transientBlobCache.close(); }
/** * Instantiates a new BLOB cache. * * @param blobClientConfig * global configuration * @param blobView * (distributed) blob store file system to retrieve files from first * @param serverAddress * address of the {@link BlobServer} to use for fetching files from or {@code null} if none yet * @throws IOException * thrown if the (local or distributed) file storage cannot be created or is not usable */ public BlobCacheService( final Configuration blobClientConfig, final BlobView blobView, @Nullable final InetSocketAddress serverAddress) throws IOException { this(new PermanentBlobCache(blobClientConfig, blobView, serverAddress), new TransientBlobCache(blobClientConfig, serverAddress)); }
/** * Returns the path to a local copy of the file associated with the provided job ID and blob * key. * * <p>We will first attempt to serve the BLOB from the local storage. If the BLOB is not in * there, we will try to download it from the HA store, or directly from the {@link BlobServer}. * * @param jobId * ID of the job this blob belongs to * @param key * blob key associated with the requested file * * @return The path to the file. * * @throws java.io.FileNotFoundException * if the BLOB does not exist; * @throws IOException * if any other error occurs when retrieving the file */ @Override public File getFile(JobID jobId, PermanentBlobKey key) throws IOException { checkNotNull(jobId); return getFileInternal(jobId, key); }
/** * 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 int getPort() { // NOTE: both blob stores connect to the same server! return permanentBlobCache.getPort(); } }