Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions regression-test/data/workload_manager_p0/test_check_wg.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !count_wg --
3

-- !select_wg --
normal cpu_share 10
normal enable_memory_overcommit true
normal max_concurrency 2147483647
normal max_queue_size 0
normal memory_limit 30%
normal queue_timeout 0
upgrade_g1 cpu_share 11
upgrade_g1 enable_memory_overcommit true
upgrade_g1 max_concurrency 2147483647
upgrade_g1 max_queue_size 0
upgrade_g1 memory_limit 0.2%
upgrade_g1 queue_timeout 0
upgrade_g2 cpu_share 12
upgrade_g2 enable_memory_overcommit true
upgrade_g2 max_concurrency 2147483647
upgrade_g2 max_queue_size 0
upgrade_g2 memory_limit 0.3%
upgrade_g2 queue_timeout 0

40 changes: 40 additions & 0 deletions regression-test/suites/workload_manager_p0/load.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
suite("test_create_upgrade_wg") {
sql "ADMIN SET FRONTEND CONFIG ('enable_workload_group' = 'true');"

sql "create workload group if not exists normal " +
"properties ( " +
" 'cpu_share'='10', " +
" 'memory_limit'='30%', " +
" 'enable_memory_overcommit'='true' " +
");"

sql "create workload group if not exists upgrade_g1 " +
"properties ( " +
" 'cpu_share'='11', " +
" 'memory_limit'='0.2%', " +
" 'enable_memory_overcommit'='true' " +
");"

sql "create workload group if not exists upgrade_g2 " +
"properties ( " +
" 'cpu_share'='12', " +
" 'memory_limit'='0.3%', " +
" 'enable_memory_overcommit'='true' " +
");"
}
20 changes: 20 additions & 0 deletions regression-test/suites/workload_manager_p0/test_check_wg.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
suite("test_check_wg") {
qt_count_wg "select count(distinct id) from workload_groups();"
qt_select_wg "select name,item,value from workload_groups() order by name,item,value;"
}