],
"query_concurrency":7
},
{
"query_concurrency":5
}
]
The preceding JSON is an array of two objects, one for each queue. The first object defines a queue with
specific user group and query group. It also sets the concurrency level to 7.
{
"user_group":[
"example_user_group1"
],
"query_group":[
"example_query_group1"
],
"query_concurrency":7
}
Because this example replaces the WLM configuration, this JSON configuration also defines the default
queue with no specific user group or query group. It sets the concurrency to the default value, 5.
{
"query_concurrency":5
}
For more information about Workload Management (WML) configuration, go to
Implementing workload
management
.
For step-by-step instructions to run the following example, see
Running Java Examples for Amazon
Redshift Using Eclipse (p. 118)
. You need to update the code and provide a cluster identifier.
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.PropertiesCredentials;
import com.amazonaws.services.redshift.AmazonRedshiftClient;
import com.amazonaws.services.redshift.model.*;
public class CreateAndModifyClusterParameterGroup {
public static AmazonRedshiftClient client;
public static String clusterParameterGroupName = "parametergroup1";
public static String clusterIdentifier = "***provide cluster identifier***";
public static String parameterGroupFamily = "redshift-1.0";
public static void main(String[] args) throws IOException {
API Version 2012-12-01
48
Amazon Redshift Management Guide
Managing Parameter Groups Using AWS SDK for Java