public AbstractBlobCache( final Configuration blobClientConfig, final BlobView blobView, final Logger logger, @Nullable final InetSocketAddress serverAddress) throws IOException { this.log = checkNotNull(logger); this.blobClientConfig = checkNotNull(blobClientConfig); this.blobView = checkNotNull(blobView); this.readWriteLock = new ReentrantReadWriteLock(); // configure and create the storage directory this.storageDir = BlobUtils.initLocalStorageDirectory(blobClientConfig); log.info("Created BLOB cache storage directory " + storageDir); // configure the number of fetch retries final int fetchRetries = blobClientConfig.getInteger(BlobServerOptions.FETCH_RETRIES); if (fetchRetries >= 0) { this.numFetchRetries = fetchRetries; } else { log.warn("Invalid value for {}. System will attempt no retries on failed fetch operations of BLOBs.", BlobServerOptions.FETCH_RETRIES.key()); this.numFetchRetries = 0; } // Add shutdown hook to delete storage directory shutdownHook = ShutdownHookUtil.addShutdownHook(this, getClass().getSimpleName(), log); this.serverAddress = serverAddress; }
public AbstractBlobCache( final Configuration blobClientConfig, final BlobView blobView, final Logger logger, @Nullable final InetSocketAddress serverAddress) throws IOException { this.log = checkNotNull(logger); this.blobClientConfig = checkNotNull(blobClientConfig); this.blobView = checkNotNull(blobView); this.readWriteLock = new ReentrantReadWriteLock(); // configure and create the storage directory this.storageDir = BlobUtils.initLocalStorageDirectory(blobClientConfig); log.info("Created BLOB cache storage directory " + storageDir); // configure the number of fetch retries final int fetchRetries = blobClientConfig.getInteger(BlobServerOptions.FETCH_RETRIES); if (fetchRetries >= 0) { this.numFetchRetries = fetchRetries; } else { log.warn("Invalid value for {}. System will attempt no retries on failed fetch operations of BLOBs.", BlobServerOptions.FETCH_RETRIES.key()); this.numFetchRetries = 0; } // Add shutdown hook to delete storage directory shutdownHook = ShutdownHookUtil.addShutdownHook(this, getClass().getSimpleName(), log); this.serverAddress = serverAddress; }
public AbstractBlobCache( final Configuration blobClientConfig, final BlobView blobView, final Logger logger, @Nullable final InetSocketAddress serverAddress) throws IOException { this.log = checkNotNull(logger); this.blobClientConfig = checkNotNull(blobClientConfig); this.blobView = checkNotNull(blobView); this.readWriteLock = new ReentrantReadWriteLock(); // configure and create the storage directory this.storageDir = BlobUtils.initLocalStorageDirectory(blobClientConfig); log.info("Created BLOB cache storage directory " + storageDir); // configure the number of fetch retries final int fetchRetries = blobClientConfig.getInteger(BlobServerOptions.FETCH_RETRIES); if (fetchRetries >= 0) { this.numFetchRetries = fetchRetries; } else { log.warn("Invalid value for {}. System will attempt no retries on failed fetch operations of BLOBs.", BlobServerOptions.FETCH_RETRIES.key()); this.numFetchRetries = 0; } // Add shutdown hook to delete storage directory shutdownHook = ShutdownHookUtil.addShutdownHook(this, getClass().getSimpleName(), log); this.serverAddress = serverAddress; }
this.storageDir = BlobUtils.initLocalStorageDirectory(config); LOG.info("Created BLOB server storage directory {}", storageDir);
this.storageDir = BlobUtils.initLocalStorageDirectory(config); LOG.info("Created BLOB server storage directory {}", storageDir);
this.storageDir = BlobUtils.initLocalStorageDirectory(config); LOG.info("Created BLOB server storage directory {}", storageDir);