public AbstractNonHaServices() { this.runningJobsRegistry = new StandaloneRunningJobsRegistry(); this.voidBlobStore = new VoidBlobStore(); shutdown = false; }
public AbstractNonHaServices() { this.runningJobsRegistry = new StandaloneRunningJobsRegistry(); this.voidBlobStore = new VoidBlobStore(); shutdown = false; }
public AbstractNonHaServices() { this.runningJobsRegistry = new StandaloneRunningJobsRegistry(); this.voidBlobStore = new VoidBlobStore(); shutdown = false; }
public AbstractNonHaServices() { this.runningJobsRegistry = new StandaloneRunningJobsRegistry(); this.voidBlobStore = new VoidBlobStore(); shutdown = false; }
/** * Instantiates a new BLOB cache. * * @param blobClientConfig * global configuration * @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 TransientBlobCache( final Configuration blobClientConfig, @Nullable final InetSocketAddress serverAddress) throws IOException { super(blobClientConfig, new VoidBlobStore(), LoggerFactory.getLogger(TransientBlobCache.class), serverAddress ); // Initializing the clean up task this.cleanupTimer = new Timer(true); this.cleanupInterval = blobClientConfig.getLong(BlobServerOptions.CLEANUP_INTERVAL) * 1000; this.cleanupTimer .schedule(new TransientBlobCleanupTask(blobExpiryTimes, readWriteLock.writeLock(), storageDir, log), cleanupInterval, cleanupInterval); }
/** * Instantiates a new BLOB cache. * * @param blobClientConfig * global configuration * @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 TransientBlobCache( final Configuration blobClientConfig, @Nullable final InetSocketAddress serverAddress) throws IOException { super(blobClientConfig, new VoidBlobStore(), LoggerFactory.getLogger(TransientBlobCache.class), serverAddress ); // Initializing the clean up task this.cleanupTimer = new Timer(true); this.cleanupInterval = blobClientConfig.getLong(BlobServerOptions.CLEANUP_INTERVAL) * 1000; this.cleanupTimer .schedule(new TransientBlobCleanupTask(blobExpiryTimes, readWriteLock.writeLock(), storageDir, log), cleanupInterval, cleanupInterval); }
/** * Instantiates a new BLOB cache. * * @param blobClientConfig * global configuration * @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 TransientBlobCache( final Configuration blobClientConfig, @Nullable final InetSocketAddress serverAddress) throws IOException { super(blobClientConfig, new VoidBlobStore(), LoggerFactory.getLogger(TransientBlobCache.class), serverAddress ); // Initializing the clean up task this.cleanupTimer = new Timer(true); this.cleanupInterval = blobClientConfig.getLong(BlobServerOptions.CLEANUP_INTERVAL) * 1000; this.cleanupTimer .schedule(new TransientBlobCleanupTask(blobExpiryTimes, readWriteLock.writeLock(), storageDir, log), cleanupInterval, cleanupInterval); }
/** * Creates a BlobStore based on the parameters set in the configuration. * * @param config * configuration to use * * @return a (distributed) blob store for high availability * * @throws IOException * thrown if the (distributed) file storage cannot be created */ public static BlobStoreService createBlobStoreFromConfig(Configuration config) throws IOException { if (HighAvailabilityMode.isHighAvailabilityModeActivated(config)) { return createFileSystemBlobStore(config); } else { return new VoidBlobStore(); } }
/** * Creates a BlobStore based on the parameters set in the configuration. * * @param config * configuration to use * * @return a (distributed) blob store for high availability * * @throws IOException * thrown if the (distributed) file storage cannot be created */ public static BlobStoreService createBlobStoreFromConfig(Configuration config) throws IOException { if (HighAvailabilityMode.isHighAvailabilityModeActivated(config)) { return createFileSystemBlobStore(config); } else { return new VoidBlobStore(); } }
/** * Creates a BlobStore based on the parameters set in the configuration. * * @param config * configuration to use * * @return a (distributed) blob store for high availability * * @throws IOException * thrown if the (distributed) file storage cannot be created */ public static BlobStoreService createBlobStoreFromConfig(Configuration config) throws IOException { HighAvailabilityMode highAvailabilityMode = HighAvailabilityMode.fromConfig(config); if (highAvailabilityMode == HighAvailabilityMode.NONE) { return new VoidBlobStore(); } else if (highAvailabilityMode == HighAvailabilityMode.FILESYSTEM || highAvailabilityMode == HighAvailabilityMode.ZOOKEEPER) { return createFileSystemBlobStore(config); } else { throw new IllegalConfigurationException("Unexpected high availability mode '" + highAvailabilityMode + "'."); } }
/** * Creates a BlobStore based on the parameters set in the configuration. * * @param config * configuration to use * * @return a (distributed) blob store for high availability * * @throws IOException * thrown if the (distributed) file storage cannot be created */ public static BlobStoreService createBlobStoreFromConfig(Configuration config) throws IOException { HighAvailabilityMode highAvailabilityMode = HighAvailabilityMode.fromConfig(config); if (highAvailabilityMode == HighAvailabilityMode.NONE) { return new VoidBlobStore(); } else if (highAvailabilityMode == HighAvailabilityMode.ZOOKEEPER) { return createFileSystemBlobStore(config); } else { throw new IllegalConfigurationException("Unexpected high availability mode '" + highAvailabilityMode + "'."); } }