Releases: twitter/util
Util 7.0.0
New Features:
-
util-core: Added
c.t.util.SlowProbeProxyTimerfor 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:
JvmStatshas 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.ServiceLoadedTunableMapare 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.readStringwill 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.sequencenow continues processing
theClosablesshould 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.sinkEnablednow 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.selfis now protected (was public before).StatsReceiver.repris nowdef(wasvalbefore).
-
util-stats:
Counter#addnow takes aLonginstead of anIntegeras an argument.
PHAB_ID=D69064 -
util-stats:
StatsReceiver#counter,StatsReceiver#stat, andStatsReceiver.addGauge
now may optionally takec.t.f.stats.Verbosityas 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=D62611StatsReceiver.counter0is deprecated in favour of varargStatsReceiver.counterStatsReceiver.stat0is 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.Buftype.RB_ID=917094 -
util-core: Added
ByteReader.readUnsignedLongBEandByteReader.readUnsignedLongLE.
RB_ID=917289
API Changes:
-
util-collection: Removed deprecated
c.t.u.JMapWrapper. Use
scala.collection.JavaConvertersinstead.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; useexceptioninsteadcancel; useraiseinstead
Removed deprecated
c.t.u.Futures.select; useFuture.selectinstead.
Remove deprecatedflattenmethod onc.t.u.Future; useFutures.flatteninstead.
RB_ID=915500 -
util-core: Removed deprecated
c.t.u.LongOverflowException. Use
java.lang.ArithmeticExceptioninstead. Removed deprecated
c.t.u.LongOverflowArithand all methods on it:
-add; use Java 8'sMath.addExactinstead
-sub; use Java 8'sMath.subtractExactinstead
-mul; use Java 8'sMath.multiplyExactinstead
RB_ID=915545 -
util-core: Removed deprecated
c.t.concurrent.exp.AsyncStream. Use
c.t.concurrent.AsyncStreaminstead.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
Timersnow 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
gaugesmember 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.BufReaderandc.t.f.u.BufWriterhave been
moved from finagle-core to util-core and renamed to
c.t.io.ByteReaderandc.t.io.ByteWriterrespectively. 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
sizemethod is now final whileofferandfail
are no longer final.RB_ID=914191
Util 6.42.0
New Features:
- util-core: Promoted the positional
Buf.IndexedAPI to be a first-class
part ofc.t.io.Buf. If you have a custom implementation ofBufit
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.ConcatBufwhich 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 8Optionalto a ScalaOption.RB_ID=906512 - util-core: Introduced a positional
BufAPI,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 ofBufonce we are confident in the APIs.
RB_ID=904559RB_ID=905253RB_ID=906201 - util-slf4j-api: Introduce slf4j-api support into util. This includes a
small scala wrapper over theorg.slf4j.Loggerand a scala-friendly
Loggingtrait. 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"
Bufoperations.RB_ID=905253 - util-core: Standardized argument checking in implementations of
c.t.io.Buf.writeandc.t.io.Buf.slice.RB_ID=899935
API Changes
- util-core: Deprecated
c.t.io.ConcatBufwhich 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.mapConcurrentwhich
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.Charsetshave been
removed. Use java.nio.charset.StandardCharsets instead.RB_ID=893542 - util-core:
com.twitter.util.NonFatalis deprecated, use
scala.util.control.NonFatalinstead.RB_ID=892475 - util-core:
FactoryPool/SimplePoolnow inheritsscala.collection.mutable.Queue[A]
not deprecatedscala.collection.mutable.QueueProxy[A]RB_ID=896485 - util-core:
Bufhas been promoted from a trait to an abstract class to facilitate
memoization of theBufhash 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.JavaGlobalFlagfor details.RB_ID=874073 - util-logging: Allow users to override
c.t.util.logging.Loggerinstallation,
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.InputStreamReaderandReaderscreated by
c.t.io.Reader.fromFileandfromStreamnow close the underlying
InputStreamon reading of EOF and on calls toReader.discard.
RB_ID=873319
API Changes
- util-core:
c.t.app.GlobalFlagis nowabstractto 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.letClearallowing flags to be unset.
RB_ID=868177
Util 6.36.0
New Features:
- util-core:
c.t.util.FuturePoolnow 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.schedulerSampleBlockingFractionthat 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