@Override public void init() throws Exception { if (username == null) { throw new IllegalArgumentException("Rackspace 'username' must not be null"); } if (apiKey == null) { throw new IllegalArgumentException("Rackspace 'apiKey' must not be null"); } if (region == null || (!region.equals("UK") && !region.equals("US"))) { throw new IllegalArgumentException("Invalid 'region', must be UK or US"); } URL authURL = new URL(region.equals("UK") ? UKService : USService); rackspaceClient = new RackspaceClient(authURL, username, apiKey); super.init(); }
@Override public void init() throws Exception { super.init(); verifyConfigurationParameters(); // If dataSource is already set, skip loading driver or JNDI lookup if (dataSource == null) { if (stringIsEmpty(datasource_jndi_name)) { loadDriver(); } else { dataSource = getDataSourceFromJNDI(datasource_jndi_name.trim()); } } attemptSchemaInitialization(); }
@Override public void init() throws Exception { super.init(); if(host == null) host=Utils.DEFAULT_HOST;
@Override public void init() throws Exception { Utils.validateNotEmpty(auth_url, "auth_url"); Utils.validateNotEmpty(auth_type, "auth_type"); Utils.validateNotEmpty(username, "username"); Utils.validateNotEmpty(password, "password"); Utils.validateNotEmpty(container, "container"); Authenticator authenticator = createAuthenticator(); authenticator.validateParams(); swiftClient = new SwiftClient(authenticator); // Authenticate now to record credential swiftClient.authenticate(); super.init(); }
@Override public void init() throws Exception { curator = createCurator(); super.init(); }
@Override public void init() throws Exception { if (username == null) { throw new IllegalArgumentException("Rackspace 'username' must not be null"); } if (apiKey == null) { throw new IllegalArgumentException("Rackspace 'apiKey' must not be null"); } if (region == null || (!region.equals("UK") && !region.equals("US"))) { throw new IllegalArgumentException("Invalid 'region', must be UK or US"); } URL authURL = new URL(region.equals("UK") ? UKService : USService); rackspaceClient = new RackspaceClient(authURL, username, apiKey); super.init(); }
public void init() throws Exception { super.init(); amazonS3 = AmazonS3ClientBuilder.defaultClient(); if (!skip_bucket_existence_check && !amazonS3.doesBucketExist(location)) { amazonS3.createBucket(location); } }
@Override public void init() throws Exception { super.init(); verifyConfigurationParameters(); // If dataSource is already set, skip loading driver or JNDI lookup if (dataSource == null) { if (stringIsEmpty(datasource_jndi_name)) { loadDriver(); } else { dataSource = getDataSourceFromJNDI(datasource_jndi_name.trim()); } } attemptSchemaInitialization(); }
@Override public void init() throws Exception { super.init(); if(host == null) host=Utils.DEFAULT_HOST;
@Override public void init() throws Exception { Utils.validateNotEmpty(auth_url, "auth_url"); Utils.validateNotEmpty(auth_type, "auth_type"); Utils.validateNotEmpty(username, "username"); Utils.validateNotEmpty(password, "password"); Utils.validateNotEmpty(container, "container"); Authenticator authenticator = createAuthenticator(); authenticator.validateParams(); swiftClient = new SwiftClient(authenticator); // Authenticate now to record credential swiftClient.authenticate(); super.init(); }
@Override public void init() throws Exception { super.init(); // Validate configuration // Can throw IAEs this.validateConfiguration(); try { StorageCredentials credentials = new StorageCredentialsAccountAndKey(storage_account_name, storage_access_key); CloudStorageAccount storageAccount = new CloudStorageAccount(credentials, use_https); CloudBlobClient blobClient = storageAccount.createCloudBlobClient(); containerReference = blobClient.getContainerReference(container); boolean created = containerReference.createIfNotExists(); if (created) { log.info("Created container named '%s'.", container); } else { log.debug("Using existing container named '%s'.", container); } } catch (Exception ex) { log.error("Error creating a storage client! Check your configuration.", ex); } }
@Override public void init() throws Exception { super.init(); // Validate configuration // Can throw IAEs this.validateConfiguration(); try { StorageCredentials credentials = new StorageCredentialsAccountAndKey(storage_account_name, storage_access_key); CloudStorageAccount storageAccount = new CloudStorageAccount(credentials, use_https); CloudBlobClient blobClient = storageAccount.createCloudBlobClient(); containerReference = blobClient.getContainerReference(container); boolean created = containerReference.createIfNotExists(); if (created) { log.info("Created container named '%s'.", container); } else { log.debug("Using existing container named '%s'.", container); } } catch (Exception ex) { log.error("Error creating a storage client! Check your configuration."); throw ex; } }