From e6d32eeb4dcd9f10cb14bce3b1d8c4a647fc7be4 Mon Sep 17 00:00:00 2001 From: Jacob Isaac Date: Wed, 10 Mar 2021 13:46:04 -0800 Subject: [PATCH] PHOENIX-6417 Fix PHERF ITs that are failing in the local builds --- phoenix-pherf/pom.xml | 7 +++- .../org/apache/phoenix/pherf/PherfMainIT.java | 3 +- .../src/it/resources/pherf.properties | 42 +++++++++++++++++++ .../test/resources/scenario/test_scenario.xml | 6 +-- 4 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 phoenix-pherf/src/it/resources/pherf.properties diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml index eca063cce40..e65a2bfae7c 100644 --- a/phoenix-pherf/pom.xml +++ b/phoenix-pherf/pom.xml @@ -94,7 +94,6 @@ - org.apache.phoenix.thirdparty phoenix-shaded-guava @@ -121,6 +120,10 @@ org.apache.commons commons-lang3 + + commons-io + commons-io + org.apache.commons commons-math3 @@ -314,6 +317,7 @@ org.apache.phoenix:phoenix-pherf + org.apache.phoenix.thirdparty:phoenix-shaded-guava com.googlecode.java-diff-utils:diffutils org.apache.commons:commons-lang3 org.apache.commons:commons-math3 @@ -321,6 +325,7 @@ joda-time:joda-time org.apache.commons:commons-csv commons-lang:commons-lang + commons-io:commons-io diff --git a/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/PherfMainIT.java b/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/PherfMainIT.java index c1a7b66231c..57aaae14e44 100644 --- a/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/PherfMainIT.java +++ b/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/PherfMainIT.java @@ -54,8 +54,7 @@ public HashMap mapResults(Result r) throws IOException { public void testPherfMain() throws Exception { String[] args = { "-q", "-l", "--schemaFile", ".*create_prod_test_unsalted.sql", - "--scenarioFile", ".*prod_test_unsalted_scenario.xml", - "-m", "--monitorFrequency", "10" }; + "--scenarioFile", ".*prod_test_unsalted_scenario.xml"}; Pherf pherf = new Pherf(args); pherf.run(); diff --git a/phoenix-pherf/src/it/resources/pherf.properties b/phoenix-pherf/src/it/resources/pherf.properties new file mode 100644 index 00000000000..b5a5e62e4b2 --- /dev/null +++ b/phoenix-pherf/src/it/resources/pherf.properties @@ -0,0 +1,42 @@ +# 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. + +# General purpose thread pool size for Pherf. It's used for things like monitor threads.This should remain small +# to limit the amount of background tasks sucking up resources away from tests. +pherf.default.threadpool=10 + +# Interval in Ms that the JMX monitors will take a snapshot and dump to log +pherf.default.monitorFrequency=30000 + +# Default value to display log line after every 'N' row load +pherf.default.log_per_nrows=1000000 + +# Default number of writers to use when loading data +# 0 - Set the number of writers to use all available cores +# 1-N - ANy integer value for the number of threads to use +pherf.default.dataloader.threadpool=0 + +# When upserting, this is the max # of rows that will be inserted in a single commit +pherf.default.dataloader.batchsize=1000 + +# Directory where results from a scenario run will be written +pherf.default.results.dir=/tmp/RESULTS + +# Google chart summary html file +pherf.default.summary.file=/tmp/RESULTS/summary.html + +# Threshold for comparator to fail. ex. 0.5 equates to 50% +pherf.default.comparison.threshold=0.45 diff --git a/phoenix-pherf/src/test/resources/scenario/test_scenario.xml b/phoenix-pherf/src/test/resources/scenario/test_scenario.xml index 076f23698bd..8b4762e1bd2 100644 --- a/phoenix-pherf/src/test/resources/scenario/test_scenario.xml +++ b/phoenix-pherf/src/test/resources/scenario/test_scenario.xml @@ -306,12 +306,12 @@ - + - - + +