From 604557de0b40c0b5f25ec664f9a5ce2bc9d1b596 Mon Sep 17 00:00:00 2001 From: Anton Antonenko Date: Fri, 11 Nov 2016 11:44:01 +0200 Subject: [PATCH 01/14] JFG-911: remove more deprecated unused code --- .../fetcher/CustomMetricPlotFetcher.java | 14 -- .../fetcher/CustomMetricSummaryFetcher.java | 30 ---- .../CustomTestGroupMetricSummaryFetcher.java | 9 +- .../fetcher/MonitoringMetricPlotFetcher.java | 152 ------------------ ...ssionScopeMonitoringMetricPlotFetcher.java | 14 -- .../provider/CustomMetricNameProvider.java | 56 ------- .../CustomMetricPlotNameProvider.java | 41 ----- .../provider/LatencyMetricNameProvider.java | 75 --------- 8 files changed, 1 insertion(+), 390 deletions(-) delete mode 100644 dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/MonitoringMetricPlotFetcher.java delete mode 100644 dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/SessionScopeMonitoringMetricPlotFetcher.java delete mode 100644 dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/LatencyMetricNameProvider.java diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomMetricPlotFetcher.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomMetricPlotFetcher.java index 824bc0abb..947088b27 100644 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomMetricPlotFetcher.java +++ b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomMetricPlotFetcher.java @@ -59,23 +59,9 @@ protected List getRawData(Set taskDataIds, Set metricIds } List resultList = new ArrayList<>(); resultList.addAll(getPlotDataNewModel(taskDataIds, metricIds)); - resultList.addAll(getPlotDataOldModel(taskDataIds, metricIds)); return resultList; } - /** - * @return collection of objects {Task Data id, time, value, sessionId, metricId} - */ - @Deprecated - private Collection getPlotDataOldModel(Set taskIds, Set metricIds) { - return entityManager.createQuery( - "SELECT metrics.taskData.id, metrics.time, metrics.value, metrics.taskData.sessionId, metrics.metric " + - "FROM MetricDetails metrics " + - "WHERE metrics.metric IN (:metricIds) " + - "AND metrics.taskData.id IN (:taskIds)" - ).setParameter("taskIds", taskIds).setParameter("metricIds", metricIds).getResultList(); - } - /** * @return collection of objects {Task Data id, time, value, sessionId, metricId} */ diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomMetricSummaryFetcher.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomMetricSummaryFetcher.java index 98d81f0b8..494a9bd95 100644 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomMetricSummaryFetcher.java +++ b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomMetricSummaryFetcher.java @@ -21,7 +21,6 @@ import java.util.Set; @Component -@Deprecated public class CustomMetricSummaryFetcher extends DbMetricDataFetcher { @Override @@ -37,10 +36,6 @@ protected Set fetchData(List metricNames) { List metrics = new ArrayList<>(); - // check old model - metrics.addAll(getCustomMetricsDataOldModel(taskIds, metricIds)); - - // check new model metrics.addAll(getCustomMetricsDataNewModel(taskIds, metricIds)); if (metrics.isEmpty()) { @@ -90,31 +85,6 @@ protected Set fetchData(List metricNames) { return new HashSet<>(resultMap.values()); } - /** - * @param taskIds ids of all tasks - * @param metricIds identifiers of metric - * @return list of object[] (value, sessionId, metricId, taskDataId) - */ - @Deprecated - protected List getCustomMetricsDataOldModel(Set taskIds, Set metricIds) { - return entityManager.createNativeQuery( - "SELECT metric.total, taskData.sessionId, metric.name, taskData.taskDataId " + - "FROM DiagnosticResultEntity AS metric " + - "JOIN ( " + - "SELECT wd.sessionId, wd.id, taskData.id AS taskDataId " + - "FROM WorkloadData AS wd " + - "JOIN ( " + - "SELECT taskData.taskId, taskData.sessionId, taskData.id " + - "FROM TaskData AS taskData " + - "WHERE taskData.id IN (:ids) " + - ") AS taskData " + - "ON wd.sessionId=taskData.sessionId AND wd.taskId=taskData.taskId " + - ") AS taskData " + - "ON metric.workloadData_id=taskData.id AND metric.name IN (:metricIds);" - ).setParameter("ids", taskIds).setParameter("metricIds", metricIds).getResultList(); - } - - /** * @param taskIds ids of all tasks * @param metricId identifier of metric diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomTestGroupMetricSummaryFetcher.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomTestGroupMetricSummaryFetcher.java index 0733ce891..ce60a54bb 100644 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomTestGroupMetricSummaryFetcher.java +++ b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/CustomTestGroupMetricSummaryFetcher.java @@ -1,14 +1,12 @@ package com.griddynamics.jagger.dbapi.fetcher; +import com.google.common.collect.Multimap; import com.griddynamics.jagger.dbapi.util.FetchUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import com.google.common.collect.Multimap; - import java.math.BigInteger; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Set; @@ -25,11 +23,6 @@ public void setFetchUtil(FetchUtil fetchUtil) { this.fetchUtil = fetchUtil; } - @Override - protected List getCustomMetricsDataOldModel(Set taskIds, Set metricIds) { - return Collections.emptyList(); - } - @Override protected List getCustomMetricsDataNewModel(Set taskIds, Set metricId) { Multimap testGroupMap = fetchUtil.getTestGroupIdsByTestIds(taskIds); diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/MonitoringMetricPlotFetcher.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/MonitoringMetricPlotFetcher.java deleted file mode 100644 index 7c640c15f..000000000 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/MonitoringMetricPlotFetcher.java +++ /dev/null @@ -1,152 +0,0 @@ -package com.griddynamics.jagger.dbapi.fetcher; - -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; -import com.griddynamics.jagger.dbapi.dto.MetricNameDto; -import com.griddynamics.jagger.dbapi.parameter.DefaultMonitoringParameters; -import com.griddynamics.jagger.dbapi.parameter.GroupKey; -import com.griddynamics.jagger.util.MonitoringIdUtils; -import org.springframework.stereotype.Component; - -import javax.annotation.PostConstruct; -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import static com.griddynamics.jagger.util.MonitoringIdUtils.splitMonitoringMetricId; - -@Component -@Deprecated -public class MonitoringMetricPlotFetcher extends AbstractMetricPlotFetcher { - - private Map monitoringPlotGroups; - private BiMap newToOldMonitoringIds; - private BiMap oldToNewMonitoringIds; - - @Resource - public void setMonitoringPlotGroups(Map monitoringPlotGroups) { - this.monitoringPlotGroups = monitoringPlotGroups; - } - - @PostConstruct - private void init() { // Needs to create newToOld/oldToNew MonitoringIds BiMaps. Calls via spring. - initNewToOldMonitoringIds(monitoringPlotGroups); - } - - private void initNewToOldMonitoringIds(Map monitoringPlotGroups) { - newToOldMonitoringIds = HashBiMap.create(); - for (Map.Entry entry : monitoringPlotGroups.entrySet()) { - for (DefaultMonitoringParameters defaultMonitoringParameter : entry.getValue()) { - if (!newToOldMonitoringIds.containsKey(defaultMonitoringParameter.getId())) { - newToOldMonitoringIds.put(defaultMonitoringParameter.getId(), defaultMonitoringParameter.getDescription()); - } - } - } - oldToNewMonitoringIds = newToOldMonitoringIds.inverse(); - } - - @Override - protected Collection getAllRawData(List metricNames) { - - Set agentNames = new HashSet<>(); - Set monitoringDescriptions = new HashSet<>(); - Set sessionIds = new HashSet<>(); - Set taskIds = new HashSet<>(); - for (MetricNameDto metricName : metricNames) { - - MonitoringIdUtils.MonitoringId monitoringId = splitMonitoringMetricId(metricName.getMetricName()); - if (monitoringId == null) { - log.error("Could not split metricName of {} to MonitoringId. Will skip.", metricName); - continue; - } - agentNames.add(monitoringId.getAgentName()); - String description = newToOldMonitoringIds.get(monitoringId.getMonitoringName()); - monitoringDescriptions.add(description == null ? monitoringId.getMonitoringName() : description); - taskIds.addAll(metricName.getTaskIds()); - sessionIds.addAll(metricName.getTest().getSessionIds()); - } - - List rawDatas = getRawDataDbCall(sessionIds, taskIds, agentNames, monitoringDescriptions); - - if (rawDatas.isEmpty()) { - log.warn("No plot data found for {}", metricNames); - return Collections.emptyList(); - } - - List result = new ArrayList<>(rawDatas.size()); - for (Object[] raw : rawDatas) { - MetricRawData metricRawData = new MetricRawData(); - - metricRawData.setTime(((Number) raw[2]).longValue()); - metricRawData.setValue((Double) raw[3]); - - String monitoringName = (String) raw[0]; - if (oldToNewMonitoringIds.containsKey(monitoringName)) { - monitoringName = oldToNewMonitoringIds.get(monitoringName); - } - String agentName = raw[4] == null ? (String) raw[5] : (String) raw[4]; - metricRawData.setMetricId(MonitoringIdUtils.getMonitoringMetricId(monitoringName, agentName)); - - metricRawData.setWorkloadTaskDataId(((Number) raw[6]).longValue()); - metricRawData.setSessionId((String) raw[1]); - - result.add(metricRawData); - } - return result; - } - - /** - * @param sessionIds is a collection of id of sessions - * @param workloadTaskDataIds is a collection of workload task id - * @param agentNames is a collection of all agent names - * @param monitoringDescriptions is a collection of monitoring descriptions - * @return @return collection of objects {a description, a session id, an average value, a box identifier, an url of system under test, a task id} - */ - private List getRawDataDbCall( - Collection sessionIds, Collection workloadTaskDataIds, - Collection agentNames, Collection monitoringDescriptions) { - - return entityManager.createNativeQuery( - "SELECT ms.description, ms.sessionId, ms.time, ms.averageValue, ms.boxIdentifier, ms.systemUnderTestUrl, ids.taskDataId FROM " + - " (" + - " SELECT * FROM MonitoringStatistics AS ms " + - " WHERE ms.sessionId IN (:sessionIds)" + - " AND ms.description IN (:descriptions)" + - " AND (ms.boxIdentifier IN (:agentNames) OR ms.systemUnderTestUrl IN (:agentNames))" + - " ) AS ms JOIN " + - " ( " + - " SELECT test.id, mysome.taskDataId FROM " + - " ( " + - " SELECT test.id, test.sessionId, test.taskId FROM TaskData AS test WHERE test.sessionId IN (:sessionIds)" + - " ) AS test JOIN " + - " (" + - " SELECT mysome.parentId, pm.monitoringId, mysome.taskDataId, pm.sessionId FROM" + - " (" + - " SELECT pm.monitoringId, pm.sessionId, pm.parentId FROM PerformedMonitoring AS pm WHERE pm.sessionId IN " + - "(:sessionIds) " + - " ) AS pm JOIN " + - " (" + - " SELECT td2.sessionId, td2.id AS taskDataId, wd.parentId FROM" + - " ( " + - " SELECT wd.parentId, wd.sessionId, wd.taskId FROM WorkloadData AS wd WHERE wd.sessionId IN " + - "(:sessionIds)" + - " ) AS wd JOIN " + - " TaskData AS td2" + - " ON td2.id IN (:taskIds)" + - " AND wd.sessionId = td2.sessionId" + - " AND wd.taskId=td2.taskId" + - " ) AS mysome ON pm.sessionId = mysome.sessionId AND pm.parentId=mysome.parentId" + - " ) AS mysome ON test.sessionId = mysome.sessionId AND test.taskId=mysome.monitoringId" + - " ) AS ids ON ms.taskData_id = ids.id") - .setParameter("sessionIds", sessionIds) - .setParameter("taskIds", workloadTaskDataIds) - .setParameter("agentNames", agentNames) - .setParameter("descriptions", monitoringDescriptions) - .getResultList(); - } -} \ No newline at end of file diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/SessionScopeMonitoringMetricPlotFetcher.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/SessionScopeMonitoringMetricPlotFetcher.java deleted file mode 100644 index 5dcba9754..000000000 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/fetcher/SessionScopeMonitoringMetricPlotFetcher.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.griddynamics.jagger.dbapi.fetcher; - -import org.springframework.stereotype.Component; - -/** - * User: mnovozhilov - * Date: 6/10/14 - * Time: 4:41 PM - */ -@Component -@Deprecated -public class SessionScopeMonitoringMetricPlotFetcher extends AbstractSessionScopeFetcher { - -} diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/CustomMetricNameProvider.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/CustomMetricNameProvider.java index 693203260..db273ba42 100644 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/CustomMetricNameProvider.java +++ b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/CustomMetricNameProvider.java @@ -18,7 +18,6 @@ import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceException; -import java.math.BigInteger; import java.util.Collection; import java.util.Collections; import java.util.HashSet; @@ -69,66 +68,11 @@ public Set getMetricNames(List tests) { metrics.addAll(getCustomTestGroupMetricsNamesNewModel(tests)); - metrics.addAll(getCustomMetricsNamesOldModel(tests)); - log.debug("{} ms spent for fetching {} custom metrics", System.currentTimeMillis() - temp, metrics.size()); return metrics; } - @Deprecated - private Set getCustomMetricsNamesOldModel(List tests) { - Set taskIds = new HashSet<>(); - Set sessionIds = new HashSet<>(); - for (TaskDataDto tdd : tests) { - taskIds.addAll(tdd.getIds()); - sessionIds.addAll(tdd.getSessionIds()); - } - - long temp = System.currentTimeMillis(); - - // check old data (before jagger 1.2.4 version) - List metricNames = entityManager.createNativeQuery( - "SELECT dre.name, selected.id FROM DiagnosticResultEntity dre JOIN " - + " (" - + " SELECT wd.workloaddataID, td.id FROM " - + " (" - + " SELECT wd.id AS workloaddataID, wd.sessionId, wd.taskId FROM WorkloadData wd WHERE wd.sessionId IN (:sessionIds)" - + " ) AS wd JOIN " - + " ( " - + " SELECT td.taskId, td.sessionId, td.id FROM TaskData td WHERE td.id IN (:taskIds)" - + " ) AS td ON wd.taskId=td.taskId AND wd.sessionId=td.sessionId" - + " ) AS selected ON dre.workloadData_id=selected.workloaddataID") - .setParameter("taskIds", taskIds) - .setParameter("sessionIds", sessionIds) - .getResultList(); - - if (metricNames.isEmpty()) { - return Collections.emptySet(); - } - - Set metrics = new HashSet<>(metricNames.size()); - - log.debug("{} ms spent for fetching {} custom metrics", System.currentTimeMillis() - temp, metricNames.size()); - - for (Object[] name : metricNames) { - if (name == null || name[0] == null) continue; - for (TaskDataDto td : tests) { - if (td.getIds().contains(((BigInteger) name[1]).longValue())) { - MetricNameDto metric = new MetricNameDto(); - metric.setTest(td); - metric.setMetricName((String) name[0]); - metric.setOrigin(MetricNameDto.Origin.METRIC); - metrics.add(metric); - break; - } - } - } - - return metrics; - - } - private Set getCustomMetricsNamesNewModel(List tests) { try { Set taskIds = CommonUtils.getTestsIds(tests); diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/CustomMetricPlotNameProvider.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/CustomMetricPlotNameProvider.java index 99cb0acda..89ed38ffd 100644 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/CustomMetricPlotNameProvider.java +++ b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/CustomMetricPlotNameProvider.java @@ -18,7 +18,6 @@ import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceException; -import java.math.BigInteger; import java.util.Collection; import java.util.Collections; import java.util.HashSet; @@ -65,51 +64,11 @@ public Set getPlotNames(List taskDataDtos) { result.addAll(getTestGroupPlotNamesNewModel(taskDataDtos)); - result.addAll(getPlotNamesOldModel(taskDataDtos)); - log.debug("{} ms spent to fetch custom metrics plots names in count of {}", System.currentTimeMillis() - temp, result.size()); return result; } - @Deprecated - public Set getPlotNamesOldModel(List taskDataDtos) { - - Set testIds = new HashSet<>(); - for (TaskDataDto tdd : taskDataDtos) { - testIds.addAll(tdd.getIds()); - } - - // check old model (before jagger 1.2.4) - List plotNames = entityManager.createNativeQuery("SELECT metricDetails.metric, metricDetails.taskData_id FROM MetricDetails " - + "metricDetails " - + "WHERE metricDetails.taskData_id IN (:ids) " - + "GROUP BY metricDetails.metric, metricDetails.taskData_id") - .setParameter("ids", testIds) - .getResultList(); - - - if (plotNames.isEmpty()) { - return Collections.emptySet(); - } - - Set result = new HashSet<>(plotNames.size()); - - for (Object[] plotName : plotNames) { - if (plotName != null) { - for (TaskDataDto tdd : taskDataDtos) { - if (tdd.getIds().contains(((BigInteger) plotName[1]).longValue())) { - MetricNameDto metricNameDto = new MetricNameDto(tdd, (String) plotName[0]); - metricNameDto.setOrigin(MetricNameDto.Origin.METRIC); - result.add(metricNameDto); - } - } - } - } - - return result; - } - public Set getPlotNamesNewModel(List taskDataDtos) { try { diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/LatencyMetricNameProvider.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/LatencyMetricNameProvider.java deleted file mode 100644 index 5441fbac8..000000000 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/provider/LatencyMetricNameProvider.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.griddynamics.jagger.dbapi.provider; - -import com.griddynamics.jagger.dbapi.dto.MetricNameDto; -import com.griddynamics.jagger.dbapi.dto.TaskDataDto; -import com.griddynamics.jagger.dbapi.entity.WorkloadProcessLatencyPercentile; -import com.griddynamics.jagger.util.StandardMetricsNamesUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * Created by kgribov on 4/7/14. - */ -@Component -@Deprecated -public class LatencyMetricNameProvider implements MetricNameProvider { - private Logger log = LoggerFactory.getLogger(LatencyMetricNameProvider.class); - - private EntityManager entityManager; - - @PersistenceContext - public void setEntityManager(EntityManager entityManager) { - this.entityManager = entityManager; - } - - @Override - @Deprecated - public Set getMetricNames(List tests) { - Set latencyNames; - - Set testIds = new HashSet<>(); - for (TaskDataDto tdd : tests) { - testIds.addAll(tdd.getIds()); - } - - long temp = System.currentTimeMillis(); - List latency = entityManager.createQuery( - "select s from WorkloadProcessLatencyPercentile as s where s.workloadProcessDescriptiveStatistics.taskData.id in (:taskIds) ") - .setParameter("taskIds", testIds) - .getResultList(); - - - log.debug("{} ms spent for Latency Percentile fetching (size ={})", System.currentTimeMillis() - temp, latency.size()); - - latencyNames = new HashSet<>(latency.size()); - - if (!latency.isEmpty()) { - for (WorkloadProcessLatencyPercentile percentile : latency) { - for (TaskDataDto tdd : tests) { - - if (tdd.getIds().contains(percentile.getWorkloadProcessDescriptiveStatistics().getTaskData().getId())) { - MetricNameDto dto = new MetricNameDto(); - String metricName = StandardMetricsNamesUtil.getLatencyMetricName(percentile.getPercentileKey(), true); - String metricNameSynonym = StandardMetricsNamesUtil.getLatencyMetricName(percentile.getPercentileKey(), false); - dto.setMetricName(metricName); - dto.setMetricDisplayName(metricNameSynonym); // done on purpose to have equal display names for old and new model - dto.setTest(tdd); - dto.setMetricNameSynonyms(Collections.singletonList(metricNameSynonym)); - dto.setOrigin(MetricNameDto.Origin.LATENCY_PERCENTILE); - latencyNames.add(dto); - break; - } - } - } - } - return latencyNames; - } -} From 1420b9a9466ba5dee464be6b746c25dcb6ef5dc4 Mon Sep 17 00:00:00 2001 From: anton-antonenko Date: Fri, 2 Dec 2016 12:45:27 +0200 Subject: [PATCH 02/14] JFG-977: Remove redundant configurations --- .../configuration/master/session.properties | 2 - .../example-test-target-session.conf.xml | 116 ------------------ .../session/monitoring-session.conf.xml | 61 --------- 3 files changed, 179 deletions(-) delete mode 100644 chassis/configuration/configuration/master/session/example-test-target-session.conf.xml delete mode 100644 chassis/configuration/configuration/master/session/monitoring-session.conf.xml diff --git a/chassis/configuration/configuration/master/session.properties b/chassis/configuration/configuration/master/session.properties index 98abaf983..624258384 100644 --- a/chassis/configuration/configuration/master/session.properties +++ b/chassis/configuration/configuration/master/session.properties @@ -17,6 +17,4 @@ # # Id of load test scenario that will be executed by master -jagger.load.scenario.id.to.execute=testHttpTargetConfiguration -#jagger.load.scenario.id.to.execute=testHttpTargetConfiguration #jagger.load.scenario.id.to.execute=testTcpTrafficTargetConfiguration \ No newline at end of file diff --git a/chassis/configuration/configuration/master/session/example-test-target-session.conf.xml b/chassis/configuration/configuration/master/session/example-test-target-session.conf.xml deleted file mode 100644 index 3134adac7..000000000 --- a/chassis/configuration/configuration/master/session/example-test-target-session.conf.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chassis/configuration/configuration/master/session/monitoring-session.conf.xml b/chassis/configuration/configuration/master/session/monitoring-session.conf.xml deleted file mode 100644 index 3dc612517..000000000 --- a/chassis/configuration/configuration/master/session/monitoring-session.conf.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 14a5656ef427b7b9aa0ab25740098789a356eb6f Mon Sep 17 00:00:00 2001 From: aantonenko Date: Mon, 19 Dec 2016 12:04:43 +0200 Subject: [PATCH 03/14] JFG-1069: make testProjectURL property of TestExecutionEntity nullable --- .../jaas/storage/model/TestExecutionEntity.java | 2 +- .../jaas/rest/TestExecutionRestController.java | 5 ++--- .../jaas/storage/impl/TestExecutionDaoTest.java | 14 +++++++++++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/jaas-client/src/main/java/com/griddynamics/jagger/jaas/storage/model/TestExecutionEntity.java b/jaas-client/src/main/java/com/griddynamics/jagger/jaas/storage/model/TestExecutionEntity.java index f7a424ec6..c5cb91e41 100644 --- a/jaas-client/src/main/java/com/griddynamics/jagger/jaas/storage/model/TestExecutionEntity.java +++ b/jaas-client/src/main/java/com/griddynamics/jagger/jaas/storage/model/TestExecutionEntity.java @@ -33,7 +33,7 @@ public enum TestExecutionStatus { @Column(name = "`load_scenario_id`", nullable = false) private String loadScenarioId; - @Column(name = "`test_project_url`", nullable = false) + @Column(name = "`test_project_url`") private String testProjectURL; @Column(name = "`execution_start_timeout_in_seconds`") diff --git a/jaas/src/main/java/com/griddynamics/jagger/jaas/rest/TestExecutionRestController.java b/jaas/src/main/java/com/griddynamics/jagger/jaas/rest/TestExecutionRestController.java index 530f03ae3..fc0dd5690 100644 --- a/jaas/src/main/java/com/griddynamics/jagger/jaas/rest/TestExecutionRestController.java +++ b/jaas/src/main/java/com/griddynamics/jagger/jaas/rest/TestExecutionRestController.java @@ -3,6 +3,7 @@ import com.griddynamics.jagger.jaas.exceptions.InvalidTestExecutionException; import com.griddynamics.jagger.jaas.service.TestExecutionService; import com.griddynamics.jagger.jaas.storage.model.TestExecutionEntity; +import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; @@ -56,15 +57,13 @@ public ResponseEntity createTestExecution(@RequestBody Test } private void validateTestExecution(TestExecutionEntity testExecution) { - if (testExecution.getTestProjectURL() != null) { + if (StringUtils.isNotBlank(testExecution.getTestProjectURL())) { try { new URL(testExecution.getTestProjectURL()); } catch (MalformedURLException e) { throw new InvalidTestExecutionException( format("Test project URL '%s' is not valid URL! %s", testExecution.getTestProjectURL(), e.getMessage()), e); } - } else { - throw new InvalidTestExecutionException("Test project URL must not be null!"); } } diff --git a/jaas/src/test/java/com/griddynamics/jagger/jaas/storage/impl/TestExecutionDaoTest.java b/jaas/src/test/java/com/griddynamics/jagger/jaas/storage/impl/TestExecutionDaoTest.java index db7f403f6..97e5e9977 100644 --- a/jaas/src/test/java/com/griddynamics/jagger/jaas/storage/impl/TestExecutionDaoTest.java +++ b/jaas/src/test/java/com/griddynamics/jagger/jaas/storage/impl/TestExecutionDaoTest.java @@ -72,7 +72,19 @@ public void createWithInvalidAuditTest2() { expected.addAuditEntity(new TestExecutionAuditEntity(getTestExecutionEntity(), System.currentTimeMillis(), PENDING, RUNNING)); testExecutionDao.create(expected); } - + + @Test + public void createWithoutTestUrl() { + TestExecutionEntity expected = getTestExecutionEntity(); + expected.setTestProjectURL(null); + testExecutionDao.create(expected); + + TestExecutionEntity actual = testExecutionDao.read(1L); + + assertThat(actual, is(notNullValue())); + assertThat(actual, is(expected)); + } + @Test public void readTest() { TestExecutionEntity expected = getTestExecutionEntity(); From 31a65d901fcf1cc38ccf2e6f8f2e585ca657e150 Mon Sep 17 00:00:00 2001 From: aantonenko Date: Tue, 10 Jan 2017 14:00:48 +0200 Subject: [PATCH 04/14] JFG-1087: add default constructor to DecisionPerSessionDto --- .../griddynamics/jagger/dbapi/dto/DecisionPerSessionDto.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerSessionDto.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerSessionDto.java index 02057b64f..60e6522ae 100644 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerSessionDto.java +++ b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerSessionDto.java @@ -17,6 +17,9 @@ public class DecisionPerSessionDto { private Decision decision; private List testGroupDecisions; + public DecisionPerSessionDto() { + } + public DecisionPerSessionDto(DecisionPerSessionEntity decisionPerSessionEntity) { this.id = decisionPerSessionEntity.getId(); this.sessionId = decisionPerSessionEntity.getSessionId(); From 0886eaa9d24222a0672e7b8b3f5066ab5d2a8118 Mon Sep 17 00:00:00 2001 From: aantonenko Date: Tue, 10 Jan 2017 14:09:20 +0200 Subject: [PATCH 05/14] JFG-1087: add default constructors to decision dtos --- .../griddynamics/jagger/dbapi/dto/DecisionPerMetricDto.java | 3 +++ .../com/griddynamics/jagger/dbapi/dto/DecisionPerTestDto.java | 3 +++ .../griddynamics/jagger/dbapi/dto/DecisionPerTestGroupDto.java | 3 +++ 3 files changed, 9 insertions(+) diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerMetricDto.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerMetricDto.java index 7b15ffcca..7a82f0bdf 100644 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerMetricDto.java +++ b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerMetricDto.java @@ -15,6 +15,9 @@ public class DecisionPerMetricDto { private MetricDescriptionEntity metricDescription; private Decision decision; + public DecisionPerMetricDto() { + } + public DecisionPerMetricDto(DecisionPerMetricEntity decisionPerMetricEntity) { this.id = decisionPerMetricEntity.getId(); this.metricDescription = decisionPerMetricEntity.getMetricDescriptionEntity(); diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerTestDto.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerTestDto.java index 04698fa9f..eb430738d 100644 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerTestDto.java +++ b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerTestDto.java @@ -17,6 +17,9 @@ public class DecisionPerTestDto { private Decision decision; private List metricDecisions; + public DecisionPerTestDto() { + } + public DecisionPerTestDto(DecisionPerTaskEntity decisionPerTaskEntity) { this.id = decisionPerTaskEntity.getId(); this.taskData = decisionPerTaskEntity.getTaskData(); diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerTestGroupDto.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerTestGroupDto.java index 5afafe0a3..e47b2b08c 100644 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerTestGroupDto.java +++ b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/dto/DecisionPerTestGroupDto.java @@ -18,6 +18,9 @@ public class DecisionPerTestGroupDto { private List testDecisions; private List metricDecisions; + public DecisionPerTestGroupDto() { + } + public DecisionPerTestGroupDto(DecisionPerTaskEntity decisionPerTaskEntity) { this.id = decisionPerTaskEntity.getId(); this.taskData = decisionPerTaskEntity.getTaskData(); From a6d4cfc5908a7e5af0e9be5c937fdf86cc017e6c Mon Sep 17 00:00:00 2001 From: aantonenko Date: Tue, 10 Jan 2017 14:37:40 +0200 Subject: [PATCH 06/14] JFG-1071: rename property --- .../jagger/jaas/service/impl/TestExecutionServiceImpl.java | 2 +- jaas/src/main/resources/application.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jaas/src/main/java/com/griddynamics/jagger/jaas/service/impl/TestExecutionServiceImpl.java b/jaas/src/main/java/com/griddynamics/jagger/jaas/service/impl/TestExecutionServiceImpl.java index 489e9ebb9..8b3fc7a4f 100644 --- a/jaas/src/main/java/com/griddynamics/jagger/jaas/service/impl/TestExecutionServiceImpl.java +++ b/jaas/src/main/java/com/griddynamics/jagger/jaas/service/impl/TestExecutionServiceImpl.java @@ -17,7 +17,7 @@ @Service public class TestExecutionServiceImpl implements TestExecutionService { - @Value("${test.execution.default.start.timeout.seconds}") + @Value("${test.execution.default.time.to.start.seconds}") private Long testExecutionDefaultTimeToStartInSeconds; private TestExecutionDao testExecutionDao; diff --git a/jaas/src/main/resources/application.properties b/jaas/src/main/resources/application.properties index 955e0d4ae..d84b8b012 100644 --- a/jaas/src/main/resources/application.properties +++ b/jaas/src/main/resources/application.properties @@ -10,7 +10,7 @@ environments.cleaning.job.periodicity.milliseconds=60000 environments.ttl.minutes=5 # Default test execution start timeout in seconds 3h = 60*60*3 -test.execution.default.start.timeout.seconds=10800 +test.execution.default.time.to.start.seconds=10800 # Periodicity of TestExecutionsTerminatingService#terminateOutdatedTestExecutionsTask() in milliseconds. 60000 ms = 1 min test.execution.termination.periodicity.milliseconds=60000 From b99dda5cb47d6a548858275522b5273d4cae2325 Mon Sep 17 00:00:00 2001 From: aantonenko Date: Thu, 12 Jan 2017 10:49:48 +0200 Subject: [PATCH 07/14] JFG-962: change default load balancer --- .../jagger/user/test/configurations/JTestDefinition.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/JTestDefinition.java b/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/JTestDefinition.java index 3eed18da8..d1f3316dd 100644 --- a/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/JTestDefinition.java +++ b/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/JTestDefinition.java @@ -1,19 +1,18 @@ package com.griddynamics.jagger.user.test.configurations; +import com.google.common.collect.Lists; import com.griddynamics.jagger.engine.e1.Provider; import com.griddynamics.jagger.engine.e1.collector.ResponseValidatorProvider; import com.griddynamics.jagger.engine.e1.collector.invocation.InvocationListener; import com.griddynamics.jagger.invoker.Invoker; import com.griddynamics.jagger.invoker.QueryPoolLoadBalancer; +import com.griddynamics.jagger.invoker.RandomLoadBalancer; import com.griddynamics.jagger.invoker.RoundRobinLoadBalancer; import com.griddynamics.jagger.invoker.RoundRobinPairSupplierFactory; -import com.griddynamics.jagger.invoker.SimpleCircularLoadBalancer; import com.griddynamics.jagger.invoker.v2.DefaultHttpInvoker; import com.griddynamics.jagger.invoker.v2.DefaultInvokerProvider; import com.griddynamics.jagger.user.test.configurations.auxiliary.Id; -import com.google.common.collect.Lists; - import java.util.List; /** @@ -84,7 +83,7 @@ public static class Builder { private Builder(Id id, Iterable endpointsProvider) { this.id = id; this.endpointsProvider = endpointsProvider; - this.loadBalancer = new SimpleCircularLoadBalancer() {{ + this.loadBalancer = new RandomLoadBalancer() {{ setPairSupplierFactory(new RoundRobinPairSupplierFactory()); }}; } From bcb2e174ea9189444c4a8cbda63904f90fc40297 Mon Sep 17 00:00:00 2001 From: aantonenko Date: Thu, 12 Jan 2017 10:51:47 +0200 Subject: [PATCH 08/14] JFG-962: change default load balancer --- .../jagger/user/test/configurations/JTestDefinition.java | 1 + 1 file changed, 1 insertion(+) diff --git a/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/JTestDefinition.java b/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/JTestDefinition.java index d1f3316dd..0af5ad0d3 100644 --- a/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/JTestDefinition.java +++ b/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/JTestDefinition.java @@ -85,6 +85,7 @@ private Builder(Id id, Iterable endpointsProvider) { this.endpointsProvider = endpointsProvider; this.loadBalancer = new RandomLoadBalancer() {{ setPairSupplierFactory(new RoundRobinPairSupplierFactory()); + setRandomSeed(31); }}; } From 13aa959620cd8e0405d074f30f45fdd064efc8b0 Mon Sep 17 00:00:00 2001 From: aantonenko Date: Fri, 13 Jan 2017 10:59:13 +0200 Subject: [PATCH 09/14] JFG-1049: fix test name with dot issue in DataServiceRestController --- .../jagger/jaas/rest/DataServiceRestController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jaas/src/main/java/com/griddynamics/jagger/jaas/rest/DataServiceRestController.java b/jaas/src/main/java/com/griddynamics/jagger/jaas/rest/DataServiceRestController.java index 7f05df89e..d2dedddd7 100644 --- a/jaas/src/main/java/com/griddynamics/jagger/jaas/rest/DataServiceRestController.java +++ b/jaas/src/main/java/com/griddynamics/jagger/jaas/rest/DataServiceRestController.java @@ -57,7 +57,7 @@ public ResponseEntity getSessionDecision(@PathVariable St return dynamicDataServiceRestController.getSessionDecision(DEFAULT_DB_CONFIG_ID, sessionId); } - @GetMapping(value = "/sessions/{sessionId}/tests/{testName}", produces = MediaType.APPLICATION_JSON_VALUE) + @GetMapping(value = "/sessions/{sessionId}/tests/{testName:.+}", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity getTest(@PathVariable String sessionId, @PathVariable String testName) { return dynamicDataServiceRestController.getTest(DEFAULT_DB_CONFIG_ID, sessionId, testName); } @@ -72,12 +72,12 @@ public ResponseEntity> getMetrics(@PathVariable Long testId) { return dynamicDataServiceRestController.getMetrics(DEFAULT_DB_CONFIG_ID, testId); } - @GetMapping(value = "/sessions/{sessionId}/tests/{testName}/metrics", produces = MediaType.APPLICATION_JSON_VALUE) + @GetMapping(value = "/sessions/{sessionId}/tests/{testName:.+}/metrics", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getMetrics(@PathVariable String sessionId, @PathVariable String testName) { return dynamicDataServiceRestController.getMetrics(DEFAULT_DB_CONFIG_ID, sessionId, testName); } - @GetMapping(value = "/sessions/{sessionId}/tests/{testName}/metrics/summary", + @GetMapping(value = "/sessions/{sessionId}/tests/{testName:.+}/metrics/summary", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getMetricsSummary(@PathVariable String sessionId, @PathVariable String testName @@ -85,7 +85,7 @@ public ResponseEntity> getMetricsSum return dynamicDataServiceRestController.getMetricsSummary(DEFAULT_DB_CONFIG_ID, sessionId, testName); } - @GetMapping(value = "/sessions/{sessionId}/tests/{testName}/metrics/plot-data", + @GetMapping(value = "/sessions/{sessionId}/tests/{testName:.+}/metrics/plot-data", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getMetricPlotData( @PathVariable String sessionId, @PathVariable String testName From b36b4990ec1dbe1a731d0e8b43dd1d0fd74f8a35 Mon Sep 17 00:00:00 2001 From: aantonenko Date: Wed, 18 Jan 2017 14:00:53 +0200 Subject: [PATCH 10/14] JFG-1047: store all Dates as timestamps in DB; add timezone to date format in report and webUI --- .../reporting/session-summary-reporting.jrxml | 14 +++++------ .../aggregator/session/BasicAggregator.java | 24 +++++++++---------- .../workload/WorkloadAggregator.java | 5 ++-- .../jagger/util/FormatCalculator.java | 2 +- .../jagger/dbapi/entity/SessionData.java | 18 +++++++------- .../jagger/dbapi/entity/WorkloadData.java | 13 +++++----- .../provider/SessionInfoProviderImpl.java | 16 ++++++------- .../jagger/dbapi/util/FetchUtil.java | 4 ++-- 8 files changed, 45 insertions(+), 51 deletions(-) diff --git a/chassis/configuration/configuration/reporting/session-summary-reporting.jrxml b/chassis/configuration/configuration/reporting/session-summary-reporting.jrxml index bd11b3b8d..cb8eb2b5e 100644 --- a/chassis/configuration/configuration/reporting/session-summary-reporting.jrxml +++ b/chassis/configuration/configuration/reporting/session-summary-reporting.jrxml @@ -32,8 +32,8 @@ - - + + @@ -84,10 +84,10 @@ - + - + - + - + - + selectedIds) throws RuntimeException { return 0L; } - List startTimeList = (List) entityManager.createQuery("select ses.startTime from SessionData ses where ses.sessionId in " + + List startTimeList = (List) entityManager.createQuery("select ses.startTime from SessionData ses where ses.sessionId in " + "(:sessionIds) order by ses.startTime asc") .setMaxResults(1) .setParameter("sessionIds", selectedIds).getResultList(); @@ -140,7 +140,7 @@ public Long getFirstPosition(Set selectedIds) throws RuntimeException { return 0L; } - Date startTime = startTimeList.iterator().next(); + Date startTime = new Date(startTimeList.iterator().next()); Long lastPosition = (Long) entityManager.createQuery("select count(ses.id) from SessionData ses where startTime<=:startTime") .setParameter("startTime", startTime).getSingleResult(); @@ -239,8 +239,8 @@ public List getByDatePeriod(int start, int length, Date from, Da try { List sessionDataList = (List) entityManager.createQuery("select sd from SessionData as sd where sd.startTime between :from and :to order by sd.startTime asc") - .setParameter("from", from) - .setParameter("to", to) + .setParameter("from", from.getTime()) + .setParameter("to", to.getTime()) .setFirstResult(start) .setMaxResults(length) .getResultList(); @@ -467,8 +467,8 @@ private SessionDataDto createSessionDataDto(SessionData sessionData, String user return new SessionDataDto( sessionData.getId(), sessionData.getSessionId(), - sessionData.getStartTime(), - sessionData.getEndTime(), + new Date(sessionData.getStartTime()), + new Date(sessionData.getEndTime()), sessionData.getActiveKernels(), sessionData.getTaskExecuted(), sessionData.getTaskFailed(), diff --git a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/util/FetchUtil.java b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/util/FetchUtil.java index 0c0bc0290..57516dbfa 100644 --- a/dbapi/src/main/java/com/griddynamics/jagger/dbapi/util/FetchUtil.java +++ b/dbapi/src/main/java/com/griddynamics/jagger/dbapi/util/FetchUtil.java @@ -128,8 +128,8 @@ public Map> getTestInfoByTaskIds(Set taskId String termination = (String) objects[3]; String sessionId = (String) objects[0]; - Date startTime = (Date) objects[5]; - Date endTime = (Date) objects[6]; + Date startTime = new Date(((BigInteger) objects[5]).longValue()); + Date endTime = new Date(((BigInteger) objects[6]).longValue()); Integer number = (Integer) objects[7]; From e0cf1319f8961262c721ce819f13908908e4e1e1 Mon Sep 17 00:00:00 2001 From: aantonenko Date: Wed, 18 Jan 2017 14:07:57 +0200 Subject: [PATCH 11/14] JFG-1047: change default TZ in docker to UTC --- docker/compose/src/main/files/my.cnf | 2 +- .../main/resources/docker-compose-with-existing-results-db.yml | 2 +- docker/compose/src/main/resources/docker-compose.yml | 2 +- docker/jagger/webclient/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/compose/src/main/files/my.cnf b/docker/compose/src/main/files/my.cnf index b5ef753cb..1c4185445 100644 --- a/docker/compose/src/main/files/my.cnf +++ b/docker/compose/src/main/files/my.cnf @@ -1,4 +1,4 @@ [mysqld] -#default_time_zone = "Europe/Moscow" +#default_time_zone = "UTC" sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY" diff --git a/docker/compose/src/main/resources/docker-compose-with-existing-results-db.yml b/docker/compose/src/main/resources/docker-compose-with-existing-results-db.yml index ec3974d3f..02d8bb253 100644 --- a/docker/compose/src/main/resources/docker-compose-with-existing-results-db.yml +++ b/docker/compose/src/main/resources/docker-compose-with-existing-results-db.yml @@ -22,7 +22,7 @@ services: ports: - 8087:80 environment: - TZ: Europe/Moscow + TZ: UTC JWC_HTTP_PORT: 80 JWC_JDBC_DRIVER: com.mysql.jdbc.Driver # Specify here the existing results database diff --git a/docker/compose/src/main/resources/docker-compose.yml b/docker/compose/src/main/resources/docker-compose.yml index c02a97b92..44c18e5e1 100644 --- a/docker/compose/src/main/resources/docker-compose.yml +++ b/docker/compose/src/main/resources/docker-compose.yml @@ -43,7 +43,7 @@ services: depends_on: - jagger-mysql environment: - TZ: Europe/Moscow + TZ: UTC JWC_HTTP_PORT: 80 JWC_JDBC_DRIVER: com.mysql.jdbc.Driver JWC_JDBC_URL: jdbc:mysql://jagger-mysql:3306/jaggerdb diff --git a/docker/jagger/webclient/Dockerfile b/docker/jagger/webclient/Dockerfile index 046d85ad3..ac2fd26d2 100644 --- a/docker/jagger/webclient/Dockerfile +++ b/docker/jagger/webclient/Dockerfile @@ -12,7 +12,7 @@ ENV MYSQL_HOST mysql ENV MYSQL_PORT 3306 # Set default timezone -ENV TZ=Europe/Moscow +ENV TZ=UTC # Get latest jagger-webclient ADD ["http://nexus.vm.griddynamics.net:8081/nexus/service/local/artifact/maven/content?r=jagger-snapshots&g=com.griddynamics.jagger&a=webclient&c=war-exec&v=${project.version}", "/com/griddynamics/jagger/jagger-webclient.jar"] From dc33d0bdd696504f96754ffae5c994ef91d3acfb Mon Sep 17 00:00:00 2001 From: aantonenko Date: Thu, 19 Jan 2017 18:33:17 +0200 Subject: [PATCH 12/14] JFG-1047: change default load balancers creation --- .../test/configurations/loadbalancer/JLoadBalancer.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java b/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java index 4050c497b..882066a85 100644 --- a/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java +++ b/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java @@ -6,6 +6,7 @@ import com.griddynamics.jagger.invoker.RandomLoadBalancer; import com.griddynamics.jagger.invoker.RoundRobinLoadBalancer; import com.griddynamics.jagger.invoker.RoundRobinPairSupplierFactory; +import com.griddynamics.jagger.invoker.SimpleCircularLoadBalancer; import java.io.Serializable; import java.util.Random; @@ -66,7 +67,9 @@ public QueryPoolLoadBalancer build() { switch (loadBalancer) { case ONE_BY_ONE: if (seed == null) { - return new OneByOneLoadBalancer(); + SimpleCircularLoadBalancer loadBalancer = new SimpleCircularLoadBalancer(); + loadBalancer.setPairSupplierFactory(new OneByOnePairSupplierFactory()); + return loadBalancer; } else { RandomLoadBalancer randomLoadBalancer = new RandomLoadBalancer(); randomLoadBalancer.setRandomSeed(seed); @@ -76,7 +79,9 @@ public QueryPoolLoadBalancer build() { case ROUND_ROBIN: default: if (seed == null) { - return new RoundRobinLoadBalancer(); + SimpleCircularLoadBalancer loadBalancer = new SimpleCircularLoadBalancer(); + loadBalancer.setPairSupplierFactory(new RoundRobinPairSupplierFactory()); + return loadBalancer; } else { RandomLoadBalancer randomLoadBalancer = new RandomLoadBalancer(); randomLoadBalancer.setRandomSeed(seed); From 10bcd7eabddcdffeb342bb3c0916ea81976f162d Mon Sep 17 00:00:00 2001 From: aantonenko Date: Thu, 19 Jan 2017 18:44:01 +0200 Subject: [PATCH 13/14] revert JFG-1047: change default load balancers creation --- .../test/configurations/loadbalancer/JLoadBalancer.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java b/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java index 4050c497b..882066a85 100644 --- a/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java +++ b/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java @@ -6,6 +6,7 @@ import com.griddynamics.jagger.invoker.RandomLoadBalancer; import com.griddynamics.jagger.invoker.RoundRobinLoadBalancer; import com.griddynamics.jagger.invoker.RoundRobinPairSupplierFactory; +import com.griddynamics.jagger.invoker.SimpleCircularLoadBalancer; import java.io.Serializable; import java.util.Random; @@ -66,7 +67,9 @@ public QueryPoolLoadBalancer build() { switch (loadBalancer) { case ONE_BY_ONE: if (seed == null) { - return new OneByOneLoadBalancer(); + SimpleCircularLoadBalancer loadBalancer = new SimpleCircularLoadBalancer(); + loadBalancer.setPairSupplierFactory(new OneByOnePairSupplierFactory()); + return loadBalancer; } else { RandomLoadBalancer randomLoadBalancer = new RandomLoadBalancer(); randomLoadBalancer.setRandomSeed(seed); @@ -76,7 +79,9 @@ public QueryPoolLoadBalancer build() { case ROUND_ROBIN: default: if (seed == null) { - return new RoundRobinLoadBalancer(); + SimpleCircularLoadBalancer loadBalancer = new SimpleCircularLoadBalancer(); + loadBalancer.setPairSupplierFactory(new RoundRobinPairSupplierFactory()); + return loadBalancer; } else { RandomLoadBalancer randomLoadBalancer = new RandomLoadBalancer(); randomLoadBalancer.setRandomSeed(seed); From 66261891e093a7c6d8cfcf34a16b7bda4375c72a Mon Sep 17 00:00:00 2001 From: aantonenko Date: Thu, 19 Jan 2017 18:45:21 +0200 Subject: [PATCH 14/14] revert JFG-1047: change default load balancers creation --- .../test/configurations/loadbalancer/JLoadBalancer.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java b/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java index 882066a85..4050c497b 100644 --- a/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java +++ b/chassis/core/src/main/java/com/griddynamics/jagger/user/test/configurations/loadbalancer/JLoadBalancer.java @@ -6,7 +6,6 @@ import com.griddynamics.jagger.invoker.RandomLoadBalancer; import com.griddynamics.jagger.invoker.RoundRobinLoadBalancer; import com.griddynamics.jagger.invoker.RoundRobinPairSupplierFactory; -import com.griddynamics.jagger.invoker.SimpleCircularLoadBalancer; import java.io.Serializable; import java.util.Random; @@ -67,9 +66,7 @@ public QueryPoolLoadBalancer build() { switch (loadBalancer) { case ONE_BY_ONE: if (seed == null) { - SimpleCircularLoadBalancer loadBalancer = new SimpleCircularLoadBalancer(); - loadBalancer.setPairSupplierFactory(new OneByOnePairSupplierFactory()); - return loadBalancer; + return new OneByOneLoadBalancer(); } else { RandomLoadBalancer randomLoadBalancer = new RandomLoadBalancer(); randomLoadBalancer.setRandomSeed(seed); @@ -79,9 +76,7 @@ public QueryPoolLoadBalancer build() { case ROUND_ROBIN: default: if (seed == null) { - SimpleCircularLoadBalancer loadBalancer = new SimpleCircularLoadBalancer(); - loadBalancer.setPairSupplierFactory(new RoundRobinPairSupplierFactory()); - return loadBalancer; + return new RoundRobinLoadBalancer(); } else { RandomLoadBalancer randomLoadBalancer = new RandomLoadBalancer(); randomLoadBalancer.setRandomSeed(seed);