diff --git a/CHANGELOG.md b/CHANGELOG.md index 34887159b..fa8ed5ebd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,7 +71,7 @@ ### Version 1.5.8 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.netflix.hystrix%22%20AND%20v%3A%221.5.8%22), [Bintray](https://bintray.com/netflixoss/maven/Hystrix/1.5.8/)) ### -* [Pull 1419](https://github.com/Netflix/Hystrix/pull/1419) When user has not opted in to letting core/maximum threadpools diverge, ensure dynamic updates to coreSize apply to both +* [Pull 1419](https://github.com/Netflix/Hystrix/pull/1419) When user has not opted into letting core/maximum threadpools diverge, ensure dynamic updates to coreSize apply to both * [Pull 1415](https://github.com/Netflix/Hystrix/pull/1415) Fix spelling mistake in comments. Thanks @starlight36 ! ### Version 1.5.7 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.netflix.hystrix%22%20AND%20v%3A%221.5.7%22), [Bintray](https://bintray.com/netflixoss/maven/Hystrix/1.5.7/)) ### @@ -86,7 +86,7 @@ * [Pull 1385](https://github.com/Netflix/Hystrix/pull/1385) Bump jmh Gradle plugin to 0.3.1. Thanks @monkey-mas! * [Pull 1382](https://github.com/Netflix/Hystrix/pull/1382) Bump jmh to 1.15. Thanks @monkey-mas! * [Pull 1380](https://github.com/Netflix/Hystrix/pull/1380) Add jmh test for open-circuit case -* [Pull 1376](https://github.com/Netflix/Hystrix/pull/1376) Clean up documentation around thread keep-alive. Thanks @bitb ! +* [Pull 1376](https://github.com/Netflix/Hystrix/pull/1376) Clean up documentation around thread keep-alive. Thanks @bltb ! * [Pull 1375](https://github.com/Netflix/Hystrix/pull/1375) Remove cancelled tasks from threadpool queue * [Pull 1371](https://github.com/Netflix/Hystrix/pull/1371) Allow core and maximum size of threadpools to diverge. @@ -458,7 +458,7 @@ This version should be the exact same as 1.4.20, but suffered problems during th * [Pull 754](https://github.com/Netflix/Hystrix/pull/754) Only fire onFallbackStart/onFallbackError hooks when a user-supplied fallback is invoked * [Pull 753](https://github.com/Netflix/Hystrix/pull/753) Add timeout to dashboard for semaphore commands * [Pull 750](https://github.com/Netflix/Hystrix/pull/750) First pass at jmh performance benchmarking -* [Pull 748](https://github.com/Netflix/Hystrix/pull/748) Fix return value of HystrixCircuiBreakerImpl.isOpen when it loses a race to open a circuit +* [Pull 748](https://github.com/Netflix/Hystrix/pull/748) Fix return value of HystrixCircuitBreakerImpl.isOpen when it loses a race to open a circuit * [Pull 746](https://github.com/Netflix/Hystrix/pull/746) Improve Javadoc for HystrixCommandProperties.Setter @@ -469,7 +469,7 @@ This version should be the exact same as 1.4.20, but suffered problems during th * [Pull 741](https://github.com/Netflix/Hystrix/pull/741) Bugfix to java.lang.Error handling * [Pull 735](https://github.com/Netflix/Hystrix/pull/735) (Javanica) BatchHystrixCommand * [Pull 739](https://github.com/Netflix/Hystrix/pull/739) Mark some java.lang.Errors as unrecoverable and never trigger fallback -* [Pull 738](https://github.com/Netflix/Hystrix/pull/738) Filter out thread pools with no thread activity from hystrics-metrics-event-stream +* [Pull 738](https://github.com/Netflix/Hystrix/pull/738) Filter out thread pools with no thread activity from hystrix-metrics-event-stream * [Pull 732](https://github.com/Netflix/Hystrix/pull/732) Comment out flaky unit test ### Version 1.4.3 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.netflix.hystrix%22%20AND%20v%3A%221.4.3%22), [Bintray](https://bintray.com/netflixoss/maven/Hystrix/1.4.3/)) ### @@ -497,7 +497,7 @@ This version adds HystrixObservableCommand and implements both it and HystrixCom A HystrixObservableCommand allows for fully non-blocking commands that can be composed as part of a larger Observable chain. See [the wiki](https://github.com/Netflix/Hystrix/wiki/How-To-Use#reactive-commands) for more details on usage. Here's an example (using Java 8): ```java -public class ObservableHttpCommand extends HystrixObsverableCommand { +public class ObservableHttpCommand extends HystrixObservableCommand { @Override protected Observable construct() { @@ -564,7 +564,7 @@ NOTE: This code is believed to be production worthy. As of now, there are no kn * [Pull 647](https://github.com/Netflix/Hystrix/pull/647) Tie command property to thread interrupt * [Pull 645](https://github.com/Netflix/Hystrix/pull/645) Remove incorrect reference to async timeout * [Pull 644](https://github.com/Netflix/Hystrix/pull/644) Add RequestCollapser metrics to Yammer Metrics Publisher -* [Pull 643](https://github.com/Netflix/Hystrix/pull/643) Stress-test HystrixObservalbeCollapser +* [Pull 643](https://github.com/Netflix/Hystrix/pull/643) Stress-test HystrixObservableCollapser * [Pull 642](https://github.com/Netflix/Hystrix/pull/642) Fix flakiness of HystrixObservableCommandTest.testRejectedViaSemaphoreIsolation * [Pull 641](https://github.com/Netflix/Hystrix/pull/641) Fix flakiness of testSemaphorePermitsInUse * [Pull 608](https://github.com/Netflix/Hystrix/pull/608) Make HystrixObservableCommand handle both sync and async exceptions @@ -596,7 +596,7 @@ _NOTE: This code is believed to be production worthy but is still a "Release Can * [Pull 527](https://github.com/Netflix/Hystrix/pull/527) Creating a synthetic exception in the semaphore execution and short-circuited case * [Pull 526](https://github.com/Netflix/Hystrix/pull/526) Move onRunSuccess/onRunError and thread-pool book-keeping to Hystrix thread * [Pull 524](https://github.com/Netflix/Hystrix/pull/524) Change calls from getExecutedCommands() to getAllExecutedCommands() -* [Pull 516](https://github.com/Netflix/Hystrix/pull/516) Updated HystrixServoMetricsPublisher initalization of singleton +* [Pull 516](https://github.com/Netflix/Hystrix/pull/516) Updated HystrixServoMetricsPublisher initialization of singleton * [Pull 489](https://github.com/Netflix/Hystrix/pull/489) Javanica: Request Caching * [Pull 512](https://github.com/Netflix/Hystrix/pull/512) Add execution hook Javadoc * [Pull 511](https://github.com/Netflix/Hystrix/pull/511) Fix missing onComplete hook call when command short-circuits and missing onRunSuccess hook call in thread-timeout case @@ -613,7 +613,7 @@ _NOTE: This code is believed to be production worthy but is still a "Release Can * [Pull 449](https://github.com/Netflix/Hystrix/pull/449) Move thread completion bookkeeping to end of chain * [Pull 447](https://github.com/Netflix/Hystrix/pull/447) Synchronous queue fix * [Pull 376](https://github.com/Netflix/Hystrix/pull/376) Javanica README cleanup -* [Pull 378](https://github.com/Netflix/Hystrix/pull/378) Exection hook call sequences (based on work submitted in [Pull 327](https://github.com/Netflix/Hystrix/pull/327)) +* [Pull 378](https://github.com/Netflix/Hystrix/pull/378) Execution hook call sequences (based on work submitted in [Pull 327](https://github.com/Netflix/Hystrix/pull/327)) * [Pull 374](https://github.com/Netflix/Hystrix/pull/374) RequestBatch logging * [Pull 371](https://github.com/Netflix/Hystrix/pull/371) Defer creation of IllegalStateException in collapser flow (based on work submitted in [Pull 264](https://github.com/Netflix/Hystrix/pull/264)) * [Pull 369](https://github.com/Netflix/Hystrix/pull/369) Added basic auth to Hystrix Dashboard (based on work submitted in [Pull 336](https://github.com/Netflix/Hystrix/pull/336)) @@ -788,7 +788,7 @@ Here is a very basic example using Java 8 to make an HTTP call via Netty and rec ### Version 1.3.11 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.netflix.hystrix%22%20AND%20v%3A%221.3.11%22)) ### -* We'll ignore this release ever happened. Exact same binary as 1.3.10. (It helps to push code to Github before releasing.) +* We'll ignore this release ever happened. Exact same binary as 1.3.10. (It helps to push code to GitHub before releasing.) ### Version 1.3.10 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.netflix.hystrix%22%20AND%20v%3A%221.3.10%22)) ### @@ -883,7 +883,7 @@ This release is a major refactoring of the Hystrix codebase. To assert correctne ### Version 1.2.16 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.netflix.hystrix%22%20AND%20v%3A%221.2.16%22)) ### -* [Pull 132](https://github.com/Netflix/Hystrix/pull/132) Add `with-context` macro for conviently wrapping collapsers in thier own context +* [Pull 132](https://github.com/Netflix/Hystrix/pull/132) Add `with-context` macro for conveniently wrapping collapsers in their own context * [Pull 136](https://github.com/Netflix/Hystrix/pull/136) Fixed the mock stream * [Pull 137](https://github.com/Netflix/Hystrix/pull/137) Limit scope of CurrentThreadExecutingCommand @@ -977,12 +977,12 @@ See the module README for more information: https://github.com/Netflix/Hystrix/t ### Version 1.1.7 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.netflix.hystrix%22%20AND%20v%3A%221.1.7%22)) ### * [Pull 67](https://github.com/Netflix/Hystrix/pull/67) Unit tests for request log and checked exceptions -* [Pull 66](https://github.com/Netflix/Hystrix/pull/66) Making provided scope transtive +* [Pull 66](https://github.com/Netflix/Hystrix/pull/66) Making provided scope transitive * [Pull 65](https://github.com/Netflix/Hystrix/pull/65) Fixed gitignore definition of build output directories * [Issue 63](https://github.com/Netflix/Hystrix/issues/63) Add "throws Exception" to HystrixCommand run() method * [Pull 62](https://github.com/Netflix/Hystrix/pull/62) applying js fixes to threadPool ui * [Pull 61](https://github.com/Netflix/Hystrix/pull/61) Request log with timeouts -* [Issue 55](https://github.com/Netflix/Hystrix/issues/55) HysrixRequestLog: Missing Events and Time on Timeouts +* [Issue 55](https://github.com/Netflix/Hystrix/issues/55) HystrixRequestLog: Missing Events and Time on Timeouts * [Issue 20](https://github.com/Netflix/Hystrix/issues/20) TotalExecutionTime not tracked on queue() * [Pull 57](https://github.com/Netflix/Hystrix/pull/57) Dashboard js fix * [Issue 39](https://github.com/Netflix/Hystrix/issues/39) HystrixPlugins Bootstrapping Problem - Race Conditions diff --git a/hystrix-contrib/hystrix-clj/src/main/clojure/com/netflix/hystrix/core.clj b/hystrix-contrib/hystrix-clj/src/main/clojure/com/netflix/hystrix/core.clj index 3b3ad250a..83b96101b 100644 --- a/hystrix-contrib/hystrix-clj/src/main/clojure/com/netflix/hystrix/core.clj +++ b/hystrix-contrib/hystrix-clj/src/main/clojure/com/netflix/hystrix/core.clj @@ -18,7 +18,7 @@ Functions for defining and executing Hystrix dependency commands and collapsers. - The definition of commands and collapers is separated from their instantiation and execution. + The definition of commands and collapsers is separated from their instantiation and execution. They are represented as plain Clojure maps (see below) which are later instantiated into functional HystrixCommand or HystrixCollapser instances. defcommand and defcollapser macros are provided to assist in defining these maps. @@ -166,7 +166,7 @@ This is your escape hatch into raw Hystrix. Please see additional notes about :init-fn above. They apply to collapsers as well. - The com.netflix.hystric.core/defcollapser macro is a helper for defining this map and storing it + The com.netflix.hystrix.core/defcollapser macro is a helper for defining this map and storing it in a callable var. " (:require [clojure.set :as set]) @@ -299,7 +299,7 @@ :run-fn and :fallback-fn. It's occasionally useful, especially for fallbacks, to base the result on the state of - the comand. The fallback might vary based on whether it was triggered by an application + the command. The fallback might vary based on whether it was triggered by an application error versus a timeout. Note: As always with dynamic vars be careful about scoping. This binding only holds for @@ -494,7 +494,7 @@ ; The search collapser is now defined. It has a collapser key of \"my-namespace/search\". ; This is used for configuration and metrics. - ; Syncrhonously execute the search collapser + ; Synchronously execute the search collapser (search \"The Hudsucker Proxy\") ;=> [... vector of results ...] @@ -542,9 +542,9 @@ it provides. See: - com.neflix.hystrix.core/normalize - com.neflix.hystrix.core/execute - com.neflix.hystrix.core/queue + com.netflix.hystrix.core/normalize + com.netflix.hystrix.core/execute + com.netflix.hystrix.core/queue " {:arglists '[[defcommand-var & args] [defcollapser-var & args] diff --git a/hystrix-contrib/hystrix-codahale-metrics-publisher/src/test/java/com/netflix/hystrix/contrib/codahalemetricspublisher/ConfigurableCodaHaleMetricFilterTest.java b/hystrix-contrib/hystrix-codahale-metrics-publisher/src/test/java/com/netflix/hystrix/contrib/codahalemetricspublisher/ConfigurableCodaHaleMetricFilterTest.java index 565155aef..56ac3e331 100644 --- a/hystrix-contrib/hystrix-codahale-metrics-publisher/src/test/java/com/netflix/hystrix/contrib/codahalemetricspublisher/ConfigurableCodaHaleMetricFilterTest.java +++ b/hystrix-contrib/hystrix-codahale-metrics-publisher/src/test/java/com/netflix/hystrix/contrib/codahalemetricspublisher/ConfigurableCodaHaleMetricFilterTest.java @@ -40,7 +40,7 @@ public class ConfigurableCodaHaleMetricFilterTest { private Metric metric = mock(Metric.class); - private final static DynamicPropertyFactory archiausPropertyFactory = mock(DynamicPropertyFactory.class); + private final static DynamicPropertyFactory archaiusPropertyFactory = mock(DynamicPropertyFactory.class); private static final DynamicBooleanProperty DYNAMIC_BOOLEAN_TRUE = mock(DynamicBooleanProperty.class); private static final DynamicBooleanProperty DYNAMIC_BOOLEAN_FALSE = mock(DynamicBooleanProperty.class); @@ -48,8 +48,8 @@ public class ConfigurableCodaHaleMetricFilterTest { @BeforeClass public static void initialiseMocks() { - when(archiausPropertyFactory.getBooleanProperty(any(String.class), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_FALSE); - when(archiausPropertyFactory.getBooleanProperty(eq("this.metric.is.allowed"), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_TRUE); + when(archaiusPropertyFactory.getBooleanProperty(any(String.class), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_FALSE); + when(archaiusPropertyFactory.getBooleanProperty(eq("this.metric.is.allowed"), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_TRUE); when(DYNAMIC_BOOLEAN_TRUE.get()).thenReturn(true); when(DYNAMIC_BOOLEAN_FALSE.get()).thenReturn(false); } @@ -63,32 +63,32 @@ public void assertMetricsNotTouched() @Test public void testMetricConfiguredInFilterWithFilterEnabled() { - when(archiausPropertyFactory.getBooleanProperty(eq("filter.graphite.metrics"), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_TRUE); - ConfigurableCodaHaleMetricFilter filter = new ConfigurableCodaHaleMetricFilter(archiausPropertyFactory); + when(archaiusPropertyFactory.getBooleanProperty(eq("filter.graphite.metrics"), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_TRUE); + ConfigurableCodaHaleMetricFilter filter = new ConfigurableCodaHaleMetricFilter(archaiusPropertyFactory); assertTrue(filter.matches("this.metric.is.allowed", metric)); } @Test public void testMetricConfiguredInFilterWithFilterDisabled() { - when(archiausPropertyFactory.getBooleanProperty(eq("filter.graphite.metrics"), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_FALSE); - ConfigurableCodaHaleMetricFilter filter = new ConfigurableCodaHaleMetricFilter(archiausPropertyFactory); + when(archaiusPropertyFactory.getBooleanProperty(eq("filter.graphite.metrics"), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_FALSE); + ConfigurableCodaHaleMetricFilter filter = new ConfigurableCodaHaleMetricFilter(archaiusPropertyFactory); assertTrue(filter.matches("this.metric.is.allowed", metric)); } @Test public void testMetricNotConfiguredInFilterWithFilterEnabled() { - when(archiausPropertyFactory.getBooleanProperty(eq("filter.graphite.metrics"), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_TRUE); - ConfigurableCodaHaleMetricFilter filter = new ConfigurableCodaHaleMetricFilter(archiausPropertyFactory); + when(archaiusPropertyFactory.getBooleanProperty(eq("filter.graphite.metrics"), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_TRUE); + ConfigurableCodaHaleMetricFilter filter = new ConfigurableCodaHaleMetricFilter(archaiusPropertyFactory); assertFalse(filter.matches("this.metric.is.not.allowed", metric)); } @Test public void testMetricNotConfiguredInFilterWithFilterDisabled() { - when(archiausPropertyFactory.getBooleanProperty(eq("filter.graphite.metrics"), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_FALSE); - ConfigurableCodaHaleMetricFilter filter = new ConfigurableCodaHaleMetricFilter(archiausPropertyFactory); + when(archaiusPropertyFactory.getBooleanProperty(eq("filter.graphite.metrics"), any(Boolean.class))).thenReturn(DYNAMIC_BOOLEAN_FALSE); + ConfigurableCodaHaleMetricFilter filter = new ConfigurableCodaHaleMetricFilter(archaiusPropertyFactory); assertTrue(filter.matches("this.metric.is.not.allowed", metric)); } } diff --git a/hystrix-contrib/hystrix-javanica/README.md b/hystrix-contrib/hystrix-javanica/README.md index c6e11af91..a911eaaf8 100644 --- a/hystrix-contrib/hystrix-javanica/README.md +++ b/hystrix-contrib/hystrix-javanica/README.md @@ -54,7 +54,7 @@ More about Spring AOP + AspectJ read [here] (http://docs.spring.io/spring/docs/c ## Aspect weaving Javanica supports two weaving modes: implementation and runtime. Load time weaving hasn't been tested but it should work. If you tried LTW mode and got any problems then raise javanica issue or create pull request with fix. - CTW. To use CTW mode you need to use specific jar version: **hystrix-javanica-ctw-X.Y.Z** . This jar is assembled with aspects compiled with using [AJC](https://eclipse.org/aspectj/doc/next/devguide/ajc-ref.html) compiler. If you will try to use regular hystrix-javanica-X.Y.Z with CTW then you get ``` NoSuchMethodError aspectOf() ``` at runtime from building with iajc. Also, you need to start your app with using java property: ```-DWeavingMode=compile```. -**NOTE**: Javanica depends on aspectj library and uses internal features of aspectj and these features aren't provided as a part of open API thus it can change from version to version. Javanica tested with latest aspectj version 1.8.7. If you updated aspectj version and noticed any issues then please don't hestitate to create new issue or contribute. +**NOTE**: Javanica depends on aspectj library and uses internal features of aspectj and these features aren't provided as a part of open API thus it can change from version to version. Javanica tested with latest aspectj version 1.8.7. If you updated aspectj version and noticed any issues then please don't hesitate to create new issue or contribute. - RTW works, you can use regular hystrix-javanica-X.Y.Z - LTM hasn't been tested but it should work fine. diff --git a/hystrix-contrib/hystrix-javanica/build.gradle b/hystrix-contrib/hystrix-javanica/build.gradle index 2e1a0d3e7..1bcc437e8 100644 --- a/hystrix-contrib/hystrix-javanica/build.gradle +++ b/hystrix-contrib/hystrix-javanica/build.gradle @@ -74,7 +74,7 @@ check.dependsOn test, ajcTest ext { aspectjVersion = '1.8.6' - springframeworkVesion = '4.3.2.RELEASE' + springframeworkVersion = '4.3.2.RELEASE' } @@ -100,10 +100,10 @@ dependencies { testImplementation group: 'junit', name: 'junit', version: '4.12' testImplementation 'pl.pragmatists:JUnitParams:1.0.5' testImplementation project(':hystrix-junit') - testImplementation "org.springframework:spring-core:$springframeworkVesion" - testImplementation "org.springframework:spring-context:$springframeworkVesion" - testImplementation "org.springframework:spring-aop:$springframeworkVesion" - testImplementation "org.springframework:spring-test:$springframeworkVesion" + testImplementation "org.springframework:spring-core:$springframeworkVersion" + testImplementation "org.springframework:spring-context:$springframeworkVersion" + testImplementation "org.springframework:spring-aop:$springframeworkVersion" + testImplementation "org.springframework:spring-test:$springframeworkVersion" testImplementation 'cglib:cglib:3.1' testImplementation 'org.mockito:mockito-all:1.9.5' testImplementation 'log4j:log4j:1.2.17' diff --git a/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/AopUtils.java b/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/AopUtils.java index 14d17f64c..ea65dd9a6 100644 --- a/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/AopUtils.java +++ b/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/AopUtils.java @@ -79,7 +79,7 @@ public static Class[] getParameterTypes(JoinPoint joinPoint) { } /** - * Gets declared method from specified type by mame and parameters types. + * Gets declared method from specified type by name and parameters types. * * @param type the type * @param methodName the name of the method @@ -91,7 +91,7 @@ public static Method getDeclaredMethod(Class type, String methodName, Class superclass = type.getSuperclass(); diff --git a/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/FallbackMethod.java b/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/FallbackMethod.java index ebfce242a..fa850e697 100644 --- a/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/FallbackMethod.java +++ b/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/FallbackMethod.java @@ -99,7 +99,7 @@ public void validateReturnType(Method commandMethod) throws FallbackDefinitionEx if (ExecutionType.OBSERVABLE != getExecutionType()) { Type commandParametrizedType = commandMethod.getGenericReturnType(); - // basically any object can be wrapped into Completable, Completable itself ins't parametrized + // basically any object can be wrapped into Completable, Completable itself isn't parametrized if(Completable.class.isAssignableFrom(commandMethod.getReturnType())) { validateCompletableReturnType(commandMethod, method.getReturnType()); return; @@ -170,7 +170,7 @@ private void validateReturnType(Method commandMethod, Method fallbackMethod) { if (parentKindOpt.isPresent()) { Type parentKind = parentKindOpt.get(); if (isParametrizedType(parentKind)) { - extraHint = "--> " + ((ParameterizedType) parentKind).getRawType().toString() + "\n"; + extraHint = "--> " + ((ParameterizedType) parentKind).getRawType().toString() + "\n"; } } msg.add(String.format(error.reason + "\n" + extraHint + "Command type literal pos: %s; Fallback type literal pos: %s", diff --git a/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/MethodProvider.java b/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/MethodProvider.java index c5dbea20c..330d16e45 100644 --- a/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/MethodProvider.java +++ b/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/MethodProvider.java @@ -229,7 +229,7 @@ public static Optional getMethod(Class type, String name, Class... * @throws NoSuchMethodException * @throws ClassNotFoundException */ - public Method unbride(final Method bridgeMethod, Class aClass) throws IOException, NoSuchMethodException, ClassNotFoundException { + public Method unbridge(final Method bridgeMethod, Class aClass) throws IOException, NoSuchMethodException, ClassNotFoundException { if (bridgeMethod.isBridge() && bridgeMethod.isSynthetic()) { if (cache.containsKey(bridgeMethod)) { return cache.get(bridgeMethod); diff --git a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/util/bridge/UnbridgeMethodTest.java b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/util/bridge/UnbridgeMethodTest.java index 70bfb83dc..cbea036d5 100644 --- a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/util/bridge/UnbridgeMethodTest.java +++ b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/util/bridge/UnbridgeMethodTest.java @@ -36,7 +36,7 @@ public void testUnbridgeFoo() throws NoSuchMethodException, IOException, ClassNo Method bridgeMethod = getBridgeMethod(GenericInterfaceImpl.class, "foo"); assertNotNull(bridgeMethod); // when - Method genMethod = MethodProvider.getInstance().unbride(bridgeMethod, GenericInterfaceImpl.class); + Method genMethod = MethodProvider.getInstance().unbridge(bridgeMethod, GenericInterfaceImpl.class); // then assertNotNull(bridgeMethod); assertReturnType(Child.class, genMethod); diff --git a/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystrixConfigControllerTest.java b/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystrixConfigControllerTest.java index dcab3501c..b362e9c4a 100644 --- a/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystrixConfigControllerTest.java +++ b/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystrixConfigControllerTest.java @@ -19,7 +19,7 @@ * @author justinjose28 * */ -public class HystrixConfigControllerTest extends HystricsMetricsControllerTest { +public class HystrixConfigControllerTest extends HystrixMetricsControllerTest { @Override protected String getPath() { diff --git a/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystricsMetricsControllerTest.java b/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystrixMetricsControllerTest.java similarity index 97% rename from hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystricsMetricsControllerTest.java rename to hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystrixMetricsControllerTest.java index 8baf3272d..e038a7b68 100644 --- a/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystricsMetricsControllerTest.java +++ b/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystrixMetricsControllerTest.java @@ -50,7 +50,7 @@ * */ @Path("/hystrix") -public class HystricsMetricsControllerTest extends JerseyTest { +public class HystrixMetricsControllerTest extends JerseyTest { protected static final AtomicInteger requestCount = new AtomicInteger(0); @POST @@ -77,7 +77,7 @@ protected Application configure() { } catch (Exception e) { throw new RuntimeException("Failed to load config file"); } - return new ResourceConfig(HystricsMetricsControllerTest.class, HystrixStreamFeature.class); + return new ResourceConfig(HystrixMetricsControllerTest.class, HystrixStreamFeature.class); } protected String getPath() { diff --git a/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystrixUtilizationControllerTest.java b/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystrixUtilizationControllerTest.java index c4b92508e..531df4fab 100644 --- a/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystrixUtilizationControllerTest.java +++ b/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/src/test/java/com/netflix/hystrix/contrib/metrics/controller/HystrixUtilizationControllerTest.java @@ -19,7 +19,7 @@ * @author justinjose28 * */ -public class HystrixUtilizationControllerTest extends HystricsMetricsControllerTest { +public class HystrixUtilizationControllerTest extends HystrixMetricsControllerTest { @Override protected String getPath() { diff --git a/hystrix-contrib/hystrix-request-servlet/README.md b/hystrix-contrib/hystrix-request-servlet/README.md index c558b59ae..1669eea3a 100644 --- a/hystrix-contrib/hystrix-request-servlet/README.md +++ b/hystrix-contrib/hystrix-request-servlet/README.md @@ -48,7 +48,7 @@ You install it by adding the following to your web.xml: ### [HystrixRequestLogViaLoggerServletFilter](https://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix-request-servlet/src/main/java/com/netflix/hystrix/contrib/requestservlet/HystrixRequestLogViaLoggerServletFilter.java) -This logs an INFO message with the output from [HystrixRequestLog.getCurrentRequest().getExecutedCommandsAsString()](http://netflix.github.com/Hystrix/javadoc/com/netflix/hystrix/HystrixRequestLog.html#getExecutedCommandsAsString(\)) at the end of each requet. +This logs an INFO message with the output from [HystrixRequestLog.getCurrentRequest().getExecutedCommandsAsString()](http://netflix.github.com/Hystrix/javadoc/com/netflix/hystrix/HystrixRequestLog.html#getExecutedCommandsAsString(\)) at the end of each request. You install it by adding the following to your web.xml: diff --git a/hystrix-contrib/hystrix-request-servlet/src/main/java/com/netflix/hystrix/contrib/requestservlet/HystrixRequestLogViaLoggerServletFilter.java b/hystrix-contrib/hystrix-request-servlet/src/main/java/com/netflix/hystrix/contrib/requestservlet/HystrixRequestLogViaLoggerServletFilter.java index c34fa78d7..924a5526e 100644 --- a/hystrix-contrib/hystrix-request-servlet/src/main/java/com/netflix/hystrix/contrib/requestservlet/HystrixRequestLogViaLoggerServletFilter.java +++ b/hystrix-contrib/hystrix-request-servlet/src/main/java/com/netflix/hystrix/contrib/requestservlet/HystrixRequestLogViaLoggerServletFilter.java @@ -32,7 +32,7 @@ import com.netflix.hystrix.strategy.concurrency.HystrixRequestContext; /** - * Log an INFO message with the output from HystrixRequestLog.getCurrentRequest().getExecutedCommandsAsString() at the end of each requet. + * Log an INFO message with the output from HystrixRequestLog.getCurrentRequest().getExecutedCommandsAsString() at the end of each request. *

* A pre-requisite is that {@link HystrixRequestContext} is initialized, such as by using {@link HystrixRequestContextServletFilter}. *

diff --git a/hystrix-contrib/hystrix-servo-metrics-publisher/src/test/java/com/netflix/hystrix/contrib/servopublisher/HystrixServoMetricsPublisherCommandTest.java b/hystrix-contrib/hystrix-servo-metrics-publisher/src/test/java/com/netflix/hystrix/contrib/servopublisher/HystrixServoMetricsPublisherCommandTest.java index d50c48d34..7aaaf2418 100644 --- a/hystrix-contrib/hystrix-servo-metrics-publisher/src/test/java/com/netflix/hystrix/contrib/servopublisher/HystrixServoMetricsPublisherCommandTest.java +++ b/hystrix-contrib/hystrix-servo-metrics-publisher/src/test/java/com/netflix/hystrix/contrib/servopublisher/HystrixServoMetricsPublisherCommandTest.java @@ -123,7 +123,7 @@ public void testRollingCounters() throws Exception { assertEquals(4L, servoPublisher.getRollingMonitor("success", HystrixEventType.SUCCESS).getValue()); assertEquals(5L, servoPublisher.getRollingMonitor("timeout", HystrixEventType.TIMEOUT).getValue()); assertEquals(1L, servoPublisher.getRollingMonitor("failure", HystrixEventType.FAILURE).getValue()); - assertEquals(6L, servoPublisher.getRollingMonitor("falback_success", HystrixEventType.FALLBACK_SUCCESS).getValue()); + assertEquals(6L, servoPublisher.getRollingMonitor("fallback_success", HystrixEventType.FALLBACK_SUCCESS).getValue()); } @Test diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/AbstractCommand.java b/hystrix-core/src/main/java/com/netflix/hystrix/AbstractCommand.java index ad1f6544f..0f55c2f32 100644 --- a/hystrix-core/src/main/java/com/netflix/hystrix/AbstractCommand.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/AbstractCommand.java @@ -1288,7 +1288,7 @@ protected TryableSemaphore getExecutionSemaphore() { /** * @return {@link HystrixCommandGroupKey} used to group together multiple {@link AbstractCommand} objects. *

- * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interace with, + * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interface with, * common business purpose etc. */ public HystrixCommandGroupKey getCommandGroup() { @@ -1865,7 +1865,7 @@ public boolean isResponseFromCache() { } /** - * Whether the response received was a fallback as result of being rejected via sempahore + * Whether the response received was a fallback as result of being rejected via semaphore * * @return boolean */ diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/HystrixCommand.java b/hystrix-core/src/main/java/com/netflix/hystrix/HystrixCommand.java index dba1e3356..63f2fec62 100755 --- a/hystrix-core/src/main/java/com/netflix/hystrix/HystrixCommand.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/HystrixCommand.java @@ -177,7 +177,7 @@ final public static class Setter { * @param groupKey * {@link HystrixCommandGroupKey} used to group together multiple {@link HystrixCommand} objects. *

- * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interace + * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interface * with, * common business purpose etc. */ @@ -193,7 +193,7 @@ protected Setter(HystrixCommandGroupKey groupKey) { * @param groupKey * {@link HystrixCommandGroupKey} used to group together multiple {@link HystrixCommand} objects. *

- * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interace + * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interface * with, * common business purpose etc. */ diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/HystrixObservableCommand.java b/hystrix-core/src/main/java/com/netflix/hystrix/HystrixObservableCommand.java index fe4d08896..d40d6f029 100644 --- a/hystrix-core/src/main/java/com/netflix/hystrix/HystrixObservableCommand.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/HystrixObservableCommand.java @@ -42,7 +42,7 @@ public abstract class HystrixObservableCommand extends AbstractCommand imp * @param group * {@link HystrixCommandGroupKey} used to group together multiple {@link HystrixObservableCommand} objects. *

- * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interace with, + * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interface with, * common business purpose etc. */ protected HystrixObservableCommand(HystrixCommandGroupKey group) { @@ -152,7 +152,7 @@ final public static class Setter { * @param groupKey * {@link HystrixCommandGroupKey} used to group together multiple {@link HystrixObservableCommand} objects. *

- * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interace + * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interface * with, * common business purpose etc. */ @@ -171,7 +171,7 @@ protected Setter(HystrixCommandGroupKey groupKey) { * @param groupKey * {@link HystrixCommandGroupKey} used to group together multiple {@link HystrixObservableCommand} objects. *

- * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interace + * The {@link HystrixCommandGroupKey} is used to represent a common relationship between commands. For example, a library or team name, the system all related commands interface * with, * common business purpose etc. */ @@ -187,7 +187,7 @@ public static Setter withGroupKey(HystrixCommandGroupKey groupKey) { *

* NOTE: Every unique {@link HystrixCommandKey} will result in new instances of {@link HystrixCircuitBreaker}, {@link HystrixCommandMetrics} and {@link HystrixCommandProperties}. * Thus, - * the number of variants should be kept to a finite and reasonable number to avoid high-memory usage or memory leacks. + * the number of variants should be kept to a finite and reasonable number to avoid high-memory usage or memory leaks. *

* Hundreds of keys is fine, tens of thousands is probably not. * @return Setter for fluent interface via method chaining diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/HystrixThreadPool.java b/hystrix-core/src/main/java/com/netflix/hystrix/HystrixThreadPool.java index c68641dbf..0374e7cfc 100644 --- a/hystrix-core/src/main/java/com/netflix/hystrix/HystrixThreadPool.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/HystrixThreadPool.java @@ -42,7 +42,7 @@ *

* The pool should be sized large enough to handle normal healthy traffic but small enough that it will constrain concurrent execution if backend calls become latent. *

- * For more information see the Github Wiki: https://github.com/Netflix/Hystrix/wiki/Configuration#wiki-ThreadPool and https://github.com/Netflix/Hystrix/wiki/How-it-Works#wiki-Isolation + * For more information see the GitHub Wiki: https://github.com/Netflix/Hystrix/wiki/Configuration#wiki-ThreadPool and https://github.com/Netflix/Hystrix/wiki/How-it-Works#wiki-Isolation */ public interface HystrixThreadPool { diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/HystrixThreadPoolProperties.java b/hystrix-core/src/main/java/com/netflix/hystrix/HystrixThreadPoolProperties.java index 56f4e6307..7d0f63a0c 100644 --- a/hystrix-core/src/main/java/com/netflix/hystrix/HystrixThreadPoolProperties.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/HystrixThreadPoolProperties.java @@ -161,7 +161,7 @@ public HystrixProperty keepAliveTimeMinutes() { /** * Max queue size that gets passed to {@link BlockingQueue} in {@link HystrixConcurrencyStrategy#getBlockingQueue(int)} * - * This should only affect the instantiation of a threadpool - it is not eliglible to change a queue size on the fly. + * This should only affect the instantiation of a threadpool - it is not eligible to change a queue size on the fly. * For that, use {@link #queueSizeRejectionThreshold()}. * * @return {@code HystrixProperty} diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/metric/consumer/RollingCommandLatencyDistributionStream.java b/hystrix-core/src/main/java/com/netflix/hystrix/metric/consumer/RollingCommandLatencyDistributionStream.java index 4e4308e3e..e90a08e6c 100644 --- a/hystrix-core/src/main/java/com/netflix/hystrix/metric/consumer/RollingCommandLatencyDistributionStream.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/metric/consumer/RollingCommandLatencyDistributionStream.java @@ -44,7 +44,7 @@ * The distributions can be queried on 2 dimensions: * * Execution time or total time * ** Execution time is the time spent executing the user-provided execution method. - * ** Total time is the time spent from the perspecitve of the consumer, and includes all Hystrix bookkeeping. + * ** Total time is the time spent from the perspective of the consumer, and includes all Hystrix bookkeeping. */ public class RollingCommandLatencyDistributionStream extends RollingDistributionStream { private static final ConcurrentMap streams = new ConcurrentHashMap(); diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/metric/consumer/RollingCommandUserLatencyDistributionStream.java b/hystrix-core/src/main/java/com/netflix/hystrix/metric/consumer/RollingCommandUserLatencyDistributionStream.java index 003d81565..487e22a54 100644 --- a/hystrix-core/src/main/java/com/netflix/hystrix/metric/consumer/RollingCommandUserLatencyDistributionStream.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/metric/consumer/RollingCommandUserLatencyDistributionStream.java @@ -46,7 +46,7 @@ * The distributions can be queried on 2 dimensions: * * Execution time or total time * ** Execution time is the time spent executing the user-provided execution method. - * ** Total time is the time spent from the perspecitve of the consumer, and includes all Hystrix bookkeeping. + * ** Total time is the time spent from the perspective of the consumer, and includes all Hystrix bookkeeping. */ public class RollingCommandUserLatencyDistributionStream extends RollingDistributionStream { private static final ConcurrentMap streams = new ConcurrentHashMap(); diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixDynamicProperties.java b/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixDynamicProperties.java index 933b13e89..dbeb1ac52 100644 --- a/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixDynamicProperties.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixDynamicProperties.java @@ -22,7 +22,7 @@ * SPI allows for varying configuration sources. * * The HystrixPlugin singleton will load only one implementation of this SPI - * throught the {@link ServiceLoader} mechanism. + * through the {@link ServiceLoader} mechanism. * * @author agentgt * diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesChainedArchaiusProperty.java b/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesChainedArchaiusProperty.java index 3499055ea..b5bdde24c 100644 --- a/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesChainedArchaiusProperty.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesChainedArchaiusProperty.java @@ -110,7 +110,7 @@ public T get() { } /** - * @param r callback to execut + * @param r callback to execute */ public void addCallback(Runnable r) { callbacks.add(r); diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesChainedProperty.java b/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesChainedProperty.java index ea56d1e73..c9d187689 100644 --- a/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesChainedProperty.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesChainedProperty.java @@ -111,7 +111,7 @@ public T get() { } /** - * @param r callback to execut + * @param r callback to execute */ public void addCallback(Runnable r) { callbacks.add(r); diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixRollingNumber.java b/hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixRollingNumber.java index fbdc35b98..3fbac4c45 100644 --- a/hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixRollingNumber.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixRollingNumber.java @@ -52,7 +52,7 @@ public class HystrixRollingNumber { private final Time time; final int timeInMilliseconds; final int numberOfBuckets; - final int bucketSizeInMillseconds; + final int bucketSizeInMilliseconds; final BucketCircularArray buckets; private final CumulativeSum cumulativeSum = new CumulativeSum(); @@ -82,7 +82,7 @@ public HystrixRollingNumber(int timeInMilliseconds, int numberOfBuckets) { if (timeInMilliseconds % numberOfBuckets != 0) { throw new IllegalArgumentException("The timeInMilliseconds must divide equally into numberOfBuckets. For example 1000/10 is ok, 1000/11 is not."); } - this.bucketSizeInMillseconds = timeInMilliseconds / numberOfBuckets; + this.bucketSizeInMilliseconds = timeInMilliseconds / numberOfBuckets; buckets = new BucketCircularArray(numberOfBuckets); } @@ -262,7 +262,7 @@ public long getRollingMaxValue(HystrixRollingNumberEvent type) { * NOTE: This is thread-safe because it's accessing 'buckets' which is a LinkedBlockingDeque */ Bucket currentBucket = buckets.peekLast(); - if (currentBucket != null && currentTime < currentBucket.windowStart + this.bucketSizeInMillseconds) { + if (currentBucket != null && currentTime < currentBucket.windowStart + this.bucketSizeInMilliseconds) { // if we're within the bucket 'window of time' return the current one // NOTE: We do not worry if we are BEFORE the window in a weird case of where thread scheduling causes that to occur, // we'll just use the latest as long as we're not AFTER the window @@ -306,19 +306,19 @@ public long getRollingMaxValue(HystrixRollingNumberEvent type) { for (int i = 0; i < numberOfBuckets; i++) { // we have at least 1 bucket so retrieve it Bucket lastBucket = buckets.peekLast(); - if (currentTime < lastBucket.windowStart + this.bucketSizeInMillseconds) { + if (currentTime < lastBucket.windowStart + this.bucketSizeInMilliseconds) { // if we're within the bucket 'window of time' return the current one // NOTE: We do not worry if we are BEFORE the window in a weird case of where thread scheduling causes that to occur, // we'll just use the latest as long as we're not AFTER the window return lastBucket; - } else if (currentTime - (lastBucket.windowStart + this.bucketSizeInMillseconds) > timeInMilliseconds) { + } else if (currentTime - (lastBucket.windowStart + this.bucketSizeInMilliseconds) > timeInMilliseconds) { // the time passed is greater than the entire rolling counter so we want to clear it all and start from scratch reset(); // recursively call getCurrentBucket which will create a new bucket and return it return getCurrentBucket(); } else { // we're past the window so we need to create a new bucket // create a new bucket and add it as the new 'last' - buckets.addLast(new Bucket(lastBucket.windowStart + this.bucketSizeInMillseconds)); + buckets.addLast(new Bucket(lastBucket.windowStart + this.bucketSizeInMilliseconds)); // add the lastBucket values to the cumulativeSum cumulativeSum.addBucket(lastBucket); } diff --git a/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCollapserTest.java b/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCollapserTest.java index 78fee72e9..da14abee0 100644 --- a/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCollapserTest.java +++ b/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCollapserTest.java @@ -2117,7 +2117,7 @@ public Reference addListener(final TimerListener collapseTask) { * This is a hack that overrides 'clear' of a WeakReference to match the required API * but then removes the strong-reference we have inside 'tasks'. *

- * We do this so our unit tests know if the WeakReference is cleared correctly, and if so then the ATack is removed from 'tasks' + * We do this so our unit tests know if the WeakReference is cleared correctly, and if so then the ATask is removed from 'tasks' */ return new SoftReference(collapseTask) { @Override diff --git a/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandMetricsTest.java b/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandMetricsTest.java index a7ba1eb11..3c0007bb0 100644 --- a/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandMetricsTest.java +++ b/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandMetricsTest.java @@ -175,7 +175,7 @@ public void onCompleted() { @Override public void onError(Throwable e) { - System.out.println("Error duing command execution"); + System.out.println("Error doing command execution"); e.printStackTrace(); latch.countDown(); } diff --git a/hystrix-core/src/test/java/com/netflix/hystrix/HystrixObservableCommandTest.java b/hystrix-core/src/test/java/com/netflix/hystrix/HystrixObservableCommandTest.java index f455f6bad..3539a9ff0 100644 --- a/hystrix-core/src/test/java/com/netflix/hystrix/HystrixObservableCommandTest.java +++ b/hystrix-core/src/test/java/com/netflix/hystrix/HystrixObservableCommandTest.java @@ -425,7 +425,7 @@ public void testSemaphoreIsolatedObserveSyncFailureWithAsyncFallbackFailure() { * Test a command execution that fails asynchronously, has getFallback implemented but that fails as well (synchronously). */ @Test - public void testSemaphoreIsolatedObserveAyncFailureWithSyncFallbackFailure() { + public void testSemaphoreIsolatedObserveAsyncFailureWithSyncFallbackFailure() { testObserveFailureWithFallbackFailure(ExecutionIsolationStrategy.SEMAPHORE, true, false); } @@ -457,7 +457,7 @@ public void testThreadIsolatedObserveSyncFailureWithAsyncFallbackFailure() { * Test a command execution that fails asynchronously, has getFallback implemented but that fails as well (synchronously). */ @Test - public void testThreadIsolatedObserveAyncFailureWithSyncFallbackFailure() { + public void testThreadIsolatedObserveAsyncFailureWithSyncFallbackFailure() { testObserveFailureWithFallbackFailure(ExecutionIsolationStrategy.THREAD, false, true); } @@ -1818,7 +1818,7 @@ private void testBadRequestExceptionObserve(ExecutionIsolationStrategy isolation * Test that synchronous BadRequestException behavior works the same on a cached response for a semaphore-isolated command. */ @Test - public void testSyncBadRequestExceptionOnResponseFromCacheInSempahore() { + public void testSyncBadRequestExceptionOnResponseFromCacheInSemaphore() { testBadRequestExceptionOnResponseFromCache(ExecutionIsolationStrategy.SEMAPHORE, KnownHystrixBadRequestFailureTestCommand.SYNC_EXCEPTION); } diff --git a/hystrix-core/src/test/java/com/netflix/hystrix/HystrixThreadPoolPropertiesTest.java b/hystrix-core/src/test/java/com/netflix/hystrix/HystrixThreadPoolPropertiesTest.java index c1a7da2e9..a492d8fd1 100644 --- a/hystrix-core/src/test/java/com/netflix/hystrix/HystrixThreadPoolPropertiesTest.java +++ b/hystrix-core/src/test/java/com/netflix/hystrix/HystrixThreadPoolPropertiesTest.java @@ -34,7 +34,7 @@ public class HystrixThreadPoolPropertiesTest { .withMaximumSize(15) //maximum size of thread pool .withKeepAliveTimeMinutes(1)// minutes to keep a thread alive (though in practice this doesn't get used as by default we set a fixed size) .withMaxQueueSize(100)// size of queue (but we never allow it to grow this big ... this can't be dynamically changed so we use 'queueSizeRejectionThreshold' to artificially limit and reject) - .withQueueSizeRejectionThreshold(10)// number of items in queue at which point we reject (this can be dyamically changed) + .withQueueSizeRejectionThreshold(10)// number of items in queue at which point we reject (this can be dynamically changed) .withMetricsRollingStatisticalWindowInMilliseconds(10000)// milliseconds for rolling number .withMetricsRollingStatisticalWindowBuckets(10);// number of buckets in rolling number (10 1-second buckets) } diff --git a/hystrix-core/src/test/java/com/netflix/hystrix/strategy/concurrency/HystrixConcurrencyStrategyTest.java b/hystrix-core/src/test/java/com/netflix/hystrix/strategy/concurrency/HystrixConcurrencyStrategyTest.java index 2fd4d37f5..00e55e68b 100644 --- a/hystrix-core/src/test/java/com/netflix/hystrix/strategy/concurrency/HystrixConcurrencyStrategyTest.java +++ b/hystrix-core/src/test/java/com/netflix/hystrix/strategy/concurrency/HystrixConcurrencyStrategyTest.java @@ -109,7 +109,7 @@ public void call(Throwable throwable) { } @Test - public void testNoRequestContextOnSimpleConcurencyStrategyWithoutException() throws Exception { + public void testNoRequestContextOnSimpleConcurrencyStrategyWithoutException() throws Exception { shutdownContextIfExists(); ConfigurationManager.getConfigInstance().setProperty("hystrix.command.default.requestLog.enabled", "false"); diff --git a/hystrix-core/src/test/java/com/netflix/hystrix/util/HystrixRollingNumberTest.java b/hystrix-core/src/test/java/com/netflix/hystrix/util/HystrixRollingNumberTest.java index 895fc184c..bd78e97ca 100644 --- a/hystrix-core/src/test/java/com/netflix/hystrix/util/HystrixRollingNumberTest.java +++ b/hystrix-core/src/test/java/com/netflix/hystrix/util/HystrixRollingNumberTest.java @@ -34,7 +34,7 @@ public void testCreatesBuckets() { // confirm the initial settings assertEquals(200, counter.timeInMilliseconds); assertEquals(10, counter.numberOfBuckets); - assertEquals(20, counter.bucketSizeInMillseconds); + assertEquals(20, counter.bucketSizeInMilliseconds); // we start out with 0 buckets in the queue assertEquals(0, counter.buckets.size()); @@ -42,7 +42,7 @@ public void testCreatesBuckets() { // add a success in each interval which should result in all 10 buckets being created with 1 success in each for (int i = 0; i < counter.numberOfBuckets; i++) { counter.increment(HystrixRollingNumberEvent.SUCCESS); - time.increment(counter.bucketSizeInMillseconds); + time.increment(counter.bucketSizeInMilliseconds); } // confirm we have all 10 buckets @@ -101,7 +101,7 @@ public void testEmptyBucketsFillIn() { assertEquals(1, counter.buckets.size()); // wait past 3 bucket time periods (the 1st bucket then 2 empty ones) - time.increment(counter.bucketSizeInMillseconds * 3); + time.increment(counter.bucketSizeInMilliseconds * 3); // add another counter.increment(HystrixRollingNumberEvent.SUCCESS); @@ -161,9 +161,9 @@ public void testTimeout() { assertEquals(1, counter.getRollingSum(HystrixRollingNumberEvent.TIMEOUT)); // sleep to get to a new bucket - time.increment(counter.bucketSizeInMillseconds * 3); + time.increment(counter.bucketSizeInMilliseconds * 3); - // incremenet again in latest bucket + // increment again in latest bucket counter.increment(HystrixRollingNumberEvent.TIMEOUT); // we should have 4 buckets @@ -198,9 +198,9 @@ public void testShortCircuited() { assertEquals(1, counter.getRollingSum(HystrixRollingNumberEvent.SHORT_CIRCUITED)); // sleep to get to a new bucket - time.increment(counter.bucketSizeInMillseconds * 3); + time.increment(counter.bucketSizeInMilliseconds * 3); - // incremenet again in latest bucket + // increment again in latest bucket counter.increment(HystrixRollingNumberEvent.SHORT_CIRCUITED); // we should have 4 buckets @@ -254,7 +254,7 @@ private void testCounterType(HystrixRollingNumberEvent type) { assertEquals(1, counter.getRollingSum(type)); // sleep to get to a new bucket - time.increment(counter.bucketSizeInMillseconds * 3); + time.increment(counter.bucketSizeInMilliseconds * 3); // increment again in latest bucket counter.increment(type); @@ -292,7 +292,7 @@ public void testIncrementInMultipleBuckets() { counter.increment(HystrixRollingNumberEvent.SHORT_CIRCUITED); // sleep to get to a new bucket - time.increment(counter.bucketSizeInMillseconds * 3); + time.increment(counter.bucketSizeInMilliseconds * 3); // increment counter.increment(HystrixRollingNumberEvent.SUCCESS); @@ -350,7 +350,7 @@ public void testCounterRetrievalRefreshesBuckets() { counter.increment(HystrixRollingNumberEvent.FAILURE); // sleep to get to a new bucket - time.increment(counter.bucketSizeInMillseconds * 3); + time.increment(counter.bucketSizeInMilliseconds * 3); // we should have 1 bucket since nothing has triggered the update of buckets in the elapsed time assertEquals(1, counter.buckets.size()); @@ -399,7 +399,7 @@ public void testUpdateMax1() { assertEquals(10, counter.getRollingMaxValue(HystrixRollingNumberEvent.THREAD_MAX_ACTIVE)); // sleep to get to a new bucket - time.increment(counter.bucketSizeInMillseconds * 3); + time.increment(counter.bucketSizeInMilliseconds * 3); // increment again in latest bucket counter.updateRollingMax(HystrixRollingNumberEvent.THREAD_MAX_ACTIVE, 20); @@ -442,7 +442,7 @@ public void testUpdateMax2() { assertEquals(30, counter.getRollingMaxValue(HystrixRollingNumberEvent.THREAD_MAX_ACTIVE)); // sleep to get to a new bucket - time.increment(counter.bucketSizeInMillseconds * 3); + time.increment(counter.bucketSizeInMilliseconds * 3); counter.updateRollingMax(HystrixRollingNumberEvent.THREAD_MAX_ACTIVE, 30); counter.updateRollingMax(HystrixRollingNumberEvent.THREAD_MAX_ACTIVE, 30); @@ -479,17 +479,17 @@ public void testMaxValue() { counter.updateRollingMax(type, 10); // sleep to get to a new bucket - time.increment(counter.bucketSizeInMillseconds); + time.increment(counter.bucketSizeInMilliseconds); counter.updateRollingMax(type, 30); // sleep to get to a new bucket - time.increment(counter.bucketSizeInMillseconds); + time.increment(counter.bucketSizeInMilliseconds); counter.updateRollingMax(type, 40); // sleep to get to a new bucket - time.increment(counter.bucketSizeInMillseconds); + time.increment(counter.bucketSizeInMilliseconds); counter.updateRollingMax(type, 15); @@ -535,7 +535,7 @@ public void testRolling() { // first bucket counter.getCurrentBucket(); try { - time.increment(counter.bucketSizeInMillseconds); + time.increment(counter.bucketSizeInMilliseconds); } catch (Exception e) { // ignore } @@ -562,7 +562,7 @@ public void testCumulativeCounterAfterRolling() { // first bucket counter.increment(type); try { - time.increment(counter.bucketSizeInMillseconds); + time.increment(counter.bucketSizeInMilliseconds); } catch (Exception e) { // ignore } @@ -590,7 +590,7 @@ public void testCumulativeCounterAfterRollingAndReset() { // first bucket counter.increment(type); try { - time.increment(counter.bucketSizeInMillseconds); + time.increment(counter.bucketSizeInMilliseconds); } catch (Exception e) { // ignore } @@ -625,7 +625,7 @@ public void testCumulativeCounterAfterRollingAndReset2() { // iterate over 20 buckets on a queue sized for 2 for (int i = 0; i < 20; i++) { try { - time.increment(counter.bucketSizeInMillseconds); + time.increment(counter.bucketSizeInMilliseconds); } catch (Exception e) { // ignore } @@ -660,7 +660,7 @@ public void testCumulativeCounterAfterRollingAndReset3() { // iterate over 20 buckets on a queue sized for 2 for (int i = 0; i < 20; i++) { try { - time.increment(counter.bucketSizeInMillseconds); + time.increment(counter.bucketSizeInMilliseconds); } catch (Exception e) { // ignore } diff --git a/hystrix-serialization/build.gradle b/hystrix-serialization/build.gradle index e1e36388a..f5a58e269 100644 --- a/hystrix-serialization/build.gradle +++ b/hystrix-serialization/build.gradle @@ -6,7 +6,7 @@ repositories { dependencies { api project(':hystrix-core') - //if we bump into the the 2.8.0 series, we are forced to use Java7 + //if we bump into the 2.8.0 series, we are forced to use Java7 api 'com.fasterxml.jackson.core:jackson-core:2.7.5' api 'com.fasterxml.jackson.core:jackson-databind:2.7.5' api 'com.fasterxml.jackson.core:jackson-annotations:2.7.5'