/** * 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 + "'."); } }