EasyManuals Logo

Amazon Redshift User Manual

Amazon Redshift
131 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #53 background imageLoading...
Page #53 background image
AWSCredentials credentials = new PropertiesCredentials(
CreateAndModifyClusterParameterGroup.class
.getResourceAsStream("AwsCredentials.properties"));
client = new AmazonRedshiftClient(credentials);
try {
createClusterParameterGroup();
modifyClusterParameterGroup();
associateParameterGroupWithCluster();
describeClusterParameterGroups();
} catch (Exception e) {
System.err.println("Operation failed: " + e.getMessage());
}
}
private static void createClusterParameterGroup() {
CreateClusterParameterGroupRequest request = new CreateClusterParamet
erGroupRequest()
.withDescription("my cluster parameter group")
.withParameterGroupName(clusterParameterGroupName)
.withParameterGroupFamily(parameterGroupFamily);
client.createClusterParameterGroup(request);
System.out.println("Created cluster parameter group.");
}
private static void describeClusterParameterGroups() {
DescribeClusterParameterGroupsResult result = client.describeClusterPara
meterGroups();
printResultClusterParameterGroups(result);
}
private static void modifyClusterParameterGroup() {
List<Parameter> parameters = new ArrayList<Parameter>();
parameters.add(new Parameter()
.withParameterName("extra_float_digits")
.withParameterValue("2"));
// Replace WLM configuration. The new configuration defines a queue (in
addition to the default).
parameters.add(new Parameter()
.withParameterName("wlm_json_configuration")
.withParameterValue("[{\"user_group\":[\"ex
ample_user_group1\"],\"query_group\":[\"example_query_group1\"],\"query_concur
rency\":7},{\"query_concurrency\":5}]"));
ModifyClusterParameterGroupRequest request = new ModifyClusterParamet
erGroupRequest()
.withParameterGroupName(clusterParameterGroupName)
.withParameters(parameters);
client.modifyClusterParameterGroup(request);
}
private static void associateParameterGroupWithCluster() {
ModifyClusterRequest request = new ModifyClusterRequest()
.withClusterIdentifier(clusterIdentifier)
.withClusterParameterGroupName(clusterParameterGroupName);
API Version 2012-12-01
49
Amazon Redshift Management Guide
Managing Parameter Groups Using AWS SDK for Java

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Amazon Redshift and is the answer not in the manual?

Amazon Redshift Specifications

General IconGeneral
ProviderAmazon Web Services (AWS)
Query LanguageSQL
Data StorageColumnar storage
SecurityEncryption at rest and in transit, VPC, IAM
BackupAutomated and manual snapshots
DeploymentCloud-based
TypeCloud-based data warehouse service
Primary UseData warehousing, analytics
IntegrationIntegrates with AWS services, BI tools, and ETL tools
Pricing ModelOn-demand and reserved instance pricing
Data CompressionColumnar storage with data compression
Performance OptimizationQuery optimization

Related product manuals