You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by nn...@apache.org on 2018/11/30 01:23:08 UTC
[geode-benchmarks] branch develop updated: GEODE-6106: Adding
spotless and rat to the benchmark build. (#11)
This is an automated email from the ASF dual-hosted git repository.
nnag pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git
The following commit(s) were added to refs/heads/develop by this push:
new e061cad GEODE-6106: Adding spotless and rat to the benchmark build. (#11)
e061cad is described below
commit e061cadd3ebdb634dff25a920c99e554c4f97a9d
Author: Nabarun Nag <na...@users.noreply.github.com>
AuthorDate: Thu Nov 29 17:23:04 2018 -0800
GEODE-6106: Adding spotless and rat to the benchmark build. (#11)
---
.gitignore | 8 +-
build.gradle | 21 +-
etc/eclipse-java-google-style.xml | 337 +++++++++++++++++++++
etc/eclipseOrganizeImports.importorder | 8 +
etc/intellij-java-modified-google-style.xml | 255 ++++++++++++++++
geode-benchmarks/build.gradle | 8 +-
.../configurations/BenchmarkParameters.java | 4 +-
.../apache/geode/benchmark/data/PortfolioPdx.java | 8 +-
.../org/apache/geode/benchmark/tasks/GetTask.java | 8 +-
.../apache/geode/benchmark/tasks/LocatorUtil.java | 6 +-
.../geode/benchmark/tasks/PrePopulateRegion.java | 19 +-
.../org/apache/geode/benchmark/tasks/PutTask.java | 10 +-
.../apache/geode/benchmark/tasks/StartClient.java | 8 +-
.../apache/geode/benchmark/tasks/StartLocator.java | 10 +-
.../apache/geode/benchmark/tasks/StartServer.java | 6 +-
.../geode/benchmark/tests/BenchmarkOperation.java | 5 +-
.../benchmark/tests/PartitionedGetBenchmark.java | 11 +-
.../benchmark/tests/PartitionedPutBenchmark.java | 11 +-
.../apache/geode/benchmark/tests/PutBenchmark.java | 2 +-
.../benchmark/tests/ReplicatedGetBenchmark.java | 5 +-
.../benchmark/tests/ReplicatedPutBenchmark.java | 7 +-
.../tests/PartitionedPutBenchmarkTest.java | 9 +-
.../tests/ReplicatedGetBenchmarkTest.java | 3 +-
.../tests/ReplicatedPutBenchmarkTest.java | 3 +-
gradle/rat.gradle | 78 +++++
gradle/spotless.gradle | 137 +++++++++
harness/build.gradle | 20 +-
.../org/apache/geode/perftest/PerformanceTest.java | 16 +-
.../main/java/org/apache/geode/perftest/Task.java | 6 +-
.../java/org/apache/geode/perftest/TestConfig.java | 26 +-
.../org/apache/geode/perftest/TestContext.java | 11 +-
.../java/org/apache/geode/perftest/TestRunner.java | 6 +-
.../org/apache/geode/perftest/TestRunners.java | 24 +-
.../org/apache/geode/perftest/WorkloadConfig.java | 11 +-
.../apache/geode/perftest/analysis/Analyzer.java | 9 +-
.../perftest/analysis/BenchmarkRunAnalyzer.java | 4 +-
.../geode/perftest/analysis/ProbeResultParser.java | 2 +-
.../perftest/infrastructure/Infrastructure.java | 8 +-
.../infrastructure/InfrastructureFactory.java | 6 +-
.../infrastructure/local/LocalInfrastructure.java | 27 +-
.../local/LocalInfrastructureFactory.java | 8 +-
.../infrastructure/ssh/SshInfrastructure.java | 50 +--
.../ssh/SshInfrastructureFactory.java | 10 +-
.../java/org/apache/geode/perftest/jdk/RMI.java | 8 +-
.../apache/geode/perftest/jdk/SystemInterface.java | 6 +-
.../apache/geode/perftest/jvms/JVMLauncher.java | 22 +-
.../org/apache/geode/perftest/jvms/JVMMapping.java | 8 +-
.../geode/perftest/jvms/RemoteJVMFactory.java | 40 +--
.../org/apache/geode/perftest/jvms/RemoteJVMs.java | 18 +-
.../perftest/jvms/classpath/ClassPathCopier.java | 13 +-
.../geode/perftest/jvms/classpath/JarUtil.java | 11 +-
.../apache/geode/perftest/jvms/rmi/ChildJVM.java | 25 +-
.../apache/geode/perftest/jvms/rmi/Controller.java | 10 +-
.../geode/perftest/jvms/rmi/ControllerFactory.java | 8 +-
.../geode/perftest/jvms/rmi/ControllerRemote.java | 6 +-
.../org/apache/geode/perftest/jvms/rmi/Worker.java | 7 +-
.../geode/perftest/jvms/rmi/WorkerRemote.java | 6 +-
.../geode/perftest/runner/DefaultTestContext.java | 10 +-
.../geode/perftest/runner/DefaultTestRunner.java | 18 +-
.../geode/perftest/runner/SharedContext.java | 6 +-
.../geode/perftest/yardstick/TestDoneProbe.java | 6 +-
.../geode/perftest/yardstick/YardstickTask.java | 20 +-
.../analysis/YardstickHdrHistogramParser.java | 7 +-
.../analysis/YardstickPercentileSensorParser.java | 14 +-
.../analysis/YardstickThroughputSensorParser.java | 2 +-
.../perftest/yardstick/hdrhistogram/Clock.java | 6 +-
.../yardstick/hdrhistogram/HdrHistogramProbe.java | 34 ++-
.../geode/perftest/TestRunnerIntegrationTest.java | 19 +-
.../apache/geode/perftest/TestRunnerJUnitTest.java | 14 +-
.../org/apache/geode/perftest/TestRunnersTest.java | 15 +-
.../analysis/BenchmarkRunAnalyzerTest.java | 94 +++---
.../geode/perftest/benchmarks/EmptyBenchmark.java | 6 +-
.../local/LocalInfrastructureTest.java | 12 +-
.../infrastructure/ssh/SshInfrastructureTest.java | 17 +-
.../perftest/infrastructure/ssh/SshServerRule.java | 9 +-
.../jvms/RemoteJVMFactoryIntegrationTest.java | 8 +-
.../geode/perftest/jvms/RemoteJVMFactoryTest.java | 8 +-
.../geode/perftest/jvms/rmi/ChildJVMTest.java | 9 +-
.../geode/perftest/runner/SharedContextTest.java | 10 +-
.../perftest/yardstick/YardstickTaskTest.java | 13 +-
.../YardstickPercentileSensorParserTest.java | 3 +-
.../YardstickThroughputSensorParserTest.java | 3 +-
.../hdrhistogram/HdrHistogramProbeTest.java | 12 +-
83 files changed, 1323 insertions(+), 471 deletions(-)
diff --git a/.gitignore b/.gitignore
index 10f3f63..28ed289 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
-.idea/
-out/
-.gradle/
+.idea
+out
+.gradle
build/
-output/
+output/
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index d2f83cc..2e3e2b9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -20,6 +20,7 @@ buildscript {
}
dependencies {
classpath 'com.bmuschko:gradle-docker-plugin:4.0.4'
+ classpath "com.diffplug.spotless:spotless-plugin-gradle:3.16.0"
}
}
@@ -30,24 +31,9 @@ plugins {
apply plugin: 'com.bmuschko.docker-remote-api'
-rat {
- excludes = [
- '.idea/**',
- '.travis.yml',
- '.gradle/**',
- 'gradlew*',
- 'gradle/**',
- '.git/**',
- '**/output/**',
- '**/output-*/**',
- '**/build/**',
- '**/out/**',
- 'README.md'
- ]
-}
// Import task types
-import com.bmuschko.gradle.docker.tasks.image.*
+import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
// Use task types
task buildTestingImage(type: DockerBuildImage) {
@@ -55,3 +41,6 @@ task buildTestingImage(type: DockerBuildImage) {
dockerFile = file('images/geode-performance/Dockerfile')
tag = 'geode-performance-testing:latest'
}
+
+apply from: "gradle/spotless.gradle"
+apply from: "gradle/rat.gradle"
diff --git a/etc/eclipse-java-google-style.xml b/etc/eclipse-java-google-style.xml
new file mode 100644
index 0000000..629ef19
--- /dev/null
+++ b/etc/eclipse-java-google-style.xml
@@ -0,0 +1,337 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<profiles version="13">
+<profile kind="CodeFormatterProfile" name="GoogleStyle" version="13">
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value="1585"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field.count_dependent" value="1585|-1|1585"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable" value="1585"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable.count_dependent" value="1585|-1|1585"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method" value="1585"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method.count_dependent" value="1585|-1|1585"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package" value="1585"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package.count_dependent" value="1585|-1|1585"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter" value="1040"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter.count_dependent" value="1040|-1|1040"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value="1585"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type.count_dependent" value="1585|-1|1585"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression.count_dependent" value="16|5|80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation.count_dependent" value="16|-1|16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant.count_dependent" value="16|-1|16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call.count_dependent" value="16|5|80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation.count_dependent" value="16|5|80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression.count_dependent" value="16|4|80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression.count_dependent" value="16|-1|16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments.count_dependent" value="16|-1|16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="48"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants.count_dependent" value="16|5|48"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer.count_dependent" value="16|5|80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_field_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_for_statement" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments.count_dependent" value="16|-1|16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields.count_dependent" value="16|-1|16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class" value="20"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration.count_dependent" value="16|5|80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration.count_dependent" value="16|5|80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation.count_dependent" value="16|4|48"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration.count_dependent" value="16|4|49"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration.count_dependent" value="16|4|48"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration.count_dependent" value="16|4|48"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration.count_dependent" value="16|4|48"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="100"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
+<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
+<setting id="org.eclipse.jdt.core.formatter.force_if_else_statement_brace" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comment_prefix" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="3"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_comment_inline_tags" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments" value="false"/>
+</profile>
+</profiles>
diff --git a/etc/eclipseOrganizeImports.importorder b/etc/eclipseOrganizeImports.importorder
new file mode 100644
index 0000000..de96cae
--- /dev/null
+++ b/etc/eclipseOrganizeImports.importorder
@@ -0,0 +1,8 @@
+#Organize Import Order
+#Thu Sep 15 13:10:33 PDT 2016
+5=com.gemstone
+4=org.apache.geode
+3=
+2=javax
+1=java
+0=\#
diff --git a/etc/intellij-java-modified-google-style.xml b/etc/intellij-java-modified-google-style.xml
new file mode 100644
index 0000000..696500c
--- /dev/null
+++ b/etc/intellij-java-modified-google-style.xml
@@ -0,0 +1,255 @@
+<code_scheme name="GeodeStyle">
+ <option name="JAVA_INDENT_OPTIONS">
+ <value>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="8" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </value>
+ </option>
+ <option name="OTHER_INDENT_OPTIONS">
+ <value>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="8" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </value>
+ </option>
+ <option name="LINE_SEPARATOR" value="
" />
+ <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
+ <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
+ <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
+ <value />
+ </option>
+ <option name="IMPORT_LAYOUT_TABLE">
+ <value>
+ <package name="" withSubpackages="true" static="true" />
+ <emptyLine />
+ <package name="java" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="javax" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="org.apache.geode" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="com.gemstone" withSubpackages="true" static="false" />
+ </value>
+ </option>
+ <option name="STATIC_METHODS_ORDER_WEIGHT" value="5" />
+ <option name="METHODS_ORDER_WEIGHT" value="4" />
+ <option name="RIGHT_MARGIN" value="100" />
+ <option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
+ <option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
+ <option name="JD_ADD_BLANK_AFTER_DESCRIPTION" value="false" />
+ <option name="JD_P_AT_EMPTY_LINES" value="false" />
+ <option name="JD_KEEP_EMPTY_PARAMETER" value="false" />
+ <option name="JD_KEEP_EMPTY_EXCEPTION" value="false" />
+ <option name="JD_KEEP_EMPTY_RETURN" value="false" />
+ <option name="HTML_KEEP_BLANK_LINES" value="1" />
+ <option name="HTML_ALIGN_TEXT" value="true" />
+ <option name="KEEP_LINE_BREAKS" value="false" />
+ <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
+ <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
+ <option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
+ <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
+ <option name="BLANK_LINES_AROUND_CLASS" value="0" />
+ <option name="BLANK_LINES_AROUND_FIELD" value="1" />
+ <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
+ <option name="BRACE_STYLE" value="2" />
+ <option name="CLASS_BRACE_STYLE" value="2" />
+ <option name="METHOD_BRACE_STYLE" value="2" />
+ <option name="ELSE_ON_NEW_LINE" value="true" />
+ <option name="WHILE_ON_NEW_LINE" value="true" />
+ <option name="CATCH_ON_NEW_LINE" value="true" />
+ <option name="FINALLY_ON_NEW_LINE" value="true" />
+ <option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
+ <option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
+ <option name="ALIGN_MULTILINE_ASSIGNMENT" value="true" />
+ <option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
+ <option name="ALIGN_MULTILINE_THROWS_LIST" value="true" />
+ <option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
+ <option name="ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION" value="true" />
+ <option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" />
+ <option name="SPACE_AFTER_TYPE_CAST" value="false" />
+ <option name="SPACE_BEFORE_IF_PARENTHESES" value="false" />
+ <option name="SPACE_BEFORE_WHILE_PARENTHESES" value="false" />
+ <option name="SPACE_BEFORE_FOR_PARENTHESES" value="false" />
+ <option name="SPACE_BEFORE_CATCH_PARENTHESES" value="false" />
+ <option name="SPACE_BEFORE_SWITCH_PARENTHESES" value="false" />
+ <option name="SPACE_BEFORE_SYNCHRONIZED_PARENTHESES" value="false" />
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="EXTENDS_LIST_WRAP" value="1" />
+ <option name="THROWS_LIST_WRAP" value="1" />
+ <option name="EXTENDS_KEYWORD_WRAP" value="1" />
+ <option name="THROWS_KEYWORD_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="ASSIGNMENT_WRAP" value="5" />
+ <option name="WRAP_COMMENTS" value="true" />
+ <option name="IF_BRACE_FORCE" value="3" />
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
+ <option name="WHILE_BRACE_FORCE" value="3" />
+ <option name="FOR_BRACE_FORCE" value="3" />
+ <JavaCodeStyleSettings>
+ <option name="DO_NOT_WRAP_AFTER_SINGLE_ANNOTATION" value="true" />
+ <option name="CLASS_NAMES_IN_JAVADOC" value="3" />
+ </JavaCodeStyleSettings>
+ <MarkdownNavigatorCodeStyleSettings>
+ <option name="RIGHT_MARGIN" value="72" />
+ </MarkdownNavigatorCodeStyleSettings>
+ <XML>
+ <option name="XML_KEEP_BLANK_LINES" value="1" />
+ <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
+ </XML>
+ <ADDITIONAL_INDENT_OPTIONS fileType="haml">
+ <option name="INDENT_SIZE" value="2" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="java">
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="8" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="js">
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="sass">
+ <option name="INDENT_SIZE" value="2" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="yml">
+ <option name="INDENT_SIZE" value="2" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <codeStyleSettings language="ECMA Script Level 4">
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
+ <option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
+ <option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
+ <option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
+ <option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
+ <option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" />
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="EXTENDS_LIST_WRAP" value="1" />
+ <option name="EXTENDS_KEYWORD_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="ASSIGNMENT_WRAP" value="5" />
+ <option name="WRAP_COMMENTS" value="true" />
+ <option name="IF_BRACE_FORCE" value="3" />
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
+ <option name="WHILE_BRACE_FORCE" value="3" />
+ <option name="FOR_BRACE_FORCE" value="3" />
+ <option name="PARENT_SETTINGS_INSTALLED" value="true" />
+ </codeStyleSettings>
+ <codeStyleSettings language="JAVA">
+ <option name="RIGHT_MARGIN" value="100" />
+ <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="EXTENDS_LIST_WRAP" value="1" />
+ <option name="THROWS_LIST_WRAP" value="1" />
+ <option name="EXTENDS_KEYWORD_WRAP" value="1" />
+ <option name="THROWS_KEYWORD_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="ASSIGNMENT_WRAP" value="5" />
+ <option name="IF_BRACE_FORCE" value="3" />
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
+ <option name="WHILE_BRACE_FORCE" value="3" />
+ <option name="FOR_BRACE_FORCE" value="3" />
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="8" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="JavaScript">
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
+ <option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
+ <option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
+ <option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
+ <option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" />
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="ASSIGNMENT_WRAP" value="5" />
+ <option name="WRAP_COMMENTS" value="true" />
+ <option name="IF_BRACE_FORCE" value="3" />
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
+ <option name="WHILE_BRACE_FORCE" value="3" />
+ <option name="FOR_BRACE_FORCE" value="3" />
+ <option name="PARENT_SETTINGS_INSTALLED" value="true" />
+ </codeStyleSettings>
+ <codeStyleSettings language="PHP">
+ <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
+ <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
+ <option name="ALIGN_MULTILINE_ASSIGNMENT" value="true" />
+ <option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
+ <option name="ALIGN_MULTILINE_THROWS_LIST" value="true" />
+ <option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
+ <option name="ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION" value="true" />
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="EXTENDS_LIST_WRAP" value="1" />
+ <option name="THROWS_LIST_WRAP" value="1" />
+ <option name="EXTENDS_KEYWORD_WRAP" value="1" />
+ <option name="THROWS_KEYWORD_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="ASSIGNMENT_WRAP" value="5" />
+ <option name="WRAP_COMMENTS" value="true" />
+ <option name="IF_BRACE_FORCE" value="3" />
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
+ <option name="WHILE_BRACE_FORCE" value="3" />
+ <option name="FOR_BRACE_FORCE" value="3" />
+ <option name="PARENT_SETTINGS_INSTALLED" value="true" />
+ <indentOptions>
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </indentOptions>
+ </codeStyleSettings>
+</code_scheme>
diff --git a/geode-benchmarks/build.gradle b/geode-benchmarks/build.gradle
index 69c8352..04698b2 100644
--- a/geode-benchmarks/build.gradle
+++ b/geode-benchmarks/build.gradle
@@ -29,10 +29,10 @@ repositories {
}
dependencies {
- compile group: 'junit', name: 'junit', version: '4.12'
- compile group: 'org.apache.geode', name: 'geode-core', version: '1.7.0'
- compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
- compile project(":harness")
+ compile(group: 'junit', name: 'junit', version: '4.12')
+ compile(group: 'org.apache.geode', name: 'geode-core', version: '1.7.0')
+ compile(group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25')
+ compile(project(':harness'))
}
task benchmark(type: Test) {
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/configurations/BenchmarkParameters.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/configurations/BenchmarkParameters.java
index 9d4bd49..8e3e457 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/configurations/BenchmarkParameters.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/configurations/BenchmarkParameters.java
@@ -19,7 +19,7 @@ public class BenchmarkParameters {
/**
* All roles defined for the JVMs created for the benchmark
*/
- public class Roles{
+ public class Roles {
public static final String SERVER = "server";
public static final String CLIENT = "client";
public static final String LOCATOR = "locator";
@@ -28,7 +28,7 @@ public class BenchmarkParameters {
/**
* The port used to create the locator for the tests
*/
- public final static int LOCATOR_PORT = 10334;
+ public static final int LOCATOR_PORT = 10334;
/**
* Key range on which all the region operations are conducted on the default runner
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/data/PortfolioPdx.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/data/PortfolioPdx.java
index 57fd683..3a35864 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/data/PortfolioPdx.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/data/PortfolioPdx.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -193,7 +193,7 @@ public class PortfolioPdx implements Serializable, PdxSerializable {
@Override
public int hashCode() {
- return ((Long)this.ID).hashCode();
+ return ((Long) this.ID).hashCode();
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/GetTask.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/GetTask.java
index e4c5f44..090dca6 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/GetTask.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/GetTask.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -50,7 +50,7 @@ public class GetTask extends BenchmarkDriverAdapter implements Serializable {
@Override
public boolean test(Map<Object, Object> ctx) throws Exception {
- long key = ThreadLocalRandom.current().nextLong(0,this.keyRange);
+ long key = ThreadLocalRandom.current().nextLong(0, this.keyRange);
region.get(key);
return true;
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/LocatorUtil.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/LocatorUtil.java
index c353e8d..b089006 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/LocatorUtil.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/LocatorUtil.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PrePopulateRegion.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PrePopulateRegion.java
index 9933f97..c44120d 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PrePopulateRegion.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PrePopulateRegion.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -37,8 +37,8 @@ import org.apache.geode.perftest.jvms.RemoteJVMFactory;
public class PrePopulateRegion implements Task {
long keyRangeToPrepopulate = KEY_RANGE;
private static final Logger logger = LoggerFactory.getLogger(RemoteJVMFactory.class);
- public PrePopulateRegion() {
- }
+
+ public PrePopulateRegion() {}
public PrePopulateRegion(long keyRangeToPrepopulate) {
this.keyRangeToPrepopulate = keyRangeToPrepopulate;
@@ -47,25 +47,24 @@ public class PrePopulateRegion implements Task {
/**
* This method prepopulates the region
* before the actual benchmark starts.
- * @param context
*
*/
@Override
- public void run(TestContext context){
+ public void run(TestContext context) {
Cache serverCache = (Cache) context.getAttribute(SERVER_CACHE);
Region region = serverCache.getRegion("region");
logger.info("*******************************************");
logger.info(" Prepopulating the region ");
logger.info("*******************************************");
Instant start = Instant.now();
- LongStream.range(0,keyRangeToPrepopulate).forEach(i ->{
- long value = ThreadLocalRandom.current().nextLong(0,keyRangeToPrepopulate);
+ LongStream.range(0, keyRangeToPrepopulate).forEach(i -> {
+ long value = ThreadLocalRandom.current().nextLong(0, keyRangeToPrepopulate);
region.put(i, new PortfolioPdx(value));
});
Instant finish = Instant.now();
logger.info("*******************************************");
logger.info(" Prepopulating the region completed");
- logger.info(" Duration = "+ Duration.between(start,finish).toMillis()+"ms.");
+ logger.info(" Duration = " + Duration.between(start, finish).toMillis() + "ms.");
logger.info("*******************************************");
}
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PutTask.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PutTask.java
index 1f15283..348dc05 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PutTask.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PutTask.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -48,8 +48,8 @@ public class PutTask extends BenchmarkDriverAdapter implements Serializable {
@Override
public boolean test(Map<Object, Object> ctx) throws Exception {
- long key = ThreadLocalRandom.current().nextLong(0,this.keyRange);
- region.put(key,new PortfolioPdx(key));
+ long key = ThreadLocalRandom.current().nextLong(0, this.keyRange);
+ region.put(key, new PortfolioPdx(key));
return true;
}
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartClient.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartClient.java
index ef27e93..0c81405 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartClient.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartClient.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -47,7 +47,7 @@ public class StartClient implements Task {
ClientCache clientCache = new ClientCacheFactory()
.addPoolLocator(locator.getHostAddress(), locatorPort)
- .set(ConfigurationProperties.STATISTIC_SAMPLING_ENABLED,"true")
+ .set(ConfigurationProperties.STATISTIC_SAMPLING_ENABLED, "true")
.set(ConfigurationProperties.STATISTIC_ARCHIVE_FILE, statsFile)
.create();
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartLocator.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartLocator.java
index 077de8b..0c71801 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartLocator.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartLocator.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -41,12 +41,12 @@ public class StartLocator implements Task {
Properties properties = new Properties();
String statsFile = new File(context.getOutputDir(), "stats.gfs").getAbsolutePath();
- properties.setProperty(ConfigurationProperties.STATISTIC_SAMPLING_ENABLED,"true");
+ properties.setProperty(ConfigurationProperties.STATISTIC_SAMPLING_ENABLED, "true");
properties.setProperty(ConfigurationProperties.STATISTIC_ARCHIVE_FILE, statsFile);
properties.setProperty(ConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "false");
properties.setProperty(ConfigurationProperties.USE_CLUSTER_CONFIGURATION, "false");
- properties.setProperty(ConfigurationProperties.NAME,"locator-"+ InetAddress.getLocalHost());
+ properties.setProperty(ConfigurationProperties.NAME, "locator-" + InetAddress.getLocalHost());
Locator.startLocatorAndDS(locatorPort, null, properties);
}
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartServer.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartServer.java
index c1974d4..1e7cc68 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartServer.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/StartServer.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/BenchmarkOperation.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/BenchmarkOperation.java
index c76e736..ab03efa 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/BenchmarkOperation.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/BenchmarkOperation.java
@@ -49,6 +49,7 @@ public abstract class BenchmarkOperation {
* 1 - client
* Two abstract methods are also provided to be implemented to
* create the region as required by the benchmark.
+ *
* @param config test configurations
*/
void configure(TestConfig config) {
@@ -67,19 +68,21 @@ public abstract class BenchmarkOperation {
createRegion(config);
config.before(new StartClient(locatorPort), CLIENT);
config.before(new CreateClientProxyRegion(), CLIENT);
- config.before(new PrePopulateRegion(keyRange),SERVER);
+ config.before(new PrePopulateRegion(keyRange), SERVER);
benchmarkOperation(config);
}
/**
* The operation whose performance is to be measured
* by the benchmark.
+ *
* @param config test configurations
*/
protected abstract void benchmarkOperation(TestConfig config);
/**
* Create the region to be used in the benchmark.
+ *
* @param config test configurations.
*/
abstract void createRegion(TestConfig config);
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedGetBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedGetBenchmark.java
index 8b973ba..29aa0de 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedGetBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedGetBenchmark.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -25,10 +25,9 @@ import org.apache.geode.perftest.TestConfig;
/**
* Benchmark of gets on a partitioned region.
*/
-public class PartitionedGetBenchmark extends GetBenchmark{
+public class PartitionedGetBenchmark extends GetBenchmark {
- public PartitionedGetBenchmark() {
- }
+ public PartitionedGetBenchmark() {}
PartitionedGetBenchmark(long keyRange) {
this.keyRange = keyRange;
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmark.java
index 98492cd..fd32592 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmark.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -24,8 +24,7 @@ import org.apache.geode.perftest.TestConfig;
public class PartitionedPutBenchmark extends PutBenchmark {
- public PartitionedPutBenchmark() {
- }
+ public PartitionedPutBenchmark() {}
PartitionedPutBenchmark(long keyRange) {
this.keyRange = keyRange;
@@ -33,6 +32,6 @@ public class PartitionedPutBenchmark extends PutBenchmark {
@Override
void createRegion(TestConfig config) {
- config.before(new CreatePartitionedRegion(),SERVER);
+ config.before(new CreatePartitionedRegion(), SERVER);
}
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PutBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PutBenchmark.java
index 4c6db5e..9094e2f 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PutBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PutBenchmark.java
@@ -22,6 +22,6 @@ import org.apache.geode.perftest.TestConfig;
public abstract class PutBenchmark extends BenchmarkOperation {
@Override
protected void benchmarkOperation(TestConfig config) {
- config.workload(new PutTask(keyRange),CLIENT);
+ config.workload(new PutTask(keyRange), CLIENT);
}
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedGetBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedGetBenchmark.java
index 679c181..19811c4 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedGetBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedGetBenchmark.java
@@ -19,9 +19,8 @@ import static org.apache.geode.benchmark.configurations.BenchmarkParameters.Role
import org.apache.geode.benchmark.tasks.CreateReplicatedRegion;
import org.apache.geode.perftest.TestConfig;
-public class ReplicatedGetBenchmark extends GetBenchmark{
- public ReplicatedGetBenchmark() {
- }
+public class ReplicatedGetBenchmark extends GetBenchmark {
+ public ReplicatedGetBenchmark() {}
ReplicatedGetBenchmark(long keyRange) {
this.keyRange = keyRange;
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedPutBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedPutBenchmark.java
index b6ef95b..2012a38 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedPutBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedPutBenchmark.java
@@ -19,9 +19,8 @@ import static org.apache.geode.benchmark.configurations.BenchmarkParameters.Role
import org.apache.geode.benchmark.tasks.CreateReplicatedRegion;
import org.apache.geode.perftest.TestConfig;
-public class ReplicatedPutBenchmark extends PutBenchmark{
- public ReplicatedPutBenchmark() {
- }
+public class ReplicatedPutBenchmark extends PutBenchmark {
+ public ReplicatedPutBenchmark() {}
ReplicatedPutBenchmark(long keyRange) {
this.keyRange = keyRange;
@@ -29,6 +28,6 @@ public class ReplicatedPutBenchmark extends PutBenchmark{
@Override
void createRegion(TestConfig config) {
- config.before(new CreateReplicatedRegion(),SERVER);
+ config.before(new CreateReplicatedRegion(), SERVER);
}
}
diff --git a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmarkTest.java b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmarkTest.java
index 162d64e..02ca5bd 100644
--- a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmarkTest.java
+++ b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmarkTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -33,7 +33,6 @@ public class PartitionedPutBenchmarkTest {
@Test
public void benchmarkRunsSuccessfully() throws Exception {
TestRunners.minimalRunner(folder.newFolder())
- .runTest(new PartitionedPutBenchmark(KEY_RANGE_FOR_MINIMAL_RUNNER
- )::configure);
+ .runTest(new PartitionedPutBenchmark(KEY_RANGE_FOR_MINIMAL_RUNNER)::configure);
}
}
diff --git a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/ReplicatedGetBenchmarkTest.java b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/ReplicatedGetBenchmarkTest.java
index 53c66c9..23b7205 100644
--- a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/ReplicatedGetBenchmarkTest.java
+++ b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/ReplicatedGetBenchmarkTest.java
@@ -29,7 +29,6 @@ public class ReplicatedGetBenchmarkTest {
@Test
public void benchmarkRunsSuccessfully() throws Exception {
TestRunners.minimalRunner(folder.newFolder())
- .runTest(new ReplicatedGetBenchmark(KEY_RANGE_FOR_MINIMAL_RUNNER
- )::configure);
+ .runTest(new ReplicatedGetBenchmark(KEY_RANGE_FOR_MINIMAL_RUNNER)::configure);
}
}
diff --git a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/ReplicatedPutBenchmarkTest.java b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/ReplicatedPutBenchmarkTest.java
index b763f90..b8153a2 100644
--- a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/ReplicatedPutBenchmarkTest.java
+++ b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/ReplicatedPutBenchmarkTest.java
@@ -29,7 +29,6 @@ public class ReplicatedPutBenchmarkTest {
@Test
public void benchmarkRunsSuccessfully() throws Exception {
TestRunners.minimalRunner(folder.newFolder())
- .runTest(new ReplicatedPutBenchmark(KEY_RANGE_FOR_MINIMAL_RUNNER
- )::configure);
+ .runTest(new ReplicatedPutBenchmark(KEY_RANGE_FOR_MINIMAL_RUNNER)::configure);
}
}
diff --git a/gradle/rat.gradle b/gradle/rat.gradle
new file mode 100644
index 0000000..df0b54a
--- /dev/null
+++ b/gradle/rat.gradle
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+apply plugin: "org.nosphere.apache.rat"
+
+rat {
+ excludes = [
+ '.travis.yml',
+ '.git/**',
+ '**/output/**',
+ '**/output-*/**',
+ '**/build/**',
+ '**/out/**',
+ 'README.md',
+
+ // IDE
+ 'etc/eclipse-java-google-style.xml',
+ 'etc/intellij-java-modified-google-style.xml',
+ 'etc/eclipseOrganizeImports.importorder',
+ '**/.project',
+ '**/.classpath',
+ '**/.settings/**',
+ '**/build-eclipse/**',
+ '**/*.iml',
+ '**/*.ipr',
+ '**/*.iws',
+ '.idea/**',
+ '**/tags',
+ '**/out/**',
+
+ // gradle
+ '**/.gradle/**',
+ '.gradle/**',
+ 'gradlew*',
+ 'gradle/**',
+ 'gradle/wrapper/gradle-wrapper.properties',
+ 'caches/**',
+ 'daemon/**',
+ 'native/**',
+ 'wrapper/**',
+ '**/build/**',
+ '**/build-*/**',
+ '.buildinfo',
+
+ // text files
+ '**/*.fig',
+ '**/*.txt',
+ '**/*.md',
+ '**/*.json',
+ '**/*.tx0',
+ '**/*.txo',
+ '**/*.log',
+ '**/*.patch',
+ '**/*.diff',
+ '**/*.rej',
+ '**/*.orig',
+ '**/*.MF',
+
+ ]
+}
+
+subprojects {
+ check.dependsOn rat
+}
diff --git a/gradle/spotless.gradle b/gradle/spotless.gradle
new file mode 100644
index 0000000..f636e38
--- /dev/null
+++ b/gradle/spotless.gradle
@@ -0,0 +1,137 @@
+/*
+ * 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.
+ */
+
+subprojects {
+ apply plugin: "com.diffplug.gradle.spotless"
+ spotless {
+ lineEndings = 'unix'
+ java {
+ target project.fileTree(project.projectDir) {
+ include '**/*.java'
+ exclude '**/generated-src/**'
+ exclude '**/build/**'
+ }
+
+
+ // As the method name suggests, bump this number if any of the below "custom" rules change.
+ // Spotless will not run on unchanged files unless this number changes.
+ bumpThisNumberIfACustomStepChanges(0)
+
+ removeUnusedImports()
+
+ custom 'Remove commented-out import statements', {
+ it.replaceAll(/\n\/\/ import .*?;.*/, '')
+ }
+ custom 'Refuse wildcard imports', {
+ // Wildcard imports can't be resolved by spotless itself.
+ // This will require the developer themselves to adhere to best practices.
+ if (it =~ /\nimport .*\*;/) {
+ throw new AssertionError("Do not use wildcard imports. 'spotlessApply' cannot resolve this issue.")
+ }
+ }
+
+ importOrderFile "${rootProject.projectDir}/etc/eclipseOrganizeImports.importorder"
+
+ custom 'Remove unhelpful javadoc stubs', {
+ // e.g., remove the following lines:
+ // "* @param paramName"
+ // "* @throws ExceptionType"
+ // "* @return returnType"'
+ // Multiline to allow anchors on newlines
+ it.replaceAll(/(?m)^ *\* *@(?:param|throws|return) *\w* *\n/, '')
+ }
+ custom 'Remove any empty Javadocs and block comments', {
+ // Matches any /** [...] */ or /* [...] */ that contains:
+ // (a) only whitespace
+ // (b) trivial information, such as "@param paramName" or @throws ExceptionType
+ // without any additional information. This information is implicit in the signature.
+ it.replaceAll(/\/\*+\s*\n(\s*\*\s*\n)*\s*\*+\/\s*\n/, '')
+ }
+
+ // Enforce style modifier order
+ custom 'Modifier ordering', {
+ def modifierRanking = [
+ "public" : 1,
+ "protected" : 2,
+ "private" : 3,
+ "abstract" : 4,
+ "default" : 5,
+ "static" : 6,
+ "final" : 7,
+ "transient" : 8,
+ "volatile" : 9,
+ "synchronized": 10,
+ "native" : 11,
+ "strictfp" : 12]
+ // Find any instance of multiple modifiers. Lead with a non-word character to avoid
+ // accidental matching against for instance, "an alternative default value"
+ it.replaceAll(/\W(?:public |protected |private |abstract |default |static |final |transient |volatile |synchronized |native |strictfp ){2,}/, {
+ // Do not replace the leading non-word character. Identify the modifiers
+ it.replaceAll(/(?:public |protected |private |abstract |default |static |final |transient |volatile |synchronized |native |strictfp ){2,}/, {
+ // Sort the modifiers according to the ranking above
+ it.split().sort({ modifierRanking[it] }).join(' ') + ' '
+ }
+ )
+ }
+ )
+ }
+
+
+ // Notes on eclipse formatter version:
+ // 4.6.3 is consistent with existing / previous behavior.
+ // 4.7.1 works, but had different default whitespace rules, notably with mid-ternary linebreak.
+ // 4.7.2 exists but is currently incompatible with our style file, raising NPEs.
+
+ eclipse('4.6.3').configFile "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
+ trimTrailingWhitespace()
+ endWithNewline()
+ }
+ groovyGradle {
+ target project.fileTree(project.projectDir) {
+ include '**/*.gradle'
+ exclude '**/generated-src/**'
+ exclude '**/build/**'
+ }
+
+ // As the method name suggests, bump this number if any of the below "custom" rules change.
+ // Spotless will not run on unchanged files unless this number changes.
+ bumpThisNumberIfACustomStepChanges(0)
+
+ custom 'Use single-quote in project directives.', {
+ it.replaceAll(/project\(":([^"]*)"\)/, 'project(\':$1\')')
+ }
+
+ custom 'Use parenthesis in single-line gradle dependency declarations.', {
+ it.replaceAll(/\n(\s*\S*(?:[cC]ompile|[rR]untime)(?:Only)?) (?!\()([^{\n]*)\n/, { original, declaration, dep ->
+ "\n${declaration}(${dep})\n"
+ })
+ }
+
+ custom 'Do not pad spaces before parenthesis in gradle dependency declaration.', {
+ it.replaceAll(/\n(\s*\S*(?:[cC]ompile|[rR]untime)(?:Only)?) +\(/, '\n$1(')
+ }
+
+ indentWithSpaces(2)
+ }
+ }
+
+ // If we add more languages to Spotless, add them to 'compileXYZ' trigger below
+ afterEvaluate {
+ project.tasks['compileJava'].mustRunAfter(spotlessCheck)
+ project.tasks['compileJava'].mustRunAfter(spotlessApply)
+ }
+}
\ No newline at end of file
diff --git a/harness/build.gradle b/harness/build.gradle
index 90d7793..b435237 100644
--- a/harness/build.gradle
+++ b/harness/build.gradle
@@ -34,14 +34,14 @@ task(analyzeRun, dependsOn: 'classes', type: JavaExec) {
}
dependencies {
- testCompile group: 'junit', name: 'junit', version: '4.12'
- compile group: 'com.hierynomus', name: 'sshj', version: '0.26.0'
- compile group: 'commons-io', name: 'commons-io', version: '2.6'
- compile group: 'org.yardstickframework', name: 'yardstick', version: '0.8.3'
- compile group: 'org.hdrhistogram', name: 'HdrHistogram', version: '2.1.10'
- testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
- testCompile group: 'org.awaitility', name: 'awaitility', version: '3.0.0'
- testCompile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
- testCompile group: 'org.apache.sshd', name: 'sshd-core', version: '2.1.0'
- testCompile group: 'org.assertj', name: 'assertj-core', version: '3.11.1'
+ testCompile(group: 'junit', name: 'junit', version: '4.12')
+ compile(group: 'com.hierynomus', name: 'sshj', version: '0.26.0')
+ compile(group: 'commons-io', name: 'commons-io', version: '2.6')
+ compile(group: 'org.yardstickframework', name: 'yardstick', version: '0.8.3')
+ compile(group: 'org.hdrhistogram', name: 'HdrHistogram', version: '2.1.10')
+ testCompile(group: 'org.mockito', name: 'mockito-all', version: '1.10.19')
+ testCompile(group: 'org.awaitility', name: 'awaitility', version: '3.0.0')
+ testCompile(group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25')
+ testCompile(group: 'org.apache.sshd', name: 'sshd-core', version: '2.1.0')
+ testCompile(group: 'org.assertj', name: 'assertj-core', version: '3.11.1')
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/PerformanceTest.java b/harness/src/main/java/org/apache/geode/perftest/PerformanceTest.java
index b2ff9e5..aa49728 100644
--- a/harness/src/main/java/org/apache/geode/perftest/PerformanceTest.java
+++ b/harness/src/main/java/org/apache/geode/perftest/PerformanceTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -28,9 +28,9 @@ import org.yardstickframework.BenchmarkDriver;
*
* There are three phases to the test:
* <ul>
- * <li> Before Tasks - executed sequentially before the test</li>
- * <li> Workload Tasks - executed in parallel repeatedly during the workload phase </li>
- * <li> After Tasks - executed sequentially after the test</li>
+ * <li>Before Tasks - executed sequentially before the test</li>
+ * <li>Workload Tasks - executed in parallel repeatedly during the workload phase</li>
+ * <li>After Tasks - executed sequentially after the test</li>
* </ul>
*
* Each of these phases can be assigned to *roles*.
@@ -39,13 +39,13 @@ import org.yardstickframework.BenchmarkDriver;
*
* Define the roles by calling {@link TestConfig#role(String, int)}
* Define one or more tasks by calling {@link TestConfig#before(Task, String...)},
- * {@link TestConfig#after(Task, String...)} or {@link TestConfig#workload(BenchmarkDriver, String...)}
+ * {@link TestConfig#after(Task, String...)} or
+ * {@link TestConfig#workload(BenchmarkDriver, String...)}
*/
public interface PerformanceTest extends Serializable {
/**
* Return the configuration for the test.
- * @param test
*/
void configure(TestConfig test);
diff --git a/harness/src/main/java/org/apache/geode/perftest/Task.java b/harness/src/main/java/org/apache/geode/perftest/Task.java
index fb1110d..a764ae5 100644
--- a/harness/src/main/java/org/apache/geode/perftest/Task.java
+++ b/harness/src/main/java/org/apache/geode/perftest/Task.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/harness/src/main/java/org/apache/geode/perftest/TestConfig.java b/harness/src/main/java/org/apache/geode/perftest/TestConfig.java
index 4386c77..f85913c 100644
--- a/harness/src/main/java/org/apache/geode/perftest/TestConfig.java
+++ b/harness/src/main/java/org/apache/geode/perftest/TestConfig.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -47,6 +47,7 @@ public class TestConfig implements Serializable {
/**
* Define a role for the test.
+ *
* @param role The name of the role
* @param numberOfJVMs The number of JVMs that should be launched that have this role.
*/
@@ -58,30 +59,30 @@ public class TestConfig implements Serializable {
/**
* Add a before task to the test. Each before task is run in parallel on
* all of the nodes that have the given role
+ *
* @param task The task to execute
* @param roles The roles to execute the task on
*/
- public void before(Task task, String ... roles) {
+ public void before(Task task, String... roles) {
before.add(new TestStep(task, roles));
}
/**
* Add an after task to the test. After tasks are run in parallel on all
* nodes that have the given roles
- * @param task
- * @param roles
*/
- public void after(Task task, String ... roles) {
+ public void after(Task task, String... roles) {
after.add(new TestStep(task, roles));
}
/**
* Add a workload task to the test. Workload tasks are run repeatedly
* during the workload phase, and the time to run the workload is measured.
+ *
* @param benchmark The workload to run
* @param roles The roles to run the workload on
*/
- public void workload(BenchmarkDriver benchmark, String ... roles) {
+ public void workload(BenchmarkDriver benchmark, String... roles) {
workload.add(new TestStep(new YardstickTask(benchmark, workloadConfig), roles));
}
@@ -90,6 +91,7 @@ public class TestConfig implements Serializable {
* Set the duration of the workload phase. This is the amount of time that
* the workload tasks are actually measured. The total runtime of the test
* is the {@link #durationSeconds(long)} + {@link #warmupSeconds(long)}
+ *
* @param durationSeconds The time in seconds for the duration phase
*/
public void durationSeconds(long durationSeconds) {
@@ -98,7 +100,7 @@ public class TestConfig implements Serializable {
/**
* Set the number of threads to run in each JVM for the workload test. Default
- * is twice the number of available processors.
+ * is twice the number of available processors.
*/
public void threads(int threads) {
workloadConfig.threads(threads);
@@ -107,6 +109,7 @@ public class TestConfig implements Serializable {
/**
* Set the duration of the warmup phase. Workload tasks are run for this amount
* of time as a warmup, but the measurements from the tasks are discarded.
+ *
* @param warmupSeconds The time in seconds for the warmup phase
*/
public void warmupSeconds(long warmupSeconds) {
@@ -151,7 +154,6 @@ public class TestConfig implements Serializable {
/**
* Return the total number of JVMs required to run this test
- * @return
*/
public int getTotalJVMs() {
return roles.values().stream().mapToInt(Integer::intValue).sum();
@@ -163,7 +165,7 @@ public class TestConfig implements Serializable {
* If multiple calls to this method are made for the same role, the new JVM arguments
* are appended to the existing JVM args
*/
- public void jvmArgs(String role, String ... jvmArgs) {
+ public void jvmArgs(String role, String... jvmArgs) {
List<String> roleArgs = this.jvmArgs.computeIfAbsent(role, key -> new ArrayList<>());
roleArgs.addAll(Arrays.asList(jvmArgs));
}
@@ -177,7 +179,7 @@ public class TestConfig implements Serializable {
private final String[] roles;
public TestStep(Task task, String[] roles) {
- if(roles == null || roles.length == 0) {
+ if (roles == null || roles.length == 0) {
throw new IllegalStateException("Task " + task + " must be assigned to at least one role");
}
this.task = task;
diff --git a/harness/src/main/java/org/apache/geode/perftest/TestContext.java b/harness/src/main/java/org/apache/geode/perftest/TestContext.java
index c9b1b41..f64e616 100644
--- a/harness/src/main/java/org/apache/geode/perftest/TestContext.java
+++ b/harness/src/main/java/org/apache/geode/perftest/TestContext.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -20,9 +20,7 @@ package org.apache.geode.perftest;
import java.io.File;
import java.io.Serializable;
import java.net.InetAddress;
-import java.util.Map;
import java.util.Set;
-import java.util.TreeMap;
public interface TestContext extends Serializable {
Set<InetAddress> getHostsForRole(String role);
@@ -31,11 +29,14 @@ public interface TestContext extends Serializable {
/**
* Returns the JVM ID
+ *
* @return JVM ID
*/
int getJvmID();
+
/**
* Sets the value of the attribute
+ *
* @param attribute attribute name
* @param value attribute value
*/
diff --git a/harness/src/main/java/org/apache/geode/perftest/TestRunner.java b/harness/src/main/java/org/apache/geode/perftest/TestRunner.java
index 1439cf0..b098f54 100644
--- a/harness/src/main/java/org/apache/geode/perftest/TestRunner.java
+++ b/harness/src/main/java/org/apache/geode/perftest/TestRunner.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/harness/src/main/java/org/apache/geode/perftest/TestRunners.java b/harness/src/main/java/org/apache/geode/perftest/TestRunners.java
index 685aafb..3815d11 100644
--- a/harness/src/main/java/org/apache/geode/perftest/TestRunners.java
+++ b/harness/src/main/java/org/apache/geode/perftest/TestRunners.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -28,7 +28,8 @@ import org.apache.geode.perftest.runner.DefaultTestRunner;
* Static factory methods for implementations of {@link TestRunner}
*
* This the main entry point for running performance tests. Users of this
- * class should create a {@link PerformanceTest} and pass it to the {@link TestRunner#runTest(PerformanceTest)}
+ * class should create a {@link PerformanceTest} and pass it to the
+ * {@link TestRunner#runTest(PerformanceTest)}
* method of the test runner. For example
* <code>
* TestRunners.default().runTest(new YourPerformanceTest());
@@ -41,10 +42,12 @@ public class TestRunners {
public static final String OUTPUT_DIR = "OUTPUT_DIR";
- public static TestRunner defaultRunner(String username, File outputDir, String ... hosts) {
- return new DefaultTestRunner(new RemoteJVMFactory(new SshInfrastructureFactory(username, hosts)),
+ public static TestRunner defaultRunner(String username, File outputDir, String... hosts) {
+ return new DefaultTestRunner(
+ new RemoteJVMFactory(new SshInfrastructureFactory(username, hosts)),
outputDir);
}
+
/**
* The default runner, which gets a list of hosts to run on from the
* TEST_HOSTS system property.
@@ -58,8 +61,9 @@ public class TestRunners {
}
static TestRunner defaultRunner(String testHosts, File outputDir) {
- if(testHosts == null) {
- throw new IllegalStateException("You must set the TEST_HOSTS system property to a comma separated list of hosts to run the benchmarks on.");
+ if (testHosts == null) {
+ throw new IllegalStateException(
+ "You must set the TEST_HOSTS system property to a comma separated list of hosts to run the benchmarks on.");
}
String userName = System.getProperty("user.name");
@@ -69,10 +73,10 @@ public class TestRunners {
/**
* A test runner that runs the test with the minimal tuning - only
* 1 second duration on local infrastructure.
- * @param outputDir
*/
public static TestRunner minimalRunner(final File outputDir) {
- return new DefaultTestRunner(new RemoteJVMFactory(new LocalInfrastructureFactory()), outputDir) {
+ return new DefaultTestRunner(new RemoteJVMFactory(new LocalInfrastructureFactory()),
+ outputDir) {
@Override
public void runTest(TestConfig config) throws Exception {
config.warmupSeconds(0);
diff --git a/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java b/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java
index 33a929b..0c86347 100644
--- a/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java
+++ b/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -34,8 +34,7 @@ public class WorkloadConfig implements Serializable {
long warmupSeconds = 0;
int threads = Runtime.getRuntime().availableProcessors() * 2;
- public WorkloadConfig() {
- }
+ public WorkloadConfig() {}
public void durationSeconds(long durationSeconds) {
this.durationSeconds = durationSeconds;
@@ -60,4 +59,4 @@ public class WorkloadConfig implements Serializable {
public int getThreads() {
return threads;
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/main/java/org/apache/geode/perftest/analysis/Analyzer.java b/harness/src/main/java/org/apache/geode/perftest/analysis/Analyzer.java
index 49272a3..aa2c47a 100644
--- a/harness/src/main/java/org/apache/geode/perftest/analysis/Analyzer.java
+++ b/harness/src/main/java/org/apache/geode/perftest/analysis/Analyzer.java
@@ -26,7 +26,8 @@ public class Analyzer {
public static void main(String[] args) throws IOException {
if (args.length != 2) {
- System.out.println("Analyzer takes two test output directories as arguments, test results followed by baseline run result.");
+ System.out.println(
+ "Analyzer takes two test output directories as arguments, test results followed by baseline run result.");
System.exit(1);
return;
}
@@ -52,13 +53,15 @@ public class Analyzer {
}
System.out.println("Running analyzer");
- System.out.println("Comparing test result at " + testResultArg + " to baseline at " + baselineResultArg);
+ System.out.println(
+ "Comparing test result at " + testResultArg + " to baseline at " + baselineResultArg);
BenchmarkRunAnalyzer analyzer = new BenchmarkRunAnalyzer();
analyzer.addProbe(new YardstickThroughputSensorParser());
analyzer.addProbe(new YardstickPercentileSensorParser());
analyzer.addProbe(new YardstickHdrHistogramParser());
- analyzer.analyzeTestRun(testResultDir, baselineResultDir).writeResult(new PrintWriter(System.out));
+ analyzer.analyzeTestRun(testResultDir, baselineResultDir)
+ .writeResult(new PrintWriter(System.out));
}
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/analysis/BenchmarkRunAnalyzer.java b/harness/src/main/java/org/apache/geode/perftest/analysis/BenchmarkRunAnalyzer.java
index 3f5952e..764f622 100644
--- a/harness/src/main/java/org/apache/geode/perftest/analysis/BenchmarkRunAnalyzer.java
+++ b/harness/src/main/java/org/apache/geode/perftest/analysis/BenchmarkRunAnalyzer.java
@@ -30,6 +30,7 @@ import org.apache.geode.perftest.yardstick.YardstickTask;
* a comparison of the results to a provided writer.
*
* This currently handles data in the format
+ *
* <pre>
* Result1
* /BenchmarkA
@@ -68,7 +69,8 @@ public class BenchmarkRunAnalyzer {
File baselineDir = new File(baselineResultDir, testDir.getName());
final List<File> baselineYardstickDirs = getYardstickOutputForBenchmarkDir(baselineDir);
- final BenchmarkRunResult.BenchmarkResult benchmarkResult = result.addBenchmark(testDir.getName());
+ final BenchmarkRunResult.BenchmarkResult benchmarkResult =
+ result.addBenchmark(testDir.getName());
for (ProbeResultParser probe : probes) {
double testResult = getTestResult(testYardstickDirs, probe);
double baselineResult = getTestResult(baselineYardstickDirs, probe);
diff --git a/harness/src/main/java/org/apache/geode/perftest/analysis/ProbeResultParser.java b/harness/src/main/java/org/apache/geode/perftest/analysis/ProbeResultParser.java
index bcc76d4..1e94329 100644
--- a/harness/src/main/java/org/apache/geode/perftest/analysis/ProbeResultParser.java
+++ b/harness/src/main/java/org/apache/geode/perftest/analysis/ProbeResultParser.java
@@ -18,7 +18,7 @@ import java.io.File;
import java.io.IOException;
public interface ProbeResultParser {
- // Given a output directory for a benchmark, parse out the data for the desired probe. Note that
+ // Given a output directory for a benchmark, parse out the data for the desired probe. Note that
// this method may be passed several csv files for a run and is expected to appropriately
// aggregate the result of interest.
void parseResults(File benchmarkOutputDir) throws IOException;
diff --git a/harness/src/main/java/org/apache/geode/perftest/infrastructure/Infrastructure.java b/harness/src/main/java/org/apache/geode/perftest/infrastructure/Infrastructure.java
index cb66845..6e93956 100644
--- a/harness/src/main/java/org/apache/geode/perftest/infrastructure/Infrastructure.java
+++ b/harness/src/main/java/org/apache/geode/perftest/infrastructure/Infrastructure.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -48,7 +48,7 @@ public interface Infrastructure extends AutoCloseable {
* @param files A list of files on the local system to copy
* @param destDir The directory on the remote machine to copy to
* @param removeExisting If true, remove all existing files in the directory on the remote
- * machine
+ * machine
*/
void copyToNodes(Iterable<File> files, String destDir, boolean removeExisting) throws IOException;
diff --git a/harness/src/main/java/org/apache/geode/perftest/infrastructure/InfrastructureFactory.java b/harness/src/main/java/org/apache/geode/perftest/infrastructure/InfrastructureFactory.java
index 95db805..f1b6740 100644
--- a/harness/src/main/java/org/apache/geode/perftest/infrastructure/InfrastructureFactory.java
+++ b/harness/src/main/java/org/apache/geode/perftest/infrastructure/InfrastructureFactory.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/harness/src/main/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructure.java b/harness/src/main/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructure.java
index 5b90fa4..7f5ff28 100644
--- a/harness/src/main/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructure.java
+++ b/harness/src/main/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructure.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -24,7 +24,6 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashSet;
@@ -45,7 +44,7 @@ public class LocalInfrastructure implements Infrastructure {
private final List<Process> processList = new ArrayList<Process>();
public LocalInfrastructure(int numNodes) throws IOException {
- for(int i =0; i < numNodes; i++) {
+ for (int i = 0; i < numNodes; i++) {
Path workingDir = Files.createTempDirectory("workerProcess");
nodes.add(new LocalNode(workingDir.toFile()));
}
@@ -62,9 +61,10 @@ public class LocalInfrastructure implements Infrastructure {
ProcessBuilder builder = new ProcessBuilder();
builder.command(shellCommand);
builder.inheritIO();
- builder.directory(((LocalNode)node).getWorkingDir());
+ builder.directory(((LocalNode) node).getWorkingDir());
- System.out.println(String.format("Lauching %s>%s", ((LocalNode) node).getWorkingDir(), String.join(" ", shellCommand)));
+ System.out.println(String.format("Lauching %s>%s", ((LocalNode) node).getWorkingDir(),
+ String.join(" ", shellCommand)));
Process process = builder.start();
processList.add(process);
@@ -74,23 +74,24 @@ public class LocalInfrastructure implements Infrastructure {
@Override
public void close() throws InterruptedException, IOException {
- for(Process process : processList) {
+ for (Process process : processList) {
process.destroyForcibly();
process.waitFor();
}
- for(LocalNode node : nodes) {
+ for (LocalNode node : nodes) {
FileUtils.deleteDirectory(node.getWorkingDir());
}
}
@Override
- public void copyToNodes(Iterable<File> files, String destDirName, boolean removeExisting) throws IOException {
- for(LocalNode node : nodes) {
+ public void copyToNodes(Iterable<File> files, String destDirName, boolean removeExisting)
+ throws IOException {
+ for (LocalNode node : nodes) {
Path destDir = new File(node.getWorkingDir(), destDirName).toPath();
destDir.toFile().mkdirs();
- for(File file : files) {
+ for (File file : files) {
Files.copy(file.toPath(), destDir.resolve(file.getName()));
}
}
@@ -100,7 +101,7 @@ public class LocalInfrastructure implements Infrastructure {
public void copyFromNode(Node node, String directory, File destDir) throws IOException {
File nodeDir = new File(((LocalNode) node).workingDir, directory);
- if(!nodeDir.exists()) {
+ if (!nodeDir.exists()) {
return;
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructureFactory.java b/harness/src/main/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructureFactory.java
index 8eed945..fd12d0f 100644
--- a/harness/src/main/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructureFactory.java
+++ b/harness/src/main/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructureFactory.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -17,8 +17,8 @@
package org.apache.geode.perftest.infrastructure.local;
-import org.apache.geode.perftest.infrastructure.InfrastructureFactory;
import org.apache.geode.perftest.infrastructure.Infrastructure;
+import org.apache.geode.perftest.infrastructure.InfrastructureFactory;
/**
* {@link InfrastructureFactory} That uses local processes on the local machine
diff --git a/harness/src/main/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructure.java b/harness/src/main/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructure.java
index bff36b1..4da8ba5 100644
--- a/harness/src/main/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructure.java
+++ b/harness/src/main/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructure.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -51,7 +51,7 @@ public class SshInfrastructure implements Infrastructure {
private final String user;
private final int port;
public static final Config CONFIG = new DefaultConfig();
-
+
public SshInfrastructure(Collection<String> hosts, String user) {
this(hosts, user, 22);
}
@@ -107,30 +107,32 @@ public class SshInfrastructure implements Infrastructure {
}
@Override
- public void copyToNodes(Iterable<File> files, String destDir, boolean removeExisting) throws IOException {
- Set<InetAddress> uniqueNodes = getNodes().stream().map(Node::getAddress).collect(Collectors.toSet());
+ public void copyToNodes(Iterable<File> files, String destDir, boolean removeExisting)
+ throws IOException {
+ Set<InetAddress> uniqueNodes =
+ getNodes().stream().map(Node::getAddress).collect(Collectors.toSet());
List<CompletableFuture<Void>> futures = new ArrayList<>();
- for(InetAddress address: uniqueNodes) {
+ for (InetAddress address : uniqueNodes) {
futures.add(CompletableFuture.runAsync(() -> {
try (SSHClient client = getSSHClient(address)) {
- client.useCompression();
-
- if(removeExisting) {
- try (Session session = client.startSession()) {
- session.exec(String.format("rm -rf '%s'", destDir)).join();
- }
- }
+ client.useCompression();
+ if (removeExisting) {
try (Session session = client.startSession()) {
- session.exec(String.format("mkdir -p '%s'", destDir)).join();
+ session.exec(String.format("rm -rf '%s'", destDir)).join();
}
+ }
- for (File file : files) {
- logger.info("Copying " + file + " to " + address);
- client.newSCPFileTransfer().upload(new FileSystemFile(file), destDir);
- }
- } catch(IOException e) {
+ try (Session session = client.startSession()) {
+ session.exec(String.format("mkdir -p '%s'", destDir)).join();
+ }
+
+ for (File file : files) {
+ logger.info("Copying " + file + " to " + address);
+ client.newSCPFileTransfer().upload(new FileSystemFile(file), destDir);
+ }
+ } catch (IOException e) {
throw new UncheckedIOException(e);
}
}));
@@ -141,11 +143,11 @@ public class SshInfrastructure implements Infrastructure {
@Override
public void copyFromNode(Node node, String directory, File destDir) throws IOException {
try (SSHClient client = getSSHClient(node.getAddress())) {
- client.useCompression();
+ client.useCompression();
- destDir.mkdirs();
- client.newSCPFileTransfer().download(directory, destDir.getPath());
- return;
+ destDir.mkdirs();
+ client.newSCPFileTransfer().download(directory, destDir.getPath());
+ return;
}
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructureFactory.java b/harness/src/main/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructureFactory.java
index b11d8c7..00ed0c5 100644
--- a/harness/src/main/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructureFactory.java
+++ b/harness/src/main/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructureFactory.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -20,15 +20,15 @@ package org.apache.geode.perftest.infrastructure.ssh;
import java.util.Arrays;
import java.util.Collection;
-import org.apache.geode.perftest.infrastructure.InfrastructureFactory;
import org.apache.geode.perftest.infrastructure.Infrastructure;
+import org.apache.geode.perftest.infrastructure.InfrastructureFactory;
public class SshInfrastructureFactory implements InfrastructureFactory {
private final Collection<String> hosts;
private final String user;
- public SshInfrastructureFactory(String user, String ... hosts) {
+ public SshInfrastructureFactory(String user, String... hosts) {
this.hosts = Arrays.asList(hosts);
this.user = user;
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/jdk/RMI.java b/harness/src/main/java/org/apache/geode/perftest/jdk/RMI.java
index 66be62d..068fa03 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jdk/RMI.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jdk/RMI.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -43,8 +43,6 @@ public class RMI {
/**
* Wrapper around {@link LocateRegistry#createRegistry(int)}
- * @param rmiPort
- * @return
*/
public Registry createRegistry(int rmiPort) throws RemoteException {
return LocateRegistry.createRegistry(rmiPort);
diff --git a/harness/src/main/java/org/apache/geode/perftest/jdk/SystemInterface.java b/harness/src/main/java/org/apache/geode/perftest/jdk/SystemInterface.java
index 7d25070..9705100 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jdk/SystemInterface.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jdk/SystemInterface.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/JVMLauncher.java b/harness/src/main/java/org/apache/geode/perftest/jvms/JVMLauncher.java
index bc09436..106aa30 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/JVMLauncher.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/JVMLauncher.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -32,11 +32,10 @@ import org.apache.geode.perftest.jvms.rmi.ChildJVM;
class JVMLauncher {
private static final Logger logger = LoggerFactory.getLogger(RemoteJVMFactory.class);
- JVMLauncher() {
- }
+ JVMLauncher() {}
CompletableFuture<Void> launchProcesses(Infrastructure infra, int rmiPort,
- List<JVMMapping> mapping, String libDir)
+ List<JVMMapping> mapping, String libDir)
throws UnknownHostException {
List<CompletableFuture<Void>> futures = new ArrayList<CompletableFuture<Void>>();
for (JVMMapping entry : mapping) {
@@ -46,9 +45,11 @@ class JVMLauncher {
return CompletableFuture.allOf(futures.toArray(new CompletableFuture[0]));
}
- CompletableFuture<Void> launchWorker(Infrastructure infra, int rmiPort, String libDir, JVMMapping jvmConfig)
+ CompletableFuture<Void> launchWorker(Infrastructure infra, int rmiPort, String libDir,
+ JVMMapping jvmConfig)
throws UnknownHostException {
- String[] shellCommand = buildCommand(InetAddress.getLocalHost().getHostAddress(), rmiPort, libDir, jvmConfig);
+ String[] shellCommand =
+ buildCommand(InetAddress.getLocalHost().getHostAddress(), rmiPort, libDir, jvmConfig);
CompletableFuture<Void> future = new CompletableFuture<Void>();
Thread thread = new Thread("Worker " + jvmConfig.getNode().getAddress()) {
@@ -60,7 +61,8 @@ class JVMLauncher {
logger.error("ChildJVM exited with error code " + result);
}
} catch (Throwable t) {
- logger.error("Launching " + String.join(" ", shellCommand) + " on " + jvmConfig.getNode() + "Failed.", t);
+ logger.error("Launching " + String.join(" ", shellCommand) + " on " + jvmConfig.getNode()
+ + "Failed.", t);
} finally {
future.complete(null);
}
@@ -86,4 +88,4 @@ class JVMLauncher {
return command.toArray(new String[0]);
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/JVMMapping.java b/harness/src/main/java/org/apache/geode/perftest/jvms/JVMMapping.java
index 43ade44..0b958fc 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/JVMMapping.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/JVMMapping.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -29,7 +29,7 @@ public class JVMMapping implements Serializable {
private final List<String> jvmArgs;
public JVMMapping(Infrastructure.Node node, String role, int id,
- List<String> jvmArgs) {
+ List<String> jvmArgs) {
this.node = node;
this.role = role;
this.id = id;
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/RemoteJVMFactory.java b/harness/src/main/java/org/apache/geode/perftest/jvms/RemoteJVMFactory.java
index 63eb5ad..1ca4e81 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/RemoteJVMFactory.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/RemoteJVMFactory.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -58,48 +58,52 @@ public class RemoteJVMFactory {
private final InfrastructureFactory infrastructureFactory;
public RemoteJVMFactory(InfrastructureFactory infrastructureFactory,
- JVMLauncher jvmLauncher,
- ClassPathCopier classPathCopier,
- ControllerFactory controllerFactory) {
+ JVMLauncher jvmLauncher,
+ ClassPathCopier classPathCopier,
+ ControllerFactory controllerFactory) {
this.infrastructureFactory = infrastructureFactory;
this.jvmLauncher = jvmLauncher;
this.classPathCopier = classPathCopier;
this.controllerFactory = controllerFactory;
}
+
public RemoteJVMFactory(InfrastructureFactory infrastructureFactory) {
- this(infrastructureFactory, new JVMLauncher(), new ClassPathCopier(CLASSPATH, JAVA_HOME), new ControllerFactory());
+ this(infrastructureFactory, new JVMLauncher(), new ClassPathCopier(CLASSPATH, JAVA_HOME),
+ new ControllerFactory());
}
/**
* Start all requested JVMs on the infrastructure
+ *
* @param roles The JVMs to start. Keys a roles and values are the number
- * of JVMs in that role.
+ * of JVMs in that role.
*
- * @param jvmArgs
* @return a {@link RemoteJVMs} object used to access the JVMs through RMI
*/
public RemoteJVMs launch(Map<String, Integer> roles,
- Map<String, List<String>> jvmArgs) throws Exception {
+ Map<String, List<String>> jvmArgs) throws Exception {
int numWorkers = roles.values().stream().mapToInt(Integer::intValue).sum();
Infrastructure infra = infrastructureFactory.create(numWorkers);
Set<Infrastructure.Node> nodes = infra.getNodes();
- if(nodes.size() < numWorkers) {
- throw new IllegalStateException("Too few nodes for test. Need " + numWorkers + ", have " + nodes.size());
+ if (nodes.size() < numWorkers) {
+ throw new IllegalStateException(
+ "Too few nodes for test. Need " + numWorkers + ", have " + nodes.size());
}
List<JVMMapping> mapping = mapRolesToNodes(roles, nodes, jvmArgs);
- Controller controller = controllerFactory.createController(new SharedContext(mapping), numWorkers);
+ Controller controller =
+ controllerFactory.createController(new SharedContext(mapping), numWorkers);
classPathCopier.copyToNodes(infra, LIB_DIR);
CompletableFuture<Void> processesExited = jvmLauncher.launchProcesses(infra, RMI_PORT, mapping,
LIB_DIR);
- if(!controller.waitForWorkers(5, TimeUnit.MINUTES)) {
+ if (!controller.waitForWorkers(5, TimeUnit.MINUTES)) {
throw new IllegalStateException("Workers failed to start in 1 minute");
}
@@ -111,14 +115,14 @@ public class RemoteJVMFactory {
}
private List<JVMMapping> mapRolesToNodes(Map<String, Integer> roles,
- Set<Infrastructure.Node> nodes,
- Map<String, List<String>> jvmArgs) {
+ Set<Infrastructure.Node> nodes,
+ Map<String, List<String>> jvmArgs) {
List<JVMMapping> mapping = new ArrayList<>();
Iterator<Infrastructure.Node> nodeItr = nodes.iterator();
int id = 0;
- for(Map.Entry<String, Integer> roleEntry : roles.entrySet()) {
- for(int i = 0; i < roleEntry.getValue(); i++) {
+ for (Map.Entry<String, Integer> roleEntry : roles.entrySet()) {
+ for (int i = 0; i < roleEntry.getValue(); i++) {
Infrastructure.Node node = nodeItr.next();
String role = roleEntry.getKey();
List<String> roleArgs = jvmArgs.getOrDefault(role, Collections.emptyList());
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/RemoteJVMs.java b/harness/src/main/java/org/apache/geode/perftest/jvms/RemoteJVMs.java
index 368cc89..317cae3 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/RemoteJVMs.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/RemoteJVMs.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -27,11 +27,8 @@ import java.util.concurrent.ExecutionException;
import java.util.stream.Stream;
import org.apache.geode.perftest.Task;
-
-import org.apache.geode.perftest.TestContext;
import org.apache.geode.perftest.infrastructure.Infrastructure;
import org.apache.geode.perftest.jvms.rmi.Controller;
-import org.apache.geode.perftest.runner.DefaultTestContext;
/**
* Interface for accessing remote JVMs are running tasks on them.
@@ -44,8 +41,8 @@ public class RemoteJVMs implements AutoCloseable {
public RemoteJVMs(Infrastructure infra,
- List<JVMMapping> mapping, Controller controller,
- CompletableFuture<Void> exited) {
+ List<JVMMapping> mapping, Controller controller,
+ CompletableFuture<Void> exited) {
this.infra = infra;
this.jvmMappings = mapping;
this.controller = controller;
@@ -55,7 +52,7 @@ public class RemoteJVMs implements AutoCloseable {
/**
* Run a task in parallel on all JVMs with the given roles.
*/
- public void execute(Task task, String ... roleArray) {
+ public void execute(Task task, String... roleArray) {
HashSet<String> roles = new HashSet<>(Arrays.asList(roleArray));
@@ -78,7 +75,8 @@ public class RemoteJVMs implements AutoCloseable {
public void copyResults(File benchmarkOutput) throws IOException {
benchmarkOutput.mkdirs();
for (JVMMapping jvm : jvmMappings) {
- infra.copyFromNode(jvm.getNode(), jvm.getOutputDir(), new File(benchmarkOutput, jvm.getRole() + "-" + jvm.getId()));
+ infra.copyFromNode(jvm.getNode(), jvm.getOutputDir(),
+ new File(benchmarkOutput, jvm.getRole() + "-" + jvm.getId()));
}
}
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/classpath/ClassPathCopier.java b/harness/src/main/java/org/apache/geode/perftest/jvms/classpath/ClassPathCopier.java
index 8d98b61..8f5b6b8 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/classpath/ClassPathCopier.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/classpath/ClassPathCopier.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -57,20 +57,21 @@ public class ClassPathCopier {
}
private File jarDir(File file) {
- if(!file.isDirectory()) {
+ if (!file.isDirectory()) {
return file;
}
try {
File outputFile =
- new File(System.getProperty("java.io.tmpdir"), Math.abs(file.hashCode()) + "_" + file.getName() + ".jar");
+ new File(System.getProperty("java.io.tmpdir"),
+ Math.abs(file.hashCode()) + "_" + file.getName() + ".jar");
outputFile.deleteOnExit();
JarUtil.jar(file, outputFile);
return outputFile;
- } catch(IOException e) {
+ } catch (IOException e) {
throw new UncheckedIOException(e);
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/classpath/JarUtil.java b/harness/src/main/java/org/apache/geode/perftest/jvms/classpath/JarUtil.java
index f49efcb..a8e6adc 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/classpath/JarUtil.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/classpath/JarUtil.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -42,14 +42,15 @@ public class JarUtil {
*/
static void jar(File file, File outputFile) throws IOException {
Manifest manifest = new Manifest();
- try (JarOutputStream outputStream = new JarOutputStream(new FileOutputStream(outputFile), manifest)) {
+ try (JarOutputStream outputStream =
+ new JarOutputStream(new FileOutputStream(outputFile), manifest)) {
Path start = file.toPath();
Files.walkFileTree(start, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
throws IOException {
- if(file.toFile().isDirectory()) {
+ if (file.toFile().isDirectory()) {
return FileVisitResult.CONTINUE;
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ChildJVM.java b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ChildJVM.java
index 45ea60e..3a25b15 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ChildJVM.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ChildJVM.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -22,7 +22,6 @@ import java.io.PrintStream;
import java.rmi.RemoteException;
import org.apache.commons.io.FileUtils;
-import org.bouncycastle.jcajce.provider.drbg.DRBG;
import org.apache.geode.perftest.jdk.RMI;
import org.apache.geode.perftest.jdk.SystemInterface;
@@ -63,7 +62,7 @@ public class ChildJVM {
}
File outputDir = new File(OUTPUT_DIR);
- //Clean up the output directory before the test runs
+ // Clean up the output directory before the test runs
FileUtils.deleteQuietly(outputDir);
outputDir.mkdirs();
PrintStream out = new PrintStream(new File(outputDir, "system.log"));
@@ -80,22 +79,22 @@ public class ChildJVM {
controller.addWorker(id, worker);
- //Wait until the controller shuts down
- //If the controller shuts down, this will throw an exception
+ // Wait until the controller shuts down
+ // If the controller shuts down, this will throw an exception
try {
while (controller.ping()) {
Thread.sleep(pingTime);
}
- } catch(RemoteException e) {
- //If we get a RemoteException, the controller has shut down
- //exit gracefully
+ } catch (RemoteException e) {
+ // If we get a RemoteException, the controller has shut down
+ // exit gracefully
}
system.exit(0);
- } catch(Throwable t) {
+ } catch (Throwable t) {
t.printStackTrace();
- //Force a system exit. Because we created an RMI object, an exception from the main
- //thread would not otherwise cause this process to exit
+ // Force a system exit. Because we created an RMI object, an exception from the main
+ // thread would not otherwise cause this process to exit
system.exit(1);
}
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/Controller.java b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/Controller.java
index e40c2fd..bd7e0fa 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/Controller.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/Controller.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -49,7 +49,7 @@ public class Controller extends UnicastRemoteObject implements ControllerRemote
public void close() throws NoSuchObjectException {
isClosed = true;
- UnicastRemoteObject.unexportObject(this,true);
+ UnicastRemoteObject.unexportObject(this, true);
UnicastRemoteObject.unexportObject(registry, true);
}
@@ -75,7 +75,7 @@ public class Controller extends UnicastRemoteObject implements ControllerRemote
public CompletableFuture<Void> onWorker(int id, Task task) {
WorkerRemote worker = workers.get(id);
- if(worker == null) {
+ if (worker == null) {
throw new IllegalStateException("Worker number " + id + " is not set");
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ControllerFactory.java b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ControllerFactory.java
index 4aaa47f..42dea0e 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ControllerFactory.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ControllerFactory.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -32,7 +32,7 @@ public class ControllerFactory {
private final RMI rmi = new RMI();
public Controller createController(SharedContext sharedContext,
- int numWorkers) throws RemoteException, AlreadyBoundException {
+ int numWorkers) throws RemoteException, AlreadyBoundException {
Registry registry = rmi.createRegistry(RMI_PORT);
Controller controller = new Controller(numWorkers, registry, sharedContext);
registry.bind(CONTROLLER, controller);
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ControllerRemote.java b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ControllerRemote.java
index f29d361..0a63a0c 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ControllerRemote.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/ControllerRemote.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/Worker.java b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/Worker.java
index 0653c0e..a448a2a 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/Worker.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/Worker.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -30,6 +30,7 @@ public class Worker extends UnicastRemoteObject implements WorkerRemote {
public Worker(DefaultTestContext context) throws RemoteException {
this.context = context;
}
+
@Override
public void execute(Task task) throws Exception {
task.run(context);
diff --git a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/WorkerRemote.java b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/WorkerRemote.java
index f5f2859..0c9cf7f 100644
--- a/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/WorkerRemote.java
+++ b/harness/src/main/java/org/apache/geode/perftest/jvms/rmi/WorkerRemote.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestContext.java b/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestContext.java
index b7b3de1..bd586d8 100644
--- a/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestContext.java
+++ b/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestContext.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -29,7 +29,7 @@ public class DefaultTestContext implements TestContext {
private SharedContext sharedContext;
private File outputDir;
private int jvmID;
- TreeMap<String,Object> attributeMap;
+ TreeMap<String, Object> attributeMap;
public DefaultTestContext(SharedContext sharedContext, File outputDir, int jvmID) {
this.sharedContext = sharedContext;
@@ -50,7 +50,7 @@ public class DefaultTestContext implements TestContext {
@Override
public void setAttribute(String attribute, Object value) {
- attributeMap.put(attribute,value);
+ attributeMap.put(attribute, value);
}
@Override
diff --git a/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java b/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java
index 56ce3a0..ab89ccc 100644
--- a/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java
+++ b/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -28,7 +28,6 @@ import org.apache.geode.perftest.PerformanceTest;
import org.apache.geode.perftest.TestConfig;
import org.apache.geode.perftest.TestRunner;
import org.apache.geode.perftest.infrastructure.InfrastructureFactory;
-import org.apache.geode.perftest.infrastructure.Infrastructure;
import org.apache.geode.perftest.jvms.RemoteJVMFactory;
import org.apache.geode.perftest.jvms.RemoteJVMs;
@@ -63,12 +62,13 @@ public class DefaultTestRunner implements TestRunner {
throws Exception {
int nodes = config.getTotalJVMs();
- if(config.getName() == null) {
+ if (config.getName() == null) {
throw new IllegalStateException("Benchmark must have a name.");
}
File benchmarkOutput = new File(outputDir, config.getName());
- if(benchmarkOutput.exists()) {
- throw new IllegalStateException("Benchmark output directory already exists: " + benchmarkOutput.getPath());
+ if (benchmarkOutput.exists()) {
+ throw new IllegalStateException(
+ "Benchmark output directory already exists: " + benchmarkOutput.getPath());
}
@@ -76,7 +76,7 @@ public class DefaultTestRunner implements TestRunner {
Map<String, List<String>> jvmArgs = config.getJvmArgs();
logger.info("Lauching JVMs...");
- //launch JVMs in parallel, hook them up
+ // launch JVMs in parallel, hook them up
try (RemoteJVMs remoteJVMs = remoteJvmFactory.launch(roles, jvmArgs)) {
logger.info("Starting before tasks...");
@@ -95,7 +95,7 @@ public class DefaultTestRunner implements TestRunner {
}
private void runTasks(List<TestConfig.TestStep> steps,
- RemoteJVMs remoteJVMs) {
+ RemoteJVMs remoteJVMs) {
steps.forEach(testStep -> {
remoteJVMs.execute(testStep.getTask(), testStep.getRoles());
});
diff --git a/harness/src/main/java/org/apache/geode/perftest/runner/SharedContext.java b/harness/src/main/java/org/apache/geode/perftest/runner/SharedContext.java
index 50aeadf..a36defe 100644
--- a/harness/src/main/java/org/apache/geode/perftest/runner/SharedContext.java
+++ b/harness/src/main/java/org/apache/geode/perftest/runner/SharedContext.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/harness/src/main/java/org/apache/geode/perftest/yardstick/TestDoneProbe.java b/harness/src/main/java/org/apache/geode/perftest/yardstick/TestDoneProbe.java
index 99d48cf..2adfafa 100644
--- a/harness/src/main/java/org/apache/geode/perftest/yardstick/TestDoneProbe.java
+++ b/harness/src/main/java/org/apache/geode/perftest/yardstick/TestDoneProbe.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/harness/src/main/java/org/apache/geode/perftest/yardstick/YardstickTask.java b/harness/src/main/java/org/apache/geode/perftest/yardstick/YardstickTask.java
index a6fe7fe..5520117 100644
--- a/harness/src/main/java/org/apache/geode/perftest/yardstick/YardstickTask.java
+++ b/harness/src/main/java/org/apache/geode/perftest/yardstick/YardstickTask.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -88,19 +88,21 @@ public class YardstickTask implements Task {
};
cfg.output(System.out);
- BenchmarkDriver[] drivers = new BenchmarkDriver[]{benchmark};
+ BenchmarkDriver[] drivers = new BenchmarkDriver[] {benchmark};
benchmark.setUp(cfg);
TestDoneProbe testDoneProbe = new TestDoneProbe();
- Collection<BenchmarkProbe> probes = Arrays.asList(new HdrHistogramProbe(new HdrHistogramWriter(context.getOutputDir())), new ThroughputLatencyProbe(),
- new PercentileProbe(), new DStatProbe(), new VmStatProbe(),
- testDoneProbe);
+ Collection<BenchmarkProbe> probes =
+ Arrays.asList(new HdrHistogramProbe(new HdrHistogramWriter(context.getOutputDir())),
+ new ThroughputLatencyProbe(),
+ new PercentileProbe(), new DStatProbe(), new VmStatProbe(),
+ testDoneProbe);
BenchmarkLoader loader = new BenchmarkLoader();
loader.initialize(cfg);
BenchmarkProbeSet probeSet = new BenchmarkProbeSet(benchmark, cfg, probes, loader);
- BenchmarkProbeSet[] probeSets = new BenchmarkProbeSet[]{probeSet};
- int[] weights = new int[]{1};
+ BenchmarkProbeSet[] probeSets = new BenchmarkProbeSet[] {probeSet};
+ int[] weights = new int[] {1};
BenchmarkRunner runner = new BenchmarkRunner(cfg, drivers, probeSets, weights);
diff --git a/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickHdrHistogramParser.java b/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickHdrHistogramParser.java
index f72f520..8b2c6da 100644
--- a/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickHdrHistogramParser.java
+++ b/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickHdrHistogramParser.java
@@ -14,14 +14,9 @@
*/
package org.apache.geode.perftest.yardstick.analysis;
-import static java.lang.Math.abs;
-import java.io.BufferedReader;
import java.io.File;
-import java.io.FileReader;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Scanner;
import org.HdrHistogram.Histogram;
import org.HdrHistogram.HistogramLogReader;
@@ -47,7 +42,7 @@ public class YardstickHdrHistogramParser implements ProbeResultParser {
final Histogram nextIntervalHistogram = (Histogram) reader.nextIntervalHistogram();
- if(histogram == null) {
+ if (histogram == null) {
histogram = nextIntervalHistogram;
} else {
histogram.add(nextIntervalHistogram);
diff --git a/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickPercentileSensorParser.java b/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickPercentileSensorParser.java
index 77af444..fb843ca 100644
--- a/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickPercentileSensorParser.java
+++ b/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickPercentileSensorParser.java
@@ -100,13 +100,14 @@ public class YardstickPercentileSensorParser implements ProbeResultParser {
public double getPercentile(int target) {
if (target < 0 || target > 100) {
- throw new RuntimeException("Percentile must be in the range (0, 100), invalid value: " + target);
+ throw new RuntimeException(
+ "Percentile must be in the range (0, 100), invalid value: " + target);
}
double targetPercent = target / 100.0;
normalizeBuckets();
if (buckets.size() == 1) {
- return buckets.get(0).latencyBucket; // Just one bucket doesn't give us much info
+ return buckets.get(0).latencyBucket; // Just one bucket doesn't give us much info
}
SensorBucket[] bucketArray = buckets.toArray(new SensorBucket[buckets.size()]);
@@ -121,11 +122,12 @@ public class YardstickPercentileSensorParser implements ProbeResultParser {
SensorBucket targetBucket = bucketArray[i];
// If last bucket contains the target percentile, assume bucket size is same as previous bucket
- int bucketSize = (bucketArray.length > i + 1) ?
- bucketArray[i + 1].latencyBucket - targetBucket.latencyBucket :
- targetBucket.latencyBucket - bucketArray[i - 1].latencyBucket;
+ int bucketSize =
+ (bucketArray.length > i + 1) ? bucketArray[i + 1].latencyBucket - targetBucket.latencyBucket
+ : targetBucket.latencyBucket - bucketArray[i - 1].latencyBucket;
- double percentileLocationInTargetBucket = 1.0 - ((accumulator - targetPercent) / targetBucket.bucketPercentage);
+ double percentileLocationInTargetBucket =
+ 1.0 - ((accumulator - targetPercent) / targetBucket.bucketPercentage);
return targetBucket.latencyBucket + bucketSize * percentileLocationInTargetBucket;
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickThroughputSensorParser.java b/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickThroughputSensorParser.java
index 6c577f9..340f3c3 100644
--- a/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickThroughputSensorParser.java
+++ b/harness/src/main/java/org/apache/geode/perftest/yardstick/analysis/YardstickThroughputSensorParser.java
@@ -70,7 +70,7 @@ public class YardstickThroughputSensorParser implements ProbeResultParser {
for (SensorDatapoint datapoint : datapoints) {
accumulator += datapoint.opsPerSec;
}
- return accumulator / datapoints.size();
+ return accumulator / datapoints.size();
}
private static class SensorDatapoint {
diff --git a/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/Clock.java b/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/Clock.java
index d2da4fe..4ea83e1 100644
--- a/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/Clock.java
+++ b/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/Clock.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramProbe.java b/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramProbe.java
index e3fd909..5579d0d 100644
--- a/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramProbe.java
+++ b/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramProbe.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.apache.geode.perftest.yardstick.hdrhistogram;
@@ -39,7 +56,8 @@ public class HdrHistogramProbe implements BenchmarkExecutionAwareProbe, Benchmar
this(1, TimeUnit.HOURS.toNanos(5), 3, () -> System.nanoTime(), histogramConsumer);
}
- public HdrHistogramProbe(int lower, long upper, int numDigits, Clock clock, Consumer<Histogram> histogramConsumer) {
+ public HdrHistogramProbe(int lower, long upper, int numDigits, Clock clock,
+ Consumer<Histogram> histogramConsumer) {
this.lower = lower;
this.upper = upper;
this.numDigits = numDigits;
@@ -49,12 +67,12 @@ public class HdrHistogramProbe implements BenchmarkExecutionAwareProbe, Benchmar
@Override
public void beforeExecute(int threadIdx) {
- startTimes[threadIdx] = clock.currentTimeNanos();
+ startTimes[threadIdx] = clock.currentTimeNanos();
}
@Override
public void afterExecute(int threadIdx) {
- histograms[threadIdx].recordValue(clock.currentTimeNanos() - startTimes[threadIdx]);
+ histograms[threadIdx].recordValue(clock.currentTimeNanos() - startTimes[threadIdx]);
}
@Override
@@ -72,14 +90,13 @@ public class HdrHistogramProbe implements BenchmarkExecutionAwareProbe, Benchmar
}
private void reset() {
- for(int i =0; i < histograms.length; i++) {
+ for (int i = 0; i < histograms.length; i++) {
histograms[i] = new Histogram(lower, upper, numDigits);
}
}
@Override
- public void stop() {
- }
+ public void stop() {}
@Override
public Collection<String> metaInfo() {
@@ -94,7 +111,8 @@ public class HdrHistogramProbe implements BenchmarkExecutionAwareProbe, Benchmar
double percentile50 = aggregate.getMean();
long percentile99 = aggregate.getValueAtPercentile(99);
- BenchmarkProbePoint point = new BenchmarkProbePoint(0, new double[] {percentile50, percentile99});
+ BenchmarkProbePoint point =
+ new BenchmarkProbePoint(0, new double[] {percentile50, percentile99});
histogramConsumer.accept(aggregate);
return Collections.singleton(point);
@@ -109,7 +127,7 @@ public class HdrHistogramProbe implements BenchmarkExecutionAwareProbe, Benchmar
public Histogram getHistogram() {
Histogram aggregate = new Histogram(lower, upper, numDigits);
- for(Histogram histogram : histograms) {
+ for (Histogram histogram : histograms) {
aggregate.add(histogram);
}
return aggregate;
diff --git a/harness/src/test/java/org/apache/geode/perftest/TestRunnerIntegrationTest.java b/harness/src/test/java/org/apache/geode/perftest/TestRunnerIntegrationTest.java
index e49a63a..942e685 100644
--- a/harness/src/test/java/org/apache/geode/perftest/TestRunnerIntegrationTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/TestRunnerIntegrationTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -73,13 +73,12 @@ public class TestRunnerIntegrationTest {
File expectedBenchmarkDir = new File(outputDir, SAMPLE_BENCHMARK);
assertTrue(expectedBenchmarkDir.exists());
- //Node directory name is the role + a number
+ // Node directory name is the role + a number
File expectedNodeDir = new File(expectedBenchmarkDir, "all-0");
assertTrue(expectedNodeDir.exists());
- //We expect the node directory to have benchmark results
- Stream<Path>
- outputFiles = Files.walk(expectedNodeDir.toPath())
+ // We expect the node directory to have benchmark results
+ Stream<Path> outputFiles = Files.walk(expectedNodeDir.toPath())
.filter(nameMatches(YardstickThroughputSensorParser.sensorOutputFile));
assertEquals(1, outputFiles.count());
@@ -92,8 +91,10 @@ public class TestRunnerIntegrationTest {
testConfig.role("all", 1);
testConfig.jvmArgs("all", "-Dprop1=true", "-Dprop2=5");
testConfig.before(context -> {
- assertTrue("Expecting system property to be set in launched JVM, but it was not present.", Boolean.getBoolean("prop1"));
- assertEquals("Expecting system property to be set in launched JVM, but it was not present.", 5, Integer.getInteger("prop2").intValue());
+ assertTrue("Expecting system property to be set in launched JVM, but it was not present.",
+ Boolean.getBoolean("prop1"));
+ assertEquals("Expecting system property to be set in launched JVM, but it was not present.",
+ 5, Integer.getInteger("prop2").intValue());
}, "all");
});
}
diff --git a/harness/src/test/java/org/apache/geode/perftest/TestRunnerJUnitTest.java b/harness/src/test/java/org/apache/geode/perftest/TestRunnerJUnitTest.java
index 1349927..8e4c45c 100644
--- a/harness/src/test/java/org/apache/geode/perftest/TestRunnerJUnitTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/TestRunnerJUnitTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -21,11 +21,8 @@ import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import java.util.Collections;
-
import org.assertj.core.api.Assertions;
import org.junit.Rule;
import org.junit.Test;
@@ -90,6 +87,7 @@ public class TestRunnerJUnitTest {
config.before(before);
};
- Assertions.assertThatThrownBy(() -> runner.runTest(test)).isInstanceOf(IllegalStateException.class);
+ Assertions.assertThatThrownBy(() -> runner.runTest(test))
+ .isInstanceOf(IllegalStateException.class);
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/TestRunnersTest.java b/harness/src/test/java/org/apache/geode/perftest/TestRunnersTest.java
index 99e33eb..7336ec4 100644
--- a/harness/src/test/java/org/apache/geode/perftest/TestRunnersTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/TestRunnersTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -30,16 +30,17 @@ public class TestRunnersTest {
@Test
public void defaultRunnerShouldParseHosts() {
- DefaultTestRunner runner = (DefaultTestRunner) TestRunners.defaultRunner("localhost,localhost", null);
+ DefaultTestRunner runner =
+ (DefaultTestRunner) TestRunners.defaultRunner("localhost,localhost", null);
SshInfrastructureFactory infrastructureFactory =
(SshInfrastructureFactory) runner.getRemoteJvmFactory().getInfrastructureFactory();
- assertEquals(Arrays.asList("localhost", "localhost") , infrastructureFactory.getHosts());
+ assertEquals(Arrays.asList("localhost", "localhost"), infrastructureFactory.getHosts());
}
-
+
@Test(expected = IllegalStateException.class)
public void defaultRunnerShouldFailWithNoHosts() {
TestRunners.defaultRunner(null, null);
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/analysis/BenchmarkRunAnalyzerTest.java b/harness/src/test/java/org/apache/geode/perftest/analysis/BenchmarkRunAnalyzerTest.java
index 570399d..195dd06 100644
--- a/harness/src/test/java/org/apache/geode/perftest/analysis/BenchmarkRunAnalyzerTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/analysis/BenchmarkRunAnalyzerTest.java
@@ -40,35 +40,43 @@ public class BenchmarkRunAnalyzerTest {
@Test
public void verifyResultHarvester() throws IOException {
final File testFolder = temporaryFolder.newFolder("testFolder");
- final File testBenchmarkA1 = temporaryFolder.newFolder("testFolder","BenchmarkA","client1", "20181121-111516-yardstick-output");
- final File testBenchmarkA2 = temporaryFolder.newFolder("testFolder","BenchmarkA","client2", "20181121-111516-yardstick-output");
- final File testBenchmarkB1 = temporaryFolder.newFolder("testFolder","BenchmarkB","client1", "20181121-111516-yardstick-output");
- final File testBenchmarkB2 = temporaryFolder.newFolder("testFolder","BenchmarkB","client2", "20181121-111516-yardstick-output");
+ final File testBenchmarkA1 = temporaryFolder.newFolder("testFolder", "BenchmarkA", "client1",
+ "20181121-111516-yardstick-output");
+ final File testBenchmarkA2 = temporaryFolder.newFolder("testFolder", "BenchmarkA", "client2",
+ "20181121-111516-yardstick-output");
+ final File testBenchmarkB1 = temporaryFolder.newFolder("testFolder", "BenchmarkB", "client1",
+ "20181121-111516-yardstick-output");
+ final File testBenchmarkB2 = temporaryFolder.newFolder("testFolder", "BenchmarkB", "client2",
+ "20181121-111516-yardstick-output");
temporaryFolder.newFolder(testFolder.getName(), "junkfolder");
new File(testFolder, "junkfile").createNewFile();
final File baseFolder = temporaryFolder.newFolder("baseFolder");
- final File baseBenchmarkA1 = temporaryFolder.newFolder("baseFolder","BenchmarkA","client1", "20181121-111516-yardstick-output");
- final File baseBenchmarkA2 = temporaryFolder.newFolder("baseFolder","BenchmarkA","client2", "20181121-111516-yardstick-output");
- final File baseBenchmarkB1 = temporaryFolder.newFolder("baseFolder","BenchmarkB","client1", "20181121-111516-yardstick-output");
- final File baseBenchmarkB2 = temporaryFolder.newFolder("baseFolder","BenchmarkB","client2", "20181121-111516-yardstick-output");
-
- populateThroughputCSV(testBenchmarkA1, new double[] {10, 15, 20, 25, 30}); // Avg 20
- populatePercentileCSV(testBenchmarkA1, new double[] {0, 0, 99, 1}); // 200
- populateThroughputCSV(testBenchmarkB1, new double[] {10, 15, 20, 25, 30, 35, 40}); // Avg 25
- populatePercentileCSV(testBenchmarkB1, new double[] {0, 0, 0, 99, 1}); // 300
- populateThroughputCSV(baseBenchmarkA1, new double[] {15, 20, 25, 30, 35}); // Avg 25
- populatePercentileCSV(baseBenchmarkA1, new double[] {0, 99, 1}); // 100
- populateThroughputCSV(baseBenchmarkB1, new double[] {10, 15, 20, 25, 30}); // Avg 20
- populatePercentileCSV(baseBenchmarkB1, new double[] {0, 0, 0, 99, 1}); // 300
-
- populateThroughputCSV(testBenchmarkA2, new double[] {10, 15, 20, 25, 30}); // Avg 20
- populatePercentileCSV(testBenchmarkA2, new double[] {0, 0, 99, 1}); // 200
- populateThroughputCSV(testBenchmarkB2, new double[] {10, 15, 20, 25, 30, 35, 40}); // Avg 25
- populatePercentileCSV(testBenchmarkB2, new double[] {0, 0, 0, 99, 1}); // 300
- populateThroughputCSV(baseBenchmarkA2, new double[] {15, 20, 25, 30, 35}); // Avg 25
- populatePercentileCSV(baseBenchmarkA2, new double[] {0, 99, 1}); // 100
- populateThroughputCSV(baseBenchmarkB2, new double[] {10, 15, 20, 25, 30}); // Avg 20
- populatePercentileCSV(baseBenchmarkB2, new double[] {0, 0, 0, 99, 1}); // 300
+ final File baseBenchmarkA1 = temporaryFolder.newFolder("baseFolder", "BenchmarkA", "client1",
+ "20181121-111516-yardstick-output");
+ final File baseBenchmarkA2 = temporaryFolder.newFolder("baseFolder", "BenchmarkA", "client2",
+ "20181121-111516-yardstick-output");
+ final File baseBenchmarkB1 = temporaryFolder.newFolder("baseFolder", "BenchmarkB", "client1",
+ "20181121-111516-yardstick-output");
+ final File baseBenchmarkB2 = temporaryFolder.newFolder("baseFolder", "BenchmarkB", "client2",
+ "20181121-111516-yardstick-output");
+
+ populateThroughputCSV(testBenchmarkA1, new double[] {10, 15, 20, 25, 30}); // Avg 20
+ populatePercentileCSV(testBenchmarkA1, new double[] {0, 0, 99, 1}); // 200
+ populateThroughputCSV(testBenchmarkB1, new double[] {10, 15, 20, 25, 30, 35, 40}); // Avg 25
+ populatePercentileCSV(testBenchmarkB1, new double[] {0, 0, 0, 99, 1}); // 300
+ populateThroughputCSV(baseBenchmarkA1, new double[] {15, 20, 25, 30, 35}); // Avg 25
+ populatePercentileCSV(baseBenchmarkA1, new double[] {0, 99, 1}); // 100
+ populateThroughputCSV(baseBenchmarkB1, new double[] {10, 15, 20, 25, 30}); // Avg 20
+ populatePercentileCSV(baseBenchmarkB1, new double[] {0, 0, 0, 99, 1}); // 300
+
+ populateThroughputCSV(testBenchmarkA2, new double[] {10, 15, 20, 25, 30}); // Avg 20
+ populatePercentileCSV(testBenchmarkA2, new double[] {0, 0, 99, 1}); // 200
+ populateThroughputCSV(testBenchmarkB2, new double[] {10, 15, 20, 25, 30, 35, 40}); // Avg 25
+ populatePercentileCSV(testBenchmarkB2, new double[] {0, 0, 0, 99, 1}); // 300
+ populateThroughputCSV(baseBenchmarkA2, new double[] {15, 20, 25, 30, 35}); // Avg 25
+ populatePercentileCSV(baseBenchmarkA2, new double[] {0, 99, 1}); // 100
+ populateThroughputCSV(baseBenchmarkB2, new double[] {10, 15, 20, 25, 30}); // Avg 20
+ populatePercentileCSV(baseBenchmarkB2, new double[] {0, 0, 0, 99, 1}); // 300
BenchmarkRunAnalyzer harvester = new BenchmarkRunAnalyzer();
harvester.addProbe(new YardstickThroughputSensorParser());
@@ -87,7 +95,8 @@ public class BenchmarkRunAnalyzerTest {
private void populateThroughputCSV(File targetDirectory, double[] perSecondThroughputs)
throws FileNotFoundException {
- final File testFile = new File(targetDirectory, YardstickThroughputSensorParser.sensorOutputFile);
+ final File testFile =
+ new File(targetDirectory, YardstickThroughputSensorParser.sensorOutputFile);
PrintStream output = new PrintStream(testFile);
for (int i = 0; i < perSecondThroughputs.length; ++i) {
output.println(String.format("%d,%f,%f", i, perSecondThroughputs[i], 1d));
@@ -97,36 +106,47 @@ public class BenchmarkRunAnalyzerTest {
private void populatePercentileCSV(File targetDirectory, double[] hundredUsBuckets)
throws FileNotFoundException {
- final File testFile = new File(targetDirectory, YardstickPercentileSensorParser.sensorOutputFile);
+ final File testFile =
+ new File(targetDirectory, YardstickPercentileSensorParser.sensorOutputFile);
PrintStream output = new PrintStream(testFile);
for (int i = 0; i < hundredUsBuckets.length; ++i) {
- output.println(String.format("%d,%f", 100*i, hundredUsBuckets[i]));
+ output.println(String.format("%d,%f", 100 * i, hundredUsBuckets[i]));
}
output.close();
}
- private void validatedBenchmark(BufferedReader input, String benchmarkName, double testValA, double testValB, double baseValA, double baseValB)
+ private void validatedBenchmark(BufferedReader input, String benchmarkName, double testValA,
+ double testValB, double baseValA, double baseValB)
throws IOException {
String line = input.readLine();
Assert.assertEquals("-- " + benchmarkName + " --", line);
- validateProbe(input, YardstickThroughputSensorParser.probeResultDescription, testValA, baseValA);
- validateProbe(input, YardstickPercentileSensorParser.probeResultDescription, testValB, baseValB);
+ validateProbe(input, YardstickThroughputSensorParser.probeResultDescription, testValA,
+ baseValA);
+ validateProbe(input, YardstickPercentileSensorParser.probeResultDescription, testValB,
+ baseValB);
}
- private void validateProbe(BufferedReader input, String description, double testVal, double baseVal)
+ private void validateProbe(BufferedReader input, String description, double testVal,
+ double baseVal)
throws IOException {
String line = input.readLine();
Assert.assertEquals(description, line);
Scanner scanner = new Scanner(input.readLine());
- while (!scanner.hasNextDouble()) {scanner.next();}
+ while (!scanner.hasNextDouble()) {
+ scanner.next();
+ }
Assert.assertEquals(testVal, scanner.nextDouble(), 0.01 * testVal);
scanner = new Scanner(input.readLine());
- while (!scanner.hasNextDouble()) {scanner.next();}
+ while (!scanner.hasNextDouble()) {
+ scanner.next();
+ }
Assert.assertEquals(baseVal, scanner.nextDouble(), 0.01 * baseVal);
scanner = new Scanner(input.readLine());
- while (!scanner.hasNextDouble()) {scanner.next();}
+ while (!scanner.hasNextDouble()) {
+ scanner.next();
+ }
Assert.assertEquals(testVal / baseVal, scanner.nextDouble(), 0.1);
line = input.readLine();
Assert.assertEquals("", line);
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/benchmarks/EmptyBenchmark.java b/harness/src/test/java/org/apache/geode/perftest/benchmarks/EmptyBenchmark.java
index 02e0626..07aca84 100644
--- a/harness/src/test/java/org/apache/geode/perftest/benchmarks/EmptyBenchmark.java
+++ b/harness/src/test/java/org/apache/geode/perftest/benchmarks/EmptyBenchmark.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
diff --git a/harness/src/test/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructureTest.java b/harness/src/test/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructureTest.java
index 9715b4e..af222cf 100644
--- a/harness/src/test/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructureTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/infrastructure/local/LocalInfrastructureTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -17,7 +17,9 @@
package org.apache.geode.perftest.infrastructure.local;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
@@ -95,4 +97,4 @@ public class LocalInfrastructureTest {
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructureTest.java b/harness/src/test/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructureTest.java
index c1041cf..ca6ad19 100644
--- a/harness/src/test/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructureTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/infrastructure/ssh/SshInfrastructureTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -60,8 +60,7 @@ public class SshInfrastructureTest {
File folder = temporaryFolder.newFolder();
folder.mkdirs();
File expectedFile = new File(folder, "somefile.txt").getAbsoluteFile();
- int result = infra.onNode(node1, new String[] {"touch", expectedFile.getPath()}
- );
+ int result = infra.onNode(node1, new String[] {"touch", expectedFile.getPath()});
assertEquals(0, result);
assertTrue(expectedFile.exists());
@@ -114,10 +113,10 @@ public class SshInfrastructureTest {
File destDirectory = temporaryFolder.newFolder();
- infra.copyFromNode(node1,"/tmp/foo", destDirectory);
- assertTrue(new File(destDirectory,"foo/file.txt").exists());
- assertTrue(new File(destDirectory,"foo/file2.txt").exists());
+ infra.copyFromNode(node1, "/tmp/foo", destDirectory);
+ assertTrue(new File(destDirectory, "foo/file.txt").exists());
+ assertTrue(new File(destDirectory, "foo/file2.txt").exists());
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/infrastructure/ssh/SshServerRule.java b/harness/src/test/java/org/apache/geode/perftest/infrastructure/ssh/SshServerRule.java
index dfc3ca7..3f3e760 100644
--- a/harness/src/test/java/org/apache/geode/perftest/infrastructure/ssh/SshServerRule.java
+++ b/harness/src/test/java/org/apache/geode/perftest/infrastructure/ssh/SshServerRule.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -44,7 +44,8 @@ public class SshServerRule extends TemporaryFolder {
sshd.setPort(0);
sshd.setHost("localhost");
sshd.setPublickeyAuthenticator((username, key, session) -> true);
- sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider(Paths.get(newFolder().getPath(), "hostkey.ser")));
+ sshd.setKeyPairProvider(
+ new SimpleGeneratorHostKeyProvider(Paths.get(newFolder().getPath(), "hostkey.ser")));
sshd.setCommandFactory(new UnescapingCommandFactory());
sshd.start();
}
diff --git a/harness/src/test/java/org/apache/geode/perftest/jvms/RemoteJVMFactoryIntegrationTest.java b/harness/src/test/java/org/apache/geode/perftest/jvms/RemoteJVMFactoryIntegrationTest.java
index b9476bb..7e81910 100644
--- a/harness/src/test/java/org/apache/geode/perftest/jvms/RemoteJVMFactoryIntegrationTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/jvms/RemoteJVMFactoryIntegrationTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -47,4 +47,4 @@ public class RemoteJVMFactoryIntegrationTest {
}
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/jvms/RemoteJVMFactoryTest.java b/harness/src/test/java/org/apache/geode/perftest/jvms/RemoteJVMFactoryTest.java
index d8337e4..883526b 100644
--- a/harness/src/test/java/org/apache/geode/perftest/jvms/RemoteJVMFactoryTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/jvms/RemoteJVMFactoryTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -86,4 +86,4 @@ public class RemoteJVMFactoryTest {
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/jvms/rmi/ChildJVMTest.java b/harness/src/test/java/org/apache/geode/perftest/jvms/rmi/ChildJVMTest.java
index 2d61883..5fd04f3 100644
--- a/harness/src/test/java/org/apache/geode/perftest/jvms/rmi/ChildJVMTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/jvms/rmi/ChildJVMTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -30,7 +30,6 @@ import static org.mockito.Mockito.when;
import java.io.File;
import java.io.IOException;
-import java.net.MalformedURLException;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
@@ -94,4 +93,4 @@ public class ChildJVMTest {
assertFalse(expectedFile.exists());
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/runner/SharedContextTest.java b/harness/src/test/java/org/apache/geode/perftest/runner/SharedContextTest.java
index 33d7721..bcdfbaf 100644
--- a/harness/src/test/java/org/apache/geode/perftest/runner/SharedContextTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/runner/SharedContextTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -17,7 +17,7 @@
package org.apache.geode.perftest.runner;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -56,4 +56,4 @@ public class SharedContextTest {
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/yardstick/YardstickTaskTest.java b/harness/src/test/java/org/apache/geode/perftest/yardstick/YardstickTaskTest.java
index 65c5588..d6b4a53 100644
--- a/harness/src/test/java/org/apache/geode/perftest/yardstick/YardstickTaskTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/yardstick/YardstickTaskTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import java.nio.file.Files;
-import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -56,8 +55,8 @@ public class YardstickTaskTest {
assertTrue(Files.walk(outputDir.toPath()).anyMatch(path -> path.toString().contains(
HdrHistogramWriter.FILE_NAME)));
- //TODO -verify probes are shutdown
- //TODO -verify benchmark is shutdown
+ // TODO -verify probes are shutdown
+ // TODO -verify benchmark is shutdown
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/yardstick/analysis/YardstickPercentileSensorParserTest.java b/harness/src/test/java/org/apache/geode/perftest/yardstick/analysis/YardstickPercentileSensorParserTest.java
index 73e1385..76e3e65 100644
--- a/harness/src/test/java/org/apache/geode/perftest/yardstick/analysis/YardstickPercentileSensorParserTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/yardstick/analysis/YardstickPercentileSensorParserTest.java
@@ -24,7 +24,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.apache.geode.perftest.yardstick.analysis.YardstickPercentileSensorParser;
public class YardstickPercentileSensorParserTest {
@Rule
@@ -164,4 +163,4 @@ public class YardstickPercentileSensorParserTest {
Assert.assertEquals(100, parser.getPercentile(40), 0.01);
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/yardstick/analysis/YardstickThroughputSensorParserTest.java b/harness/src/test/java/org/apache/geode/perftest/yardstick/analysis/YardstickThroughputSensorParserTest.java
index 7dfa9e6..c5d2652 100644
--- a/harness/src/test/java/org/apache/geode/perftest/yardstick/analysis/YardstickThroughputSensorParserTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/yardstick/analysis/YardstickThroughputSensorParserTest.java
@@ -25,7 +25,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.apache.geode.perftest.yardstick.analysis.YardstickThroughputSensorParser;
public class YardstickThroughputSensorParserTest {
@Rule
@@ -96,4 +95,4 @@ public class YardstickThroughputSensorParserTest {
parser.parseResults(testFolder);
Assert.assertEquals(42906f, parser.getAverageThroughput(), .01);
}
-}
\ No newline at end of file
+}
diff --git a/harness/src/test/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramProbeTest.java b/harness/src/test/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramProbeTest.java
index c8a0f5f..a3b133c 100644
--- a/harness/src/test/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramProbeTest.java
+++ b/harness/src/test/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramProbeTest.java
@@ -1,12 +1,12 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
+ * 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
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -17,7 +17,7 @@
package org.apache.geode.perftest.yardstick.hdrhistogram;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -79,7 +79,7 @@ public class HdrHistogramProbeTest {
probe.afterExecute(0);
assertEquals(4, probe.getHistogram().getMaxValue());
- assertEquals(8.0/3.0, probe.getHistogram().getMean(), 0.01);
+ assertEquals(8.0 / 3.0, probe.getHistogram().getMean(), 0.01);
}
@Test
@@ -103,4 +103,4 @@ public class HdrHistogramProbeTest {
assertEquals(0, point.time());
Assertions.assertThat(point.values()).containsExactly(3.0, 4.0);
}
-}
\ No newline at end of file
+}