[fix][regression-test] set timeout of curl in regression test to avoid hanged when be crashed. (#20222)

Currently in regression-test, when a be crash, because curl does not set a timeout, suite-thread will get stuck.
To solve this, encapsulate the call to be into a function, set the timeout uniformly, and avoid getting stuck
This commit is contained in:
shuke
2023-06-01 11:00:09 +08:00
committed by GitHub
parent 492154ee55
commit 4a682a0a46
41 changed files with 215 additions and 1341 deletions

View File

@ -0,0 +1,63 @@
// 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.
import org.apache.doris.regression.suite.Suite
import org.codehaus.groovy.runtime.IOGroovyMethods
Suite.metaClass.curl = { String method, String url /* param */->
Suite suite = delegate as Suite
if (method != "GET" && method != "POST")
{
throw new Exception(String.format("invalid curl method: %s", method))
}
if (url.isBlank())
{
throw new Exception("invalid curl url, blank")
}
Integer timeout = 10; // 10 seconds;
String cmd = String.format("curl --max-time %d -X %s %s", timeout, method, url).toString()
logger.info("curl cmd: " + cmd)
def process = cmd.execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())))
String out = process.getText()
return [code, out, err]
}
logger.info("Added 'curl' function to Suite")
Suite.metaClass.show_be_config = { String ip, String port /*param */ ->
return curl("GET", String.format("http://%s:%s/api/show_config", ip, port))
}
logger.info("Added 'show_be_config' function to Suite")
Suite.metaClass.be_get_compaction_status{ String ip, String port, String tablet_id /* param */->
return curl("GET", String.format("http://%s:%s/api/compaction/run_status?tablet_id=%s", ip, port, tablet_id))
}
logger.info("Added 'be_get_compaction_status' function to Suite")
Suite.metaClass.be_run_cumulative_compaction = { String ip, String port, String tablet_id /* param */->
return curl("POST", String.format("http://%s:%s/api/compaction/run?tablet_id=%s&compact_type=cumulative", ip, port, tablet_id))
}
logger.info("Added 'be_run_cumulative_compaction' function to Suite")

View File

@ -27,17 +27,7 @@ suite("test_compaction_with_delete") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -112,20 +102,7 @@ suite("test_compaction_with_delete") {
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
@ -145,20 +122,7 @@ suite("test_compaction_with_delete") {
Thread.sleep(1000)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
logger.info(command)
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())
@ -170,16 +134,8 @@ suite("test_compaction_with_delete") {
int rowCount = 0
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
StringBuilder sb = new StringBuilder();
def compactionStatusUrlIndex = 18
sb.append("curl -X GET ")
sb.append(tablet[compactionStatusUrlIndex])
String command = sb.toString()
// wait for cleaning stale_rowsets
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())

View File

@ -25,19 +25,9 @@ suite("test_compaction_agg_keys") {
def backendId_to_backendIP = [:]
def backendId_to_backendHttpPort = [:]
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -117,20 +107,7 @@ suite("test_compaction_agg_keys") {
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
@ -150,22 +127,10 @@ suite("test_compaction_agg_keys") {
Thread.sleep(1000)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
logger.info(command)
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())
assertEquals("success", compactionStatus.status.toLowerCase())
running = compactionStatus.run_status
@ -175,17 +140,11 @@ suite("test_compaction_agg_keys") {
int rowCount = 0
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
StringBuilder sb = new StringBuilder();
def compactionStatusUrlIndex = 18
sb.append("curl -X GET ")
sb.append(tablet[compactionStatusUrlIndex])
String command = sb.toString()
// wait for cleaning stale_rowsets
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())
assert tabletJson.rowsets instanceof List

View File

@ -25,19 +25,8 @@ suite("test_compaction_agg_keys_with_delete") {
def backendId_to_backendIP = [:]
def backendId_to_backendHttpPort = [:]
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -129,20 +118,7 @@ suite("test_compaction_agg_keys_with_delete") {
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
@ -162,20 +138,7 @@ suite("test_compaction_agg_keys_with_delete") {
Thread.sleep(1000)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
logger.info(command)
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())
@ -187,18 +150,12 @@ suite("test_compaction_agg_keys_with_delete") {
int rowCount = 0
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
StringBuilder sb = new StringBuilder();
def compactionStatusUrlIndex = 18
sb.append("curl -X GET ")
sb.append(tablet[compactionStatusUrlIndex])
String command = sb.toString()
// wait for cleaning stale_rowsets
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())
assert tabletJson.rowsets instanceof List
for (String rowset in (List<String>) tabletJson.rowsets) {

View File

@ -27,17 +27,8 @@ suite("test_compaction_dup_keys") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -115,21 +106,9 @@ suite("test_compaction_dup_keys") {
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
if (compactJson.status.toLowerCase() == "fail") {
@ -148,20 +127,7 @@ suite("test_compaction_dup_keys") {
Thread.sleep(1000)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
logger.info(command)
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())
@ -173,18 +139,12 @@ suite("test_compaction_dup_keys") {
int rowCount = 0
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
StringBuilder sb = new StringBuilder();
def compactionStatusUrlIndex = 18
sb.append("curl -X GET ")
sb.append(tablet[compactionStatusUrlIndex])
String command = sb.toString()
// wait for cleaning stale_rowsets
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())
assert tabletJson.rowsets instanceof List
for (String rowset in (List<String>) tabletJson.rowsets) {

View File

@ -27,17 +27,8 @@ suite("test_compaction_dup_keys_with_delete") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -127,22 +118,10 @@ suite("test_compaction_dup_keys_with_delete") {
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
if (compactJson.status.toLowerCase() == "fail") {
assertEquals(disableAutoCompaction, false)
@ -160,22 +139,10 @@ suite("test_compaction_dup_keys_with_delete") {
Thread.sleep(1000)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
logger.info(command)
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())
assertEquals("success", compactionStatus.status.toLowerCase())
running = compactionStatus.run_status
@ -185,18 +152,12 @@ suite("test_compaction_dup_keys_with_delete") {
int rowCount = 0
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
StringBuilder sb = new StringBuilder();
def compactionStatusUrlIndex = 18
sb.append("curl -X GET ")
sb.append(tablet[compactionStatusUrlIndex])
String command = sb.toString()
// wait for cleaning stale_rowsets
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())
assert tabletJson.rowsets instanceof List
for (String rowset in (List<String>) tabletJson.rowsets) {

View File

@ -27,17 +27,8 @@ suite("test_compaction_uniq_keys") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -115,20 +106,7 @@ suite("test_compaction_uniq_keys") {
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
@ -148,20 +126,7 @@ suite("test_compaction_uniq_keys") {
Thread.sleep(1000)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
logger.info(command)
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())
@ -173,16 +138,8 @@ suite("test_compaction_uniq_keys") {
int rowCount = 0
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
StringBuilder sb = new StringBuilder();
def compactionStatusUrlIndex = 18
sb.append("curl -X GET ")
sb.append(tablet[compactionStatusUrlIndex])
String command = sb.toString()
// wait for cleaning stale_rowsets
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())

View File

@ -43,17 +43,8 @@ suite("test_compaction_uniq_keys_row_store") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -171,20 +162,7 @@ suite("test_compaction_uniq_keys_row_store") {
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
@ -204,22 +182,10 @@ suite("test_compaction_uniq_keys_row_store") {
Thread.sleep(1000)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
logger.info(command)
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())
assertEquals("success", compactionStatus.status.toLowerCase())
running = compactionStatus.run_status
@ -229,16 +195,8 @@ suite("test_compaction_uniq_keys_row_store") {
int rowCount = 0
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
StringBuilder sb = new StringBuilder();
def compactionStatusUrlIndex = 18
sb.append("curl -X GET ")
sb.append(tablet[compactionStatusUrlIndex])
String command = sb.toString()
// wait for cleaning stale_rowsets
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())

View File

@ -27,17 +27,8 @@ suite("test_compaction_uniq_keys_with_delete") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -131,20 +122,7 @@ suite("test_compaction_uniq_keys_with_delete") {
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
@ -164,20 +142,7 @@ suite("test_compaction_uniq_keys_with_delete") {
Thread.sleep(1000)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
logger.info(command)
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())
@ -189,16 +154,8 @@ suite("test_compaction_uniq_keys_with_delete") {
int rowCount = 0
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
StringBuilder sb = new StringBuilder();
def compactionStatusUrlIndex = 18
sb.append("curl -X GET ")
sb.append(tablet[compactionStatusUrlIndex])
String command = sb.toString()
// wait for cleaning stale_rowsets
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())

View File

@ -27,17 +27,7 @@ suite("test_vertical_compaction_agg_keys") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -129,20 +119,7 @@ suite("test_vertical_compaction_agg_keys") {
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
@ -161,21 +138,7 @@ suite("test_vertical_compaction_agg_keys") {
do {
Thread.sleep(1000)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
logger.info(command)
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())
@ -187,16 +150,8 @@ suite("test_vertical_compaction_agg_keys") {
int rowCount = 0
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
StringBuilder sb = new StringBuilder();
def compactionStatusUrlIndex = 18
sb.append("curl -X GET ")
sb.append(tablet[compactionStatusUrlIndex])
String command = sb.toString()
// wait for cleaning stale_rowsets
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())

View File

@ -27,17 +27,8 @@ suite("test_vertical_compaction_dup_keys") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -128,20 +119,7 @@ suite("test_vertical_compaction_dup_keys") {
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
@ -161,20 +139,7 @@ suite("test_vertical_compaction_dup_keys") {
Thread.sleep(1000)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
logger.info(command)
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())
@ -186,16 +151,8 @@ suite("test_vertical_compaction_dup_keys") {
int rowCount = 0
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
StringBuilder sb = new StringBuilder();
def compactionStatusUrlIndex = 18
sb.append("curl -X GET ")
sb.append(tablet[compactionStatusUrlIndex])
String command = sb.toString()
// wait for cleaning stale_rowsets
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())

View File

@ -27,17 +27,7 @@ suite("test_vertical_compaction_uniq_keys") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -126,20 +116,7 @@ suite("test_vertical_compaction_uniq_keys") {
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
@ -159,20 +136,7 @@ suite("test_vertical_compaction_uniq_keys") {
Thread.sleep(1000)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
logger.info(command)
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())
@ -184,16 +148,8 @@ suite("test_vertical_compaction_uniq_keys") {
int rowCount = 0
for (String[] tablet in tablets) {
String tablet_id = tablet[0]
StringBuilder sb = new StringBuilder();
def compactionStatusUrlIndex = 18
sb.append("curl -X GET ")
sb.append(tablet[compactionStatusUrlIndex])
String command = sb.toString()
// wait for cleaning stale_rowsets
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
logger.info("Show tablets status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def tabletJson = parseJson(out.trim())

View File

@ -51,13 +51,7 @@ suite("test_json_load_and_function", "p0") {
log.info("Stream load result: ${result}".toString())
def json = parseJson(result)
StringBuilder sb = new StringBuilder()
sb.append("curl -X GET " + json.ErrorURL)
String command = sb.toString()
def process = command.execute()
def code = process.waitFor()
def err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())))
def out = process.getText()
(code, out, err) = curl("GET", json.ErrorURL)
log.info("error result: " + out)
assertEquals("fail", json.Status.toLowerCase())
@ -90,13 +84,7 @@ suite("test_json_load_and_function", "p0") {
log.info("Stream load result: ${result}".toString())
def json = parseJson(result)
StringBuilder sb = new StringBuilder()
sb.append("curl -X GET " + json.ErrorURL)
String command = sb.toString()
def process = command.execute()
def code = process.waitFor()
def err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())))
def out = process.getText()
(code, out, err) = curl("GET", json.ErrorURL)
log.info("error result: " + out)
assertEquals("success", json.Status.toLowerCase())

View File

@ -50,14 +50,7 @@ suite("test_jsonb_load_and_function", "p0") {
}
log.info("Stream load result: ${result}".toString())
def json = parseJson(result)
StringBuilder sb = new StringBuilder()
sb.append("curl -X GET " + json.ErrorURL)
String command = sb.toString()
def process = command.execute()
def code = process.waitFor()
def err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())))
def out = process.getText()
(code, out, err) = curl("GET", json.ErrorURL)
log.info("error result: " + out)
assertEquals("fail", json.Status.toLowerCase())
@ -89,14 +82,7 @@ suite("test_jsonb_load_and_function", "p0") {
}
log.info("Stream load result: ${result}".toString())
def json = parseJson(result)
StringBuilder sb = new StringBuilder()
sb.append("curl -X GET " + json.ErrorURL)
String command = sb.toString()
def process = command.execute()
def code = process.waitFor()
def err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())))
def out = process.getText()
(code, out, err) = curl("GET", json.ErrorURL)
log.info("error result: " + out)
assertEquals("success", json.Status.toLowerCase())

View File

@ -69,11 +69,7 @@ suite("test_map_load_and_compaction", "p0") {
}
def checkCompactionStatus = {compactionStatus, assertRowSetNum->
String checkStatus = new String("curl -X GET "+compactionStatus)
process = checkStatus.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = curl("GET", compactionStatus)
logger.info("Check compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactStatusJson = parseJson(out.trim())
@ -114,20 +110,7 @@ suite("test_map_load_and_compaction", "p0") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactJson = parseJson(out.trim())
@ -136,20 +119,7 @@ suite("test_map_load_and_compaction", "p0") {
// wait compactions done
do {
Thread.sleep(1000)
sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String cm = sb.toString()
logger.info(cm)
process = cm.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def cs = parseJson(out.trim())

View File

@ -31,17 +31,8 @@ suite ("test_number_overflow") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())

View File

@ -30,17 +30,8 @@ suite("test_agg_keys_schema_change_datev2") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -52,20 +43,7 @@ suite("test_agg_keys_schema_change_datev2") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
}
@ -76,19 +54,7 @@ suite("test_agg_keys_schema_change_datev2") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -30,17 +30,8 @@ suite("test_dup_keys_schema_change_datev2") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -52,20 +43,7 @@ suite("test_dup_keys_schema_change_datev2") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
}
@ -76,19 +54,7 @@ suite("test_dup_keys_schema_change_datev2") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -30,17 +30,7 @@ suite("test_schema_change_varchar_to_datev2") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -52,20 +42,7 @@ suite("test_schema_change_varchar_to_datev2") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
}
@ -76,19 +53,7 @@ suite("test_schema_change_varchar_to_datev2") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -31,17 +31,7 @@ suite("test_agg_keys_schema_change_decimalv3") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -53,20 +43,7 @@ suite("test_agg_keys_schema_change_decimalv3") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id )
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
}
@ -77,19 +54,7 @@ suite("test_agg_keys_schema_change_decimalv3") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -33,17 +33,8 @@ suite ("test_agg_keys_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -202,20 +193,7 @@ suite ("test_agg_keys_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
}
@ -226,19 +204,7 @@ suite ("test_agg_keys_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -50,17 +50,8 @@ suite ("test_agg_mv_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -167,20 +158,7 @@ suite ("test_agg_mv_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
//assertEquals(code, 0)
}
@ -192,19 +170,7 @@ suite ("test_agg_mv_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -50,17 +50,8 @@ suite ("test_agg_rollup_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -178,20 +169,7 @@ suite ("test_agg_rollup_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
//assertEquals(code, 0)
}
@ -203,19 +181,7 @@ suite ("test_agg_rollup_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -28,17 +28,8 @@ suite ("test_agg_vals_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -165,20 +156,7 @@ suite ("test_agg_vals_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
//assertEquals(code, 0)
}
@ -190,19 +168,7 @@ suite ("test_agg_vals_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -31,17 +31,8 @@ suite ("test_dup_keys_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -171,20 +162,7 @@ suite ("test_dup_keys_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
//assertEquals(code, 0)
}
@ -196,19 +174,7 @@ suite ("test_dup_keys_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -48,17 +48,8 @@ suite ("test_dup_mv_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -186,20 +177,7 @@ suite ("test_dup_mv_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
//assertEquals(code, 0)
}
@ -211,19 +189,7 @@ suite ("test_dup_mv_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -50,17 +50,8 @@ suite ("test_dup_rollup_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -197,20 +188,7 @@ suite ("test_dup_rollup_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
//assertEquals(code, 0)
}
@ -222,19 +200,7 @@ suite ("test_dup_rollup_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -27,17 +27,8 @@ suite ("test_dup_vals_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -152,20 +143,7 @@ suite ("test_dup_vals_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
//assertEquals(code, 0)
}
@ -177,19 +155,7 @@ suite ("test_dup_vals_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -27,17 +27,8 @@ suite ("test_uniq_keys_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -148,20 +139,7 @@ suite ("test_uniq_keys_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
//assertEquals(code, 0)
}
@ -173,19 +151,7 @@ suite ("test_uniq_keys_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -45,17 +45,8 @@ suite ("test_uniq_mv_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -189,20 +180,7 @@ suite ("test_uniq_mv_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
//assertEquals(code, 0)
}
@ -214,19 +192,7 @@ suite ("test_uniq_mv_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -49,17 +49,8 @@ suite ("test_uniq_rollup_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -195,20 +186,7 @@ suite ("test_uniq_rollup_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
//assertEquals(code, 0)
}
@ -220,19 +198,7 @@ suite ("test_uniq_rollup_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -29,17 +29,8 @@ suite ("test_uniq_vals_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -156,20 +147,7 @@ suite ("test_uniq_vals_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
//assertEquals(code, 0)
}
@ -181,19 +159,7 @@ suite ("test_uniq_vals_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -33,17 +33,8 @@ suite ("test_varchar_schema_change") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())
@ -146,20 +137,7 @@ suite ("test_varchar_schema_change") {
String tablet_id = tablet[0]
backend_id = tablet[2]
logger.info("run compaction:" + tablet_id)
StringBuilder sb = new StringBuilder();
sb.append("curl -X POST http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run?tablet_id=")
sb.append(tablet_id)
sb.append("&compact_type=cumulative")
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
}
@ -170,19 +148,7 @@ suite ("test_varchar_schema_change") {
Thread.sleep(100)
String tablet_id = tablet[0]
backend_id = tablet[2]
StringBuilder sb = new StringBuilder();
sb.append("curl -X GET http://")
sb.append(backendId_to_backendIP.get(backend_id))
sb.append(":")
sb.append(backendId_to_backendHttpPort.get(backend_id))
sb.append("/api/compaction/run_status?tablet_id=")
sb.append(tablet_id)
String command = sb.toString()
process = command.execute()
code = process.waitFor()
err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
out = process.getText()
(code, out, err) = be_get_compaction_status(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), tablet_id)
logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def compactionStatus = parseJson(out.trim())

View File

@ -31,19 +31,9 @@ suite("test_segcompaction_agg_keys") {
def backendId_to_backendIP = [:]
def backendId_to_backendHttpPort = [:]
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())

View File

@ -31,19 +31,8 @@ suite("test_segcompaction_agg_keys_index") {
def backendId_to_backendIP = [:]
def backendId_to_backendHttpPort = [:]
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())

View File

@ -33,17 +33,8 @@ suite("test_segcompaction_dup_keys") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())

View File

@ -33,17 +33,7 @@ suite("test_segcompaction_dup_keys_index") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())

View File

@ -33,17 +33,8 @@ suite("test_segcompaction_unique_keys") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())

View File

@ -33,17 +33,7 @@ suite("test_segcompaction_unique_keys_index") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())

View File

@ -33,17 +33,8 @@ suite("test_segcompaction_unique_keys_mow") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())

View File

@ -33,17 +33,8 @@ suite("test_segcompaction_unique_keys_mow_index") {
getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
backend_id = backendId_to_backendIP.keySet()[0]
StringBuilder showConfigCommand = new StringBuilder();
showConfigCommand.append("curl -X GET http://")
showConfigCommand.append(backendId_to_backendIP.get(backend_id))
showConfigCommand.append(":")
showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
showConfigCommand.append("/api/show_config")
logger.info(showConfigCommand.toString())
def process = showConfigCommand.toString().execute()
int code = process.waitFor()
String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
String out = process.getText()
(code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id))
logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
assertEquals(code, 0)
def configList = parseJson(out.trim())