forked from twitter/util
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
1234 lines (896 loc) · 46 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.. Author notes: this file is formatted with restructured text
(http://docutils.sourceforge.net/docs/user/rst/quickstart.html).
The changelog style is adapted from Apache Lucene.
Note that ``RB_ID=#`` correspond to associated messages in commits.
Next Version
Runtime Behavior Changes:
* 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` and `c.t.f.u.BufWriter` have been
moved from finagle-core to util-core and renamed to
`c.t.io.ByteReader` and `c.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 while `offer` and `fail`
are no longer final. ``RB_ID=914191``
6.42.0 2017-03-10
New Features:
* util-core: Promoted the positional `Buf.Indexed` API to be a first-class
part of `c.t.io.Buf`. If you have a custom implementation of `Buf` 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`
via `c.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's `c.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``
6.41.0 2017-02-03
New Features:
* util-app: App now exposes `closeOnExit` publicly. ``RB_ID=906890``
* util-core: Add method to `Buf` to efficiently write to a nio `ByteBuffer`.
``RB_ID=910152``
* util-core: Add Java-friendly API to Scala.java for converting from
a Java 8 `Optional` to a Scala `Option`. ``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 of `Buf` 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 the `org.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` and `c.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(Iterable[Buf])`. ``RB_ID=899623``
6.40.0 2016-12-20
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 inherits `scala.collection.mutable.Queue[A]`
not deprecated `scala.collection.mutable.QueueProxy[A]` ``RB_ID=896485``
* util-core: `Buf` has been promoted from a trait to an abstract class to facilitate
memoization of the `Buf` hash code. This also removes the need for the Java friendly
abstract class: `AbstractBuf`. ``RB_ID=897476``
6.39.0 2016-11-22
No Changes
==========
6.38.0 2016-10-10
New Features:
* util-app: Java developers can now declare instances of `GlobalFlag`
from Java. See `c.t.app.JavaGlobalFlag` for details. ``RB_ID=874073``
* util-thrift: We now depend on a fork of libthrift hosted in the Central Repository.
The new package lives in the 'com.twitter' organization. This removes the necessity of
depending on maven.twttr.com. This also means that eviction will not be automatic and
using a newer libthrift library requires manual eviction if artifacts are being pulled
in transitively. ``RB_ID=885879``
* 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` and `Readers` created by
`c.t.io.Reader.fromFile` and `fromStream` now close the underlying
`InputStream` on reading of EOF and on calls to `Reader.discard`.
``RB_ID=873319``
API Changes:
* util-core: `c.t.app.GlobalFlag` is now `abstract` to reflect how the class
is intended to be used. ``RB_ID=875409``
6.37.0 2016-09-07
New Features:
* util-app: Introduce `c.t.app.Flag.letClear` allowing flags to be unset.
``RB_ID=868177``
6.36.0 2016-08-25
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`. See `StorageUnit.fromX`
and `StorageUnit.{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``
6.35.0 2016-07-07
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.NonFatal` is now implemented by Scala's
`scala.util.control.NonFatal`. This changes behavior such that
`java.lang.StackOverflowError` is considered fatal and
`java.lang.NoSuchMethodException` is considered non-fatal.
``RB_ID=835671``
New Features:
* util-app: `com.twitter.finagle.util.LoadService` has been moved to
`c.t.app.LoadService` and 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.blockingTimeNanos` which 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.NoStacktrace` is removed. Use `scala.util.control.NoStackTrace` instead.
``RB_ID=833188``
* util-core: Add `Future.joinWith` that also accepts a function `(A, B) => C` for mapping
a joined result. ``RB_ID=838169``
* util-core: Add `Future.by(Time)`, complementary to the existing `Future.within(Duration)`
``RB_ID=838169``
* util-core: Add `c.t.util.ProxyTimer` which allows for creating proxy based
`Timers` outside of the `com.twitter.util` package. ``RB_ID=846194``
* util-core: Add `AsyncStream.merge` merge 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.Bijection` is removed. use `c.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): Try` 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.liftToTry)`. ``RB_ID=836066``
* util-core: Deprecated methods `Future.isReturn` and `Future.isThrow` have been
removed because they made it too easy to hide blocking code. Replaced usage with
the more explicit `Await.result(Future.liftToTry).isReturn` and
`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 a `com.twitter.util.lint.Rule` from the `com.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.
6.34.0 2016-04-26
New Features:
* util-core: Add `Throwables.unchecked` to help Java users deal with checked
exceptions. ``RB_ID=811441``
* util-stats: Can now get from a `com.twitter.finagle.stats.StatsReceiver`` to 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 with `Buf.ByteArray.Owned.apply`.
- Removed `c.t.io.Buf.ByteArray.unapply`, replace usage with `Buf.ByteArray.Owned.unapply`.
- Removed `c.t.io.Buf.ByteBuffer.apply`, replace usage with `Buf.ByteBuffer.Owned.apply`.
- Removed `c.t.io.Buf.toByteBuffer`, replace usage with `Buf.ByteBuffer.Owned.extract`.
* util-core: Removed deprecated `Future.apply` methods ``RB_ID=811617``
* util-stats: Removed `com.twitter.finagle.stats.BroadcastStatsReceiver` marker trait in favor of
`com.twiter.finagle.stats.DelegatingStatsReceiver` marker trait, which lets us specify that we
only delegate to a single `com.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])` and `Var.patch`.
``RB_ID=809100``
6.33.0 2016-03-10
New Features:
* util-core: AsyncSemaphore supports closing and draining of waiters via `fail`. ``RB_ID=807590``
* util-core: Add convenience methods `force`, `size`, `sum`, and `withEffect` to `AsyncStream`.
``RB_ID=808411``
Bug Fixes:
* util-core: Fix nested functions `AsyncStream.++` to avoid stack overflow. ``RB_ID=804408``
Deprecations:
* util-core: `Future.rawException` is deprecated in favor of `Future.exception`.
``RB_ID=798223``
6.32.0 2016-02-03
New Features:
* util-core: Add `Future.traverseSequentially`. Take a sequence and sequentially apply a function
A => Future[B] to each item. ``RB_ID=785091``
6.31.0 2016-02-02
NOT RELEASED
6.30.0 2015-12-03
New Features:
* util-core: Introduce an `AsyncMeter` for 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 `TokenBucket` for 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: `Timer` now has final implementations for `schedule` which delegate
to new protected `scheduleOnce` and `schedulePeriodically` methods. This is
done to ensure that `Locals` are captured when the task is scheduled and
then used when the task is run. Existing `Timer` implementations should rename
their existing `schedule` methods to work with the new interface. ``RB_ID=755387``
* util-core: Remove deprecated `FuturePool.defaultPool`, callers should
use `FuturePool.unboundedPool` instead. ``RB_ID=757499``
* util-stats: Remove deprecated methods on `com.twitter.finagle.stats.StatsReceiver`.
``RB_ID=757414``
* util-core: `AsyncStream` graduates out of `com.twitter.concurrent.exp` into
`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 from `com.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 `invalidate` method from util-cache's
`com.twitter.cache.guava.LoadingFutureCache`, and change the `remove` semantic
to match the `com.twitter.cache.FutureCache` contract. ``RB_ID=766988``
* util-core: Remove protected `Timer.monitor` (overrides a monitor to use by a
timer implementation) because any possible implementation rather than `Monitor.get`
promotes memory leaks when timer is used to schedule recursive tasks (tasks that
reschedules themselves). ``RB_ID=771736``
6.29.0 2015-10-15
New Features:
* util-core: Introduce an optional max capacity to `AsyncQueue`.
Modified `AsyncQueue.offer` to return a boolean indicating whether or not the
item was accepted. Added `AsyncQueue.drain(): Try[Queue]`. ``RB_ID=745567`
API Changes:
* util-core: Remove deprecated methods from `com.twitter.util.Time` and
`com.twitter.util.Duration`. ``RB_ID=751771``
* util-core: Provide methods on `Stopwatch` so that users can take advantage of
`Time` manipulation 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 to `wallTime` and the tracking error we have experienced `wallTime` and
`*Time` make it impossible to use them reliably. It is not worth the performance
and code complexity to support them. ``RB_ID=750239``
* util-core: `JavaTimer` and `ScheduledThreadPoolTimer` now capture the `Local`
state when scheduled and is used along with that `Monitor` when the `TimerTask`
is run. ``RB_ID=755387``
* util-logging: `QueueingHandler` does not create a separate thread per instance.
``RB_ID=745567`
6.28.0 2015-09-25
API Changes:
* util-core: Remove deprecated methods from `com.twitter.util.Var`.
To migrate `observe` and `foreach`, given `aVar.observe { t => somethingWith(t) }`
you would write `aVar.changes.register(Witness({ t => somethingWith(t) }))`.
To migrate `observeUntil`, given `aVar.observeUntil(_ == something)`,
you would write `aVar.changes.filter(_ == something).toFuture()`.
To migrate `observeTo`, given `aVar.observeTo(anAtomicReference)`,
you would write `aVar.changes.register(Witness(anAtomicReference))`.
``RB_ID=744282``
6.27.0 2015-08-28
API Changes:
* util-core: `TimeFormat` optionally takes a `TimeZone` in the constructor.
If not provided, it uses UTC.
6.26.0 2015-07-27
API Changes:
* util-core: `Activity`, `BoundedStack`, `RingBuffer` and `Var` migrated
off of deprecated `ClassManifest` to `ClassTag`. ``RB_ID=720455``
* util-core: Added Spool#zip
* util-core: Removed deprecated methods `Future.void` and `Future$.void()`.
Use `Future.voided` and `Future$.Void` instead. ``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/events` page or
`/admin/events/{recordOn,recordOff}`. ``RB_ID=715712``
6.25.0 2015-06-22
Changes in Runtime Behavior:
* util-events: Enable event sink by default.
6.24.0 2015-04-12
New Features:
* util-core: Introduce AsyncStream, an experimental replacement for Spool.
API Changes:
* util-core: `Future.willEqual()` now returns `Future[Boolean]` instead of
`Promise[Boolean]`.
* util-core: rename VarSource to ActivitySource. remove
com.twitter.io.exp.VarSource.Result, return Activity[T]
instead of Var[VarSource.Result[T]]. Remove FailoverVarSource in
favor of ActivitySource.orElse.
* util-core: `TimeFormat` now throws IllegalArgumentException if the pattern
uses the week year ('Y') without the week number ('w')
* util-core: `Spool.++` used to force its argument, but now it is evaluated
only if `this` Spool is empty. To revert to existing behavior,
simply force the argument before passing it to ++.
* util-core: `Reader.writable()` returns a new type, `Reader.Writable`, which
combines `Reader`, `Writer` and `Closable`.
* util-core: `Reader.concat` and `Reader.copyMany` now take an AsyncStream
argument instead of Spool.
Changes in Runtime Behavior:
* util-core: Futures still rethrow on fatals, but now also Monitor.handle on
them.
* util-core: `Future.onFailure` now only applies a `PartialFunction` if
`PartialFunction.isDefinedAt` returns true.
* util-core: `AsyncSemaphore` now requires that `initialPermits` be positive.
* util-core: The `Reader` and `Writer` from `Reader.Writable.close()` are now
synchronized on `close`.
6.23.0 2014-12-12
New Features:
* util-core: Add method .flushBatch() to batched future returned by Future.batched()
that immediately initiates processing of all remaining queued requests
* util-core: Add Future.collect() method that collects over Map's values
* util-stats: Create a new module, `util-stats` to move `finagle-core`
StatsReceivers to. They retain the `com.twitter.finagle`
namespace to ease the transition.
Deprecation:
* util-stats: Deprecate `com.twitter.finagle.stats.StatsReceiver#time{,TimeFuture}`.
Instead, please use the `com.twitter.finagle.stats.Stat` helpers
from scala, and the `com.twitter.finagle.stats.JStats` helpers
from java.
API Changes:
* util-cache: Remove unused com.twitter.cache.Mod trait and object
* util-core: Rename Buf._.Unsafe to Buf._.Owned and Buf._.Copied to Buf._.Shared
* util-core: Remove the com.twitter.util.repository package
* util-core: Change return type of Future.batched() to com.twitter.util.Batcher
Java Compatibility:
* util-app: Flaggable is now an abstract class for Java compatibility
* util-core: Make Futures an API entry point for Java users
(even for methods that take Scala collections)
* util-core: Add compilation tests to track Java compatibility of new API
6.22.2 2014-10-29
API Changes:
* util-core: Removed `Sieve` example.
* util-core: Introduce new constructors and extractors for Buf types to
support more efficient, correct uses. Buf types now come with
Copied and Direct management interfaces -- Direct tries to
provide direct access to the Buf's backing byte array, while
Copied ensures that the caller cannot accidentally mutate a Buf's
data. Additionally, helpers to support Buf-type coersion have
been added.
New Features:
* util-app: add an option so that we can let apps fail fast if reading
argument before args are parsed.
Bug Fixes:
* util: add missing @RunWith annotation
* util-core: Java tests for Duration, Time and Timer
* util-core: Reader.writable.fail: make reentrant
Optimizations:
* util-core: Slurry of PartialFunction micro-optimizations
6.22.1 2014-10-23
Bug Fixes:
* util and finagle: fix compiler warnings
Deprecation:
* util-core: Add deprecation of RingBuffer to changelog
* util-core: Removed IVar and IVarField
Documentation:
* util-core: Clarify Scaladoc of `Promise.attached`
* util-core: Add self-type to `Promise.Detachable` and augment Promise Scaladocs
* util-io: Better names for Buf.slice() paramters.
New Features:
* util-app: Add App registration
* util-cache Add asynchronous cache with TTL
* util-core: Add `Activity.future`
Package factoring:
* util-logging: factor out testing code into new package util-test
6.22.0 2014-10-13
System Requirements:
* util-core: prefer Await.result(future.liftToTry) to deprecated methods
* c.t.util.Time: Scope Locals with `Local.let` instead of `save`+`restore`
Changes in Runtime Behavior:
* util-logging:
- Logging's default handler is now async by default via `com.twitter.logging.QueueingHandler`.
- Two Flags allowing for customization:
+ `com.twitter.logging.log.async`: Default true, turns this functionality on/off.
+ `com.twitter.logging.log.async.maxsize`: Default 4096, max size of the async buffer.
* util.RingBuffer: fix buffer size on drops
* util-io: Fix Buf.ByteBuffer.slice
* util-core: Future.sleep: short-circuit when duration <= 0
* util-core: IVar and IVarField were removed. Use com.twitter.util.Promise instead because it provides a superset of IVar behavior.
New Features:
* util-core: introduce Memoize.snappable
* util-app: add Flaggable.ofSet
* util-app: introduce Flag.let
Optimizations:
* util-core: Perf improvement to ConcatBuf#slice
* util-core: Avoid accumulation of listeners in Future.select
* util-core: Event.filter only 1 call to filter predicate
Bug Fixes:
* util-jvm: Fix logging in Jvm.foreachGc
* util-core: document StorageUnit can overflow
* util-core: check Future.proxyTo and Promise.become preconditions
API Changes:
* util-core: remove Leaky and FutureBenchmark
Documentation:
* util, ostrich, finagle, twitter-server: Remove all trailing spaces
Package factoring:
* Test classes from util-logging were factored into its own package, util-test.
API Changes:
* util-core: Deprecate `RingBuffer` in favor of Guava's `com.google.common.collect.EvictingQueue`.
6.21.2 2014-09-08
* util-cache: Adds a Guava-backed asynchronous cache
* util-core: Fixed FuturePool for NLRCK
* util-core: Improve java friendliness of futures
* util-core: Make register/close on Event() work atomically
* util-core: Reimplement Buf.Utf8 encoder/extractor using io.Charsets
* util-core: storage parse() should be able to handle Long
* util-logging: make Logger immutable & break cyclic dependency on Level
* util: Upgrade to scala_2.10
6.20.0 2014-08-22
* util: Enables cross-publishing for 2.11
* util-app: Log severely if a flag is read at the wrong time
* util-core: Changes transform to fail Futures if you return inside the passed closure
* util-core: Copy bytes from Reader to Writer and OutputStream
* util-core: Fix RichU64String to throw for negative input Problem
* util-core: Optimizations in Buf
* util-core: Remove some unnecessary implicit conversions
* util-doc: Fix updatedocs.bash to update new util docs
6.19.0 2014-08-05
* util: smattering of minor cleanups in util and finagle
* util-core: Reader and getContent symmetry
6.18.4 2014-07-31
* util-core: Remove confusing NOOP 0.until(5) in Future.collect().
* util-app: Fix a bug in global flag parsing
6.18.2 2014-07-23
* util-core: Fixes a broken sbt test
* util-core: Log exceptions caught by ChannelStatsHandler
* util-core: Satisfy promise on fatal exception in FuturePool task
* util-core: small perf improvements to Future.collect, Throw, Flag
* util-logging: java-friendly LoggerFactory API
6.18.1 2014-07-08
* util: Update README to reflect correct storage units.
* util-*: Convert all tests in util to scalatest
* util-app: Simplifies the logic to get the appname
* util-io: Buf, Reader: remove Buf.Eof; end-of-stream is None
* util-io: Create Buf.ByteBuffer to wrap java.nio.ByteBuffer
6.18.0 2014-06-23
* util-app: Don't kill the JVM on flag-parsing failure
* util-app: Improve the Scaladocs for com.twitter.app.Flag and friends
* util-core: Add U(32|64)(BE|LE) to Buf
* util-core: Add com.twitter.util.NilStopwatch
* util-core: Add src/main/java dependency on src/main/scala
* util-core: Catch InterruptedException in Closable collector thread
* util-core: Fix MockTimer#schedule(Duration)(=> Unit)'s cancel
* util-core: Fix update-after-interrupt race condition in AsyncSemaphore
* util-core: Signal the deprecation of com.twitter.util.Bijection.
* util-logging: Add additional handlers to Logging trait
6.17.0 2014-06-04
* util: Upgrade dependency versions
* util-core: Scheduler productivity = cpuTime/wallTime
* util-core: Add a `take` method to `Spool`
* util-core: Introduce `ConcatBuf`
* util-core: add `Spool.collectFuture`
6.16.0 2014-05-13
* util-app: Add flag for configuring acceptance of undefined flags
* util-app: Minor c.t.app.ClassPath/c.t.f.util.LoadService cleanup
* util-core: Adds Time.sleep for testing sleeping code
6.15.0 2014-04-29
* util-app: enforce close grace period
* util-core: special case buf.slice(0, buf.length)
* util-core: add LIFO option to LocalScheduler
* util-core: improves usability of Var and VarSource from java
* util-core: Make spool lazier
* util-core: Fixes detachable semantics with ConstFuture
* util-core: make LocalScheduler non-private for custom schedulers
6.14.0 2014-04-09
* util-benchmark: Fix caliper failures due to new guava
* util-core: Add Local.let
* util-core: Add com.twitter.io.Charsets and replace the use of org.jboss.netty.util.CharsetUtil
* util-core: Bump objectsize dependency to 0.0.10
* util-core: Comprehensive Scaladocs for Scheduler-related classes and traits
* util-core: Create a static Exception for use in `Future.raiseWithin`
* util-core: Future.select: fix inaccurate comments
* util-core: Make Function classes covariant
* util-core: Parse names into trees; introduce separate evaluation.
* util-core: Short-circuit `within` and `raiseWithin` if Future is already satisfied
6.13.2 2014-03-24
* util-core: Add `StorageUnit.hashCode`
* util-core: Event.mergeMap: fix Closable
* util: Update 3rdparty library versions
* util: Upgrade to guava 16
6.13.1 2014-03-20
* util: Update zk libraries
6.13.0 2014-03-14
* util-app: add usage string, printed before flags
* util-app: Handle comma-separated values in `Flaggable.ofMap`
* util-app: Implement application-level shutdown handling in App.
* util-app: Remove hardcoded ports in FlagTest
* util-app: sort global flags in usage
* util-core/Offer: Don't do indexed lookups in prepare()
* util-core: Add support for interrupting Future.sleep
* util-core: Check whether JVM supports thread measurement before measuring
* util-core: Create daemon threads in all stock `com.twitter.util.FuturePool`s
* util-core: Event: mergeMap, not flatMap
* util-core: Performance optimizations for Future.collect
* util-core: TimeLike inSeconds should not truncate
* util-core: Var.collect, Fix deadlock caused by oversynchronizing
* util-core: Var: prevent stale updates
* util: ForkJoin scheduler: first draft
6.12.1 2014-02-18
* Upgrade everyone to the new c.t.common.server-set
6.12.0 2014-02-14
* LocalScheduler: improve concurrency by sampling less
* Option to enable thread pool scheduler in finagle, and fix the shutting down RejectedExecutionException's.
* re-write Future.unit in terms of Future.Unit
* Revert "Option to enable thread pool scheduler in finagle, and fix the shutting down RejectedExecutionException's." (It's breaking the build on JDK6 machines)
* twitter-server: Report on deadlock conditions in admin/contentions
* Update 3rdpaty zookeeper client
* Update version of com.twitter.common*
* util-core: Add a Scaladoc for com.twitter.util.RandomSocket
* util-core: State[+A] => State[A]
* util-logging: Increase richness of file-logging flags
* util-zk: scalatest as test dep
* util-{app,jvm}: various small improvements from gcflow
* util: Drop util-eval dep from util-zk-common, which pulls in scala-compiler unnecessarily
* Var: fix an iatrogenic concurrency bug
6.11.1 2014-01-16
* util-collection: Depend on jsr305.
* util-core: Add `Promise.attached` and Detachable.
* util-core: Add `Future.batched`.
* util-common: Fix a race condition in ExecutorServiceFuturePool.
6.11.0 2014-01-14
* util-core: Add BridgedThreadPoolScheduler.
* util-core: Add Events, discrete-time values.
* util-core: Add Future.delayed, Timer.Nil.
* util-core: Add Var.join.
* util-core: Add utilities for composing Future side effects.
* util-core: Allocation improvements to Future.isDefined, Promise.isDefined, Promise.interrupts.
* util-core: Fix forcing issues with Spool.*::.
* util-core: Future.followedBy->Future.before
* util-core: s/setValue(())/setDone()/g
* util-logging: Allocation improvements to Formatter.formatMessageLines.
* util-logging: Get correct method and class name in c.t.u.LogRecord
* util-zk-common: Fix finagle-serversets dependencies discrepancy.
6.10.0 2013-12-12
* `util-core`: Add functionality to AsyncSemaphore for executing functions as permits become available.
* `util-core`: Fine-grained locking to prevent deadlocks in Var.
* `util-core`: Introduce com.twitter.io.BufInputStream - wraps a Buf and exposes a java.io.InputStream interface.
* `util-core`: Introduce com.twitter.util.Memoize - thread-safe memoization of a function.
6.9.0 2013-12-02
* util-core: 2.10 pattern matching strictness
* util-core: Gives Var single-owner semantics
* util-core: Seq[Future[A]] => Future[Seq[Try[A]]]
* util-core: Adds a comment explicitly describing synchronous callback on observe for Var
* util-core: async semaphore cancellation
* util: sbt version in `build.properties'
6.8.1 2013-11-15
* util-core: Break apart interruptible FuturePool for java backcompat
6.8.0 2013-11-12
* util-app: Fix null error for Flaggable[InetSocketAddress].
* util-app: Flag, easier usage of default.
* util-core: adds closable.close(Duration)
* util-core: Adds com.twitter.io.exp.VarSource
* util-core: adds comment re using FuturePool from java.
* util-core: buffers requests until Var[Addr] is in a ready state
* util-core: Fix Promise update race when interrupting FuturePool threads.
* util-core: improve allocation/perf in Offer.choose and Future.select
* util-core: Var: remove Var.apply; introduce Var.sample
* util-zk-common: update pom com.twitter.common.zookeeper dependencies
* util: scaladoc warning cleanup.
6.7.0 2013-10-18
* util-core: Introduce Try.collect(), analagous to Future.collect
* util-core: Add some empirically useful add-ons to Var
* util-logging: Use ConsoleHandler when outputFlag is /dev/null
* util-core: Fix broken string-deserialization in Buf.Utf8.unapply
* util-core: Improve gc profile around Var
6.6.0 2013-10-09
* util-app: Properly propagate underlying exceptions.
* util-core: Add a `Var.value` function. (835a043)
* util-core: Augment Var and Local in support of Finagle's request context feature. (b2d689a)
* util-core: Avoid instantiating TimeoutException until it is needed (CSL-592)
* util-core: Make Future.never a val instead of a def
* util-core: Move Var to core util, add Var.unapply
* util-core: Testing function Time.withTimeAt now uses Locals.
* util-core: Throw AlreadyNackd on nack-ack.
* util-core: raiseWithin, alternative to within, that raise interrupt.
* util-jvm: Add a GlobalFlag for a machine's number of logical cores. (dc20fbf1)
* util-logging: Add a NullLogger object.
* util-logging: makes Logging more flexible for easy extension of twitter-server
* util-zk: Add ShardCoordinator and ZkAsyncSemaphore classes. (c57b2a9)
6.5.0 2013-09-10
* util-hashing: removed dependency on util-core
* util-core: Introduce swappable schedulers, ThreadPool scheduler.
* util-core: Scheduler - "productivity" stats, dispatches.
* util-core: Add Future.when
* util-core: introduced Var - composable variables
* util-core: adding short note on Future 'within'
6.4.0 2013-08-28
* util-core: Add Return constants
* util-core: Make ConstFuture.transform consistent with Promise.transform
* util-core: Make it possible to explicitly set a locale on TimeFormat
* util-logging: Refactored formatter to decrease coupling
* util-core: Add NoSuchMethodException as fatal exception in NonFatal
* util-app: Add some logging helpers to Flags
* util-core: Introduce Buf, Reader, and Writer: Zerocopy, buffered I/O
6.3.8 2013-07-22
* util-core: Add Future.True and Future.False constants
* util-app: Treat '--' as end of flags indicator
* util-app: Add support for long flags
6.3.7 2013-06-24
* util-app: flags use by-name default values
* util-app: Make the global flag test idempotent
* util-collection: guard against missing element exception in BGQ
* util: Deal with UnknownHostException thrown by InetAddress.getLocalHost
* util: update version in README
6.3.6 2013-06-11
* util: Update owners files
* util-jvm: CpuProfile: sleep the right amount of time for the recording thread
* util-jvm: always try to construct hotspot instance Detection by VM name is unreliable.
* util: util/* compiling, testing and benchmarking with pants.
* util-eval: Gizzard: Some followup deps alignment to fix deployment classpath issues
6.3.5 2013-05-31
* util-core: add Time.fromMicroseconds to util.Time
* util-core: NullMonitor takes itself out when composed
* util-core: deprecate Config
* util-hashing: add entryForHash api to Distributor
* util-app: Flag: clarify usage and hide all Flag constructors.
* util-core: Added reduceLeft and foldLeft to the Spool class
* util: Update sbt project for (util, ostrich, finagle)
6.3.4 2013-05-16
* util-core: Convenience method to await all
* util-core: RootMonitor never propagates non fatal exception
6.3.3 2013-05-13
* util-collection: When growing chain only grow the chain. This addresses a NoSuchElementException.
* util-eval: fix for when class files are on the classpath directly
* util: Generate build.properties from sbt
* util-core:Time, Duration: implement Java serialization
* util-thrift: Bump Jackson to 1.9.11
* util-core: Add withFilter to Future and Try
* util: Remove zookeeper dependency ivyXML and replace with ExclusionRules
6.3.2 2013-04-18
* util-core: create less garbage in AsyncSemaphore.acquire()
* util-core: deprecate com.twitter.util.concurrent.Concurrent{Pool, MultiMap}
* util-core: restore prior Future.get behavior
* util-core: Spool error propagation
* util-core: Use futures for schema detection to avoid blocking finagle threads
* util-refect: test: use sys.error
* util-zk: ZNode("/path").parentPath should be "/", not an empty string
6.3.0 2013-04-05
* util-core: flag a bug with U64 truncation
* util-core: Future.get: include fatal exceptions
* util-core: deprecate Future#apply, get.
* util-core: special-case Duration.Zero to avoid allocation
6.2.5 2013-03-27
* util-zk: Improvements to util-zk NativeConnector
* util: Update sbt project definition
* util: launching test in all scala version of the project
6.2.4 2013-03-21
* util-core: Add Future.Nil, it can be used anytime you need a Future[Seq[_]] with an empty sequence.
* util-core: fix VM test error by ensuring reset
* util-core: Move Disposable/Managed to util
* util-logging: scribe binary thrift for tbird add/remove/scrub ops:
* util: upgrade com.twitter.common.objectsize to 0.0.7
6.2.3 2013-03-08
* util-core: Remove StreamHelper
* Flag: create Map flag type
6.2.2 2013-02-25
* Flag: introduce global flags
6.2.1 2013-02-20
* HttpMux: provide visibility into available handlers
* Flag: add Time type
* Spool: encode exceptions
* Closable: use Time.Bottom for close()
* Future.within: bypass timer entirely if we're passed Duration.Top
* Awaitable: introduce Await
* util-jvm: GC predictor
* io.Files: don't overallocate buffers
* Future: use .nonEmpty instead of != Nil
6.1.0 2013-01-30
* preliminary 2.10 port/build
* Add Closable trait
* Add contention snapshot
6.0.6 2013-01-22
* util-core: concurrent.SpoolSource utility for creating Spools
* util-core: Spool.flatMap, Spool.++
* util-app: add shutdown hooks
* util-logging: Make the logging work properly for Scala and
mixed Scala/Java
6.0.4 2012-12-18
* Broker: more efficient dequeueing of offers
* Duration: parse all output of Duration.toString
* ScheduledThreadPoolTimer: aggressively remove runnables
to avoid space leak
* util-core documentation: fix some parentheses, backticks
* util-hashing: add Hashable type class
6.0.3 2012-12-11
* Promise: remove future tracing, add explicit transforming state to
avoid extraneous allocation
* update zk client
* com.twitter.app: composable apps & flags
6.0.1 2012-11-26
* Use java.util.ArrayDeque in place of mutable.Queue due to
https://issues.scala-lang.org/browse/SI-6690
6.0.0 2012-11-26