Releases: twitter/util
Releases · twitter/util
Util 6.35.0
Changes in Runtime Behavior:
- util-codec: StringEncoder no longer depends on apache commons-codec, and
decode will now throw an exception when it fails to decode a byte, instead
of failing silently.RB_ID=833478 - util-collection: LruMap is now backed by jdk LinkedHashMap instead of apache
collections LRUMap.RB_ID=833515 - util-core:
com.twitter.util.NonFatalis now implemented by Scala's
scala.util.control.NonFatal. This changes behavior such that
java.lang.StackOverflowErroris considered fatal and
java.lang.NoSuchMethodExceptionis considered non-fatal.
RB_ID=835671
New Features:
- util-app:
com.twitter.finagle.util.LoadServicehas been moved to
c.t.app.LoadServiceand can now be used without needing a finagle-core
dependency.RB_ID=829897 - util-cache: Adds support for Caffeine-style caches.
RB_ID=833848 - util-core: Add
c.t.concurrent.Scheduler.blockingTimeNanoswhich tracks time spent doing
blocking operations.RB_ID=828289 - util-core: Reduced allocations by 40% and latency by 18% of satisfying
Promises.
RB_ID=832816 - util-core:
c.t.util.NoStacktraceis removed. Usescala.util.control.NoStackTraceinstead.
RB_ID=833188 - util-core: Add
Future.joinWiththat also accepts a function(A, B) => Cfor mapping
a joined result.RB_ID=838169 - util-core: Add
Future.by(Time), complementary to the existingFuture.within(Duration)
RB_ID=838169 - util-core: Add
c.t.util.ProxyTimerwhich allows for creating proxy based
Timersoutside of thecom.twitter.utilpackage.RB_ID=846194 - util-core: Add
AsyncStream.mergemerge potentially inifite streams
RB_ID=846681 - util-security: Added new project.
RB_ID=843070
API Changes:
- Builds are now only for Java 8 and Scala 2.11. See the
blog post <https://finagle.github.io/blog/2016/04/20/scala-210-and-java7/>_
for details.RB_ID=828898 - util-core:
c.t.u.Bijectionis removed. usec.t.bijection.Bijection
(https://github.com/twitter/bijection) instead.RB_ID=834383 - util-core: Deprecated method
Future.get()has been removed because it made it
too easy to hide blocking code. Replaced usage with the more explicit
com.twitter.util.Await.result(Future).RB_ID=833579 - util-core: Deprecated method
Future.get(Duration): Tryhas been removed because it
made it too easy to hide blocking code. Replaced usage with the more explicit
com.twitter.util.Await.result(Future.liftToTry).RB_ID=836066 - util-core: Deprecated methods
Future.isReturnandFuture.isThrowhave been
removed because they made it too easy to hide blocking code. Replaced usage with
the more explicitAwait.result(Future.liftToTry).isReturnand
Await.result(Future.liftToTry).isThrow.RB_ID=837329 - util-lint: Added methods
com.twitter.util.lint.Rules.removeById(String)and
com.twitter.util.lint.RulesImpl.removeById(String)so that it is now possible
to remove acom.twitter.util.lint.Rulefrom thecom.twitter.util.lint.GlobalRules
set.RB_ID=840753
Bug Fixes:
- util-core: AsyncMeter had a bug where if the burst size was smaller than
the number of disbursed tokens, it would discard all of the tokens over
the disbursal limit. Changed to instead process tokens in the wait queue
with leftover tokens. This improves behavior where the actual period is
smaller than can actually be simulated with the given timer.RB_ID=836742 - util-core: Once didn't actually provide the guarantee it tried to, because
of an issue with the scala compiler,
https://issues.scala-lang.org/browse/SI-9814. It should now actually be
synchronized.RB_ID=842245 - util-zk: Fixed race when an existing permit is released between the time
the list was gotten and the data was checked.RB_ID=835856 - util-core: Memoize apply now throws IllegalStateException if a thread
re-enters with identical input parameters instead of deadlocking.
Util 6.34.0
Note: This is the final release that will support Scala 2.10 and Java 7.
New Features:
- util-core: Add
Throwables.uncheckedto help Java users deal with checked
exceptions.RB_ID=811441 - util-stats: Can now get from a
com.twitter.finagle.stats.StatsReceiverto all "leaf"
StatsReceivers that don't delegate to another StatsReceiver with
com.twitter.finagle.stats.DelegatingStatsReceiver.all.RB_ID=819519
API Changes:
- util-core: Removed deprecated methods from Buf.scala
RB_ID=809948- Removed
c.t.io.Buf.ByteArray.apply, replace usage withBuf.ByteArray.Owned.apply. - Removed
c.t.io.Buf.ByteArray.unapply, replace usage withBuf.ByteArray.Owned.unapply. - Removed
c.t.io.Buf.ByteBuffer.apply, replace usage withBuf.ByteBuffer.Owned.apply. - Removed
c.t.io.Buf.toByteBuffer, replace usage withBuf.ByteBuffer.Owned.extract.
- Removed
- util-core: Removed deprecated
Future.applymethodsRB_ID=811617 - util-stats: Removed
com.twitter.finagle.stats.BroadcastStatsReceivermarker trait in favor of
com.twiter.finagle.stats.DelegatingStatsReceivermarker trait, which lets us specify that we
only delegate to a singlecom.twitter.finagle.stats.StatsReceiver.RB_ID=819519 - util-zk-common: Removed
com.twitter.zk.ServerSet. Use implementations of ServerSets in the
finagle-serversets project.RB_ID=821355
Bug Fixes:
- util-core: Fix memory leak in
Var.apply(T, Event[T])andVar.patch.
RB_ID=809100
Util 6.33.0
New Features:
- util-core: AsyncSemaphore supports closing and draining of waiters via
fail.RB_ID=807590 - util-core: Add convenience methods
force,size,sum, andwithEffecttoAsyncStream.
RB_ID=808411
Bug Fixes:
- util-core: Fix nested functions
AsyncStream.++to avoid stack overflow.RB_ID=804408
Deprecations:
- util-core:
Future.rawExceptionis deprecated in favor ofFuture.exception.
RB_ID=798223
Util 6.32.0
New Features:
- util-core: Add
Future.traverseSequentially. Take a sequence and sequentially apply a function
A => Future[B] to each item.RB_ID=785091
Util 6.30.0
New Features:
- util-core: Introduce an
AsyncMeterfor asynchronously rate limiting to a fixed rate over time.
It can be used for smoothing out bursty traffic, or for slowing down access to a
resource.RB_ID=756333 - util-core: Introduce a
TokenBucketfor helping to control the relative rates of two processes,
or for smoothing out the rate of a single process.RB_ID=756333
API Changes:
- util-core:
Timernow has final implementations forschedulewhich delegate
to new protectedscheduleOnceandschedulePeriodicallymethods. This is
done to ensure thatLocalsare captured when the task is scheduled and
then used when the task is run. ExistingTimerimplementations should rename
their existingschedulemethods to work with the new interface.RB_ID=755387 - util-core: Remove deprecated
FuturePool.defaultPool, callers should
useFuturePool.unboundedPoolinstead.RB_ID=757499 - util-stats: Remove deprecated methods on
com.twitter.finagle.stats.StatsReceiver.
RB_ID=757414 - util-core:
AsyncStreamgraduates out ofcom.twitter.concurrent.expinto
com.twitter.concurrent. Backwards compatibility aliases remain for Scala
users, but Java users will need to update their imports.RB_ID=758061 - util-codec: Add a new encoder
com.twitter.util.Base64UrlSafeStringEncoder
which extends fromcom.twitter.util.Base64StringEncoder. Both the url-safe
and non-url-safe encoders can decode all strings generated by either.RB_ID=765189 - util-core: Remove unnecessary
invalidatemethod from util-cache's
com.twitter.cache.guava.LoadingFutureCache, and change theremovesemantic
to match thecom.twitter.cache.FutureCachecontract.RB_ID=766988 - util-core: Remove protected
Timer.monitor(overrides a monitor to use by a
timer implementation) because any possible implementation rather thanMonitor.get
promotes memory leaks when timer is used to schedule recursive tasks (tasks that
reschedules themselves).RB_ID=771736
Util 6.29.0
New Features:
- util-core: Introduce an optional max capacity to
AsyncQueue.
ModifiedAsyncQueue.offerto return a boolean indicating whether or not the
item was accepted. AddedAsyncQueue.drain(): Try[Queue]. ``RB_ID=745567`
API Changes:
- util-core: Remove deprecated methods from
com.twitter.util.Timeand
com.twitter.util.Duration.RB_ID=751771 - util-core: Provide methods on
Stopwatchso that users can take advantage of
Timemanipulation tools in latency-sensitive code when measuring elapsed
time.RB_ID=75268
Changes in Runtime Behavior:
- util-core: The Scheduler clock stats were decommissioned as they only make sense
relative towallTimeand the tracking error we have experiencedwallTimeand
*Timemake it impossible to use them reliably. It is not worth the performance
and code complexity to support them.RB_ID=750239 - util-core:
JavaTimerandScheduledThreadPoolTimernow capture theLocal
state when scheduled and is used along with thatMonitorwhen theTimerTask
is run.RB_ID=755387 - util-logging:
QueueingHandlerdoes not create a separate thread per instance.
``RB_ID=745567`
Util 6.28.0
API Changes:
-
util-core: Remove deprecated methods from
com.twitter.util.Var.To migrate
observeandforeach, givenaVar.observe { t => somethingWith(t) }
you would writeaVar.changes.register(Witness({ t => somethingWith(t) })).To migrate
observeUntil, givenaVar.observeUntil(_ == something),
you would writeaVar.changes.filter(_ == something).toFuture().To migrate
observeTo, givenaVar.observeTo(anAtomicReference),
you would writeaVar.changes.register(Witness(anAtomicReference)).RB_ID=744282
Util 6.27.0
API Changes:
- util-core:
TimeFormatoptionally takes aTimeZonein the constructor.
If not provided, it uses UTC.
Util 6.26.0
API Changes:
- util-core:
Activity,BoundedStack,RingBufferandVarmigrated
off of deprecatedClassManifesttoClassTag.RB_ID=720455 - util-core: Added Spool#zip
- util-core: Removed deprecated methods
Future.voidandFuture$.void().
UseFuture.voidedandFuture$.Voidinstead.RB_ID=720427
Changes in Runtime Behavior:
- util-core:
Promise.forwardInterruptsTo(other)is a no-op if the
other future is fulfilled.RB_ID=714420 - util-events: Recording of events is disabled by default and can be updated
at runtime via TwitterServer's/admin/eventspage or
/admin/events/{recordOn,recordOff}.RB_ID=715712
Util 6.25.0
Changes in Runtime Behavior:
- util-events: Enable event sink by default.