Releases: twitter/util
Util 7.0.0
New Features:
-
util-core: Added
c.t.util.SlowProbeProxyTimer
for monitoring the duration
of execution for timer tasks.PHAB_ID=D70279
-
util-core: Introduced RootMonitor#set to set custom Monitor to RootMonitor.
PHAB_ID=D70876
-
util-jvm:
JvmStats
has been moved here from TwitterServer allowing broader
access to many metrics including GC, allocations, memory, and more.
PHAB_ID=D80883
-
util-stats: Introducing Verbosity Levels for StatsReceivers (see docs on
StatsReceiver
for more info).PHAB_ID=D70112
-
util-tunable:
c.t.u.tunable.Tunable
,c.t.u.tunable.TunableMap
,
c.t.u.tunable.JsonTunableMapper
, andc.t.u.tunable.ServiceLoadedTunableMap
are now public.
This allows users to create and use Tunables, a mechanism for accessing dynamically
configured values. See https://twitter.github.io/finagle/guide/Configuration.html#tunables
for details on how these can be used in Finagle.PHAB_ID=D80751
.
Bug Fixes:
- util-core: Fix some consistency issues with
c.t.util.ByteReaderImpl
. Advance its
cursor by the number of bytes consumed viareadBytes(Int)
, not the number specified
as a method argument.readString
will now throw an UnderflowException if the number
of bytes specified exceeds the remaining buffer length instead of silently making due
with the rest of the buffer's contents.PHAB_ID=D78301
Runtime Behavior Changes:
-
util-core:
c.t.util.Closable.sequence
now continues processing
theClosables
should any of their closes result in a failedFuture
and will return the first failure. Synchronous exceptions are now
handled by lifting them into failedFutures
.PHAB_ID=D62418
-
util-events:
com.twitter.util.events.sinkEnabled
now defaults to false
in preparation for removal in an upcoming release.PHAB_ID=D64437
API Changes:
-
util-core: ByteWriter has been transformed into a true trait which can now
be implemented outside of the com.twitter.io package.PHAB_ID=D59996
-
util-core: The method ByteWriter.owned() has been moved to a sub trait,
BufByteWriter, to separate the notion of the target buffer representation from the
writer methods in order to make it easier to target different buffer representations.
PHAB_ID=D61215
-
util-stats:
PHAB_ID=D59762
ProxyStatsReceiver.self
is now protected (was public before).StatsReceiver.repr
is nowdef
(wasval
before).
-
util-stats:
Counter#add
now takes aLong
instead of anInteger
as an argument.
PHAB_ID=D69064
-
util-stats:
StatsReceiver#counter
,StatsReceiver#stat
, andStatsReceiver.addGauge
now may optionally takec.t.f.stats.Verbosity
as a first argument.PHAB_ID=D70112
Deprecations:
-
util-events: This module is deprecated and will be removed in an upcoming
release.PHAB_ID=D64437
-
util-stats:
PHAB_ID=D62611
StatsReceiver.counter0
is deprecated in favour of varargStatsReceiver.counter
StatsReceiver.stat0
is deprecated in favour of varargStatsReceiver.stat
Util 6.45.0
New Features:
-
util-app: Optional resource shutdown sequencing for registered closables
viac.t.app.App#closeOnExitLast
. See longer note there for usage.
RB_ID=916120
-
util-core: Added
writeBytes(Buf)
to the ByteWriter abstract class to allow
for efficient writing of thec.t.io.Buf
type.RB_ID=917094
-
util-core: Added
ByteReader.readUnsignedLongBE
andByteReader.readUnsignedLongLE
.
RB_ID=917289
API Changes:
-
util-collection: Removed deprecated
c.t.u.JMapWrapper
. Use
scala.collection.JavaConverters
instead.RB_ID=915544
-
util-core: ByteReader extends the AutoClosable interface to provide
a notion of resource management. Users should ensure that instances
of the ByteReader interface are closed after they are no longer
needed.RB_ID=916086
-
util-core: Removed deprecated methods from
c.t.u.Future
:rawException
; useexception
insteadcancel
; useraise
instead
Removed deprecated
c.t.u.Futures.select
; useFuture.select
instead.
Remove deprecatedflatten
method onc.t.u.Future
; useFutures.flatten
instead.
RB_ID=915500
-
util-core: Removed deprecated
c.t.u.LongOverflowException
. Use
java.lang.ArithmeticException
instead. Removed deprecated
c.t.u.LongOverflowArith
and all methods on it:
-add
; use Java 8'sMath.addExact
instead
-sub
; use Java 8'sMath.subtractExact
instead
-mul
; use Java 8'sMath.multiplyExact
instead
RB_ID=915545
-
util-core: Removed deprecated
c.t.concurrent.exp.AsyncStream
. Use
c.t.concurrent.AsyncStream
instead.RB_ID=916422
-
util-eval: Removed from the project.
RB_ID=915430
https://finagle.github.io/blog/2017/04/06/announce-removals/
Runtime Behavior Changes:
- util-core: All
Timers
now handle negative or undefined times/durations in uniform way:
treat them as zeros (i.e.,Time.epoch
,Duration.Zero
).RB_ID=916008
Util 6.43.0
Runtime Behavior Changes:
-
util-core:
Closable.all(..)
will now catch synchronous exceptions thrown
by anyClosable.close(..)
invocations, and wrap them in a failed Future.
RB_ID=914859
-
util-stats: InMemoryStatsReceiver's
gauges
member is now safe for
concurrent iteration but now holds strong references to gauge instances.
RB_ID=911951
New Features:
- util-core:
c.t.f.u.BufReader
andc.t.f.u.BufWriter
have been
moved from finagle-core to util-core and renamed to
c.t.io.ByteReader
andc.t.io.ByteWriter
respectively. They
are now also exposed publicly.RB_ID=911639
API Changes:
-
util: util-zk-commons was removed, since it was only a connector between
util and commons, which was not widely used.RB_Id=910721
-
util-core: AsyncQueue's
size
method is now final whileoffer
andfail
are no longer final.RB_ID=914191
Util 6.42.0
New Features:
- util-core: Promoted the positional
Buf.Indexed
API to be a first-class
part ofc.t.io.Buf
. If you have a custom implementation ofBuf
it
will require some effort to become compatible.RB_ID=907231
API Changes:
-
util-app: Set failFastUntilParsed on created flag added to
c.t.app.Flags
viac.t.app.Flags#add
.RB_ID=908804
-
util-core: Remove deprecated
c.t.io.ConcatBuf
which is replaced by
c.t.io.Buf.apply(Iterable[Buf])
.RB_ID=907180
-
util-core: Remove deprecated
c.t.util.RingBuffer
. Use Guava's
EvictingQueue
.RB_ID=907516
-
util-core: Remove deprecated
c.t.concurrent.ConcurrentPool
. Prefer
Finagle'sc.t.f.pool.BufferingPool
.RB_ID=907516
-
util-core: Remove deprecated
c.t.concurrent.ConcurrentMultiMap
. Prefer
Guava's Multimap.RB_ID=907516
Dependencies:
- util: Bump guava to 19.0.
RB_ID=907807
Util 6.41.0
New Features
- util-core: Add Java-friendly API to Scala.java for converting from
a Java 8Optional
to a ScalaOption
.RB_ID=906512
- util-core: Introduced a positional
Buf
API,Buf.Indexed
, and retrofitted
all existing implementations in util and finagle to adopt it. It is now used
throughout for a reductions in allocation and latency. In two services at
Twitter we saw a 1–2% reduction in allocations. We plan to open the API to
the public and make it a part ofBuf
once we are confident in the APIs.
RB_ID=904559
RB_ID=905253
RB_ID=906201
- util-slf4j-api: Introduce slf4j-api support into util. This includes a
small scala wrapper over theorg.slf4j.Logger
and a scala-friendly
Logging
trait. Changes also include the util-slf4j-jul-bridge module which
is a library that provides a utility to "smartly" install the
Slf4jBridgeHandler.RB_ID=900815
Runtime Behavior Changes
- util-core: Improved performance and allocation rates of some "random access"
Buf
operations.RB_ID=905253
- util-core: Standardized argument checking in implementations of
c.t.io.Buf.write
andc.t.io.Buf.slice
.RB_ID=899935
API Changes
- util-core: Deprecated
c.t.io.ConcatBuf
which is replaced by
c.t.io.Buf.apply(IndexedSeq[Buf])
.RB_ID=899623
Util 6.40.0
Bug Fixes
- util-core: Fix issue with
c.t.concurrent.AsyncStream.mapConcurrent
which
will cause the stream head to be held for life of operation.RB_ID=896168
API Changes
- util-core: Deprecated charset constants in
c.t.io.Charsets
have been
removed. Use java.nio.charset.StandardCharsets instead.RB_ID=893542
- util-core:
com.twitter.util.NonFatal
is deprecated, use
scala.util.control.NonFatal
instead.RB_ID=892475
- util-core:
FactoryPool
/SimplePool
now inheritsscala.collection.mutable.Queue[A]
not deprecatedscala.collection.mutable.QueueProxy[A]
RB_ID=896485
- util-core:
Buf
has been promoted from a trait to an abstract class to facilitate
memoization of theBuf
hash code. This also removes the need for the Java friendly
abstract class:AbstractBuf
.RB_ID=897476
Util 6.39.0
No Changes.
Util 6.38.0
New Features
- util-app: Java developers can now declare instances of
GlobalFlag
from Java. Seec.t.app.JavaGlobalFlag
for details.RB_ID=874073
- util-logging: Allow users to override
c.t.util.logging.Logger
installation,
making it easier to work with SLF4J bridges.RB_ID=870684
- util: No longer need to add an additional resolver that points to maven.twttr.com.
RB_ID=878967
Bug Fixes
- util-core:
c.t.io.InputStreamReader
andReaders
created by
c.t.io.Reader.fromFile
andfromStream
now close the underlying
InputStream
on reading of EOF and on calls toReader.discard
.
RB_ID=873319
API Changes
- util-core:
c.t.app.GlobalFlag
is nowabstract
to reflect how the class
is intended to be used.RB_ID=875409
Util 6.37.0
New Features:
- util-app: Introduce
c.t.app.Flag.letClear
allowing flags to be unset.
RB_ID=868177
Util 6.36.0
New Features:
- util-core:
c.t.util.FuturePool
now optionally exposes metrics on
their internal state such as active tasks, and completed tasks.
RB_ID=850652
- util-core: Add a system property
com.twitter.concurrent.schedulerSampleBlockingFraction
that can be
set to a value between 0.0 and 1.0 (inclusive). When the Scheduler
runs blocking code, it will log the stacktrace for that fraction of
the calls.RB_ID=861892
- util-core: Add Java-friendly API for
StorageUnit
. SeeStorageUnit.fromX
andStorageUnit.{times, plus, minus, divide}
methods.RB_ID=864546
Changes in Runtime Behavior:
- util-eval: The compiler reporter is now reset between code check invocations.
This means that when there is a failure that it is no longer required to reset
the entire state to recover and that already compiled and loaded classes can still
be used.RB_ID=859878