forked from airlift/airlift
-
Notifications
You must be signed in to change notification settings - Fork 44
/
NEWS
1572 lines (1040 loc) · 53.4 KB
/
NEWS
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
** NEWS file is deprecated. Future updates will be documented directly in CHANGES **
Airlift 0.139
Minor maintenance release. See CHANGES.
Airlift 0.138
Minor maintenance release. See CHANGES.
Airlift 0.137
Minor maintenance release. See CHANGES.
Airlift 0.136
Minor maintenance release. See CHANGES.
Airlift 0.135
* Units
The units module has been extracted into a separate, standalone
project. The Maven groupId and artifactId are the same, with the
version updated to 1.0.
* Upgrade to Jackson 2.8.1
Airlift 0.134
Minor maintenance release. See CHANGES.
Airlift 0.133
Minor maintenance release. See CHANGES.
Airlift 0.132
Minor maintenance release. See CHANGES.
Airlift 0.131
Minor maintenance release. See CHANGES.
Airlift 0.130
Minor maintenance release. See CHANGES.
Airlift 0.129
Minor maintenance release. See CHANGES.
Airlift 0.128
Minor maintenance release. See CHANGES.
Airlift 0.127
* HTTP/2 support
The HTTP server and client now have experimental support for the HTTP/2
protocol for HTTP only (not HTTPS). The server supports the HTTP/2
cleartext upgrade mechanism (h2c) which allows running both versions
of the protocol on the same port. Both versions are always enabled.
The HTTP client also supports HTTP/2 cleartext. However, there is
no upgrade mechanism, so if HTTP/2 is enabled, the client will always
use the HTTP/2 protocol and thus can only communicate with HTTP/2
servers. Attempting to connect to an older server will result in
"refused_stream_error". Thus, HTTP/2 is disabled by default.
* HTTP Client API changes for Case-Insensitive Headers
HTTP header field names are always lowercase in HTTP/2. They should
always be treated as case insensitive, but the previous HTTP client
API made that difficult by returning a map of strings.
The Response interface and various ResponseHandler response objects
now use the new case-insensitive HeaderName class. Additionally,
these objects now have a getHeaders() method that takes a field name
and returns a list of field values.
Airlift 0.126
Minor maintenance release. See CHANGES.
Airlift 0.125
Minor maintenance release. See CHANGES.
Airlift 0.124
Upgrade jmxutils which fixes the server not starting when LogJmxModule
is used due to a Java 8 compatibility issue with jmxutils.
Airlift 0.123
TestingHttpClient now uses a custom Processor interface that allows throwing
checked exceptions instead of Guava Function. This change is is generally
source-compatible but not binary-compatible.
AsyncSemaphore now use JDK Function instead of Guava Function. As above,
this change is generally source-compatible but not binary-compatible.
Airlift 0.122
Minor fixes to Jackson serialization.
Airlift 0.121
Minor maintenance release. See CHANGES.
Airlift 0.120
Minor maintenance release. See CHANGES.
Airlift 0.119
Minor maintenance release. See CHANGES.
Airlift 0.118
Minor maintenance release. See CHANGES.
Airlift 0.117
Minor maintenance release. See CHANGES.
Airlift 0.116
* Default Config Fixes
Configuration defaults bound with an annotation were not being applied due to
a bug. This also caused HTTP client defaults to not be applied.
* HTTP Selector and Acceptor Pool Configuration
In installations with a high HTTP request volume the default selector and
acceptor pool sizes in Jetty are too small which causes requests to backup
in OS queues and eventually fail.
Airlift 0.115
Minor changes to logging configuration. See CHANGES.
Airlift 0.114
Minor changes to logging configuration. See CHANGES.
Airlift 0.113
Minor maintenance release. See CHANGES.
Airlift 0.112
Minor maintenance release. See CHANGES.
Airlift 0.111
* SPNEGO
This version adds experimental support for SPNEGO auth for Http client.
The following options can be used to set up global Kerberos configuration:
http.authentication.krb5.config
http.authentication.krb5.credential-cache
http.authentication.krb5.keytab
SPNEGO needs to be configured on a per-client basis with the following options:
http-client.authentication.enabled
http-client.authentication.krb5.remote-service-name
http-client.authentication.krb5.principal
Airlift 0.110
* Future Utilities
We've added MoreFutures class which contains utility methods for Future and
the new Java8 CompletableFuture. For basic future, there are methods for
fetching the future value with minimal exception handling. For
CompletableFuture, there are methods for easily creating futures. Finally,
we have added methods for converting to and from Guava ListenableFuture to
ease the transition to CompletableFuture (note, these methods will be removed
in a future release)
Airlift 0.109
* Default Config
An application typically needs to override the default configuration of some
components. For example, the default timeouts in the HTTP client are too large
for communication between workers in a data center. Rather than requiring
these applications to ship with a default configuration file, we added the
ability to change the defaults for any configuration object. The following
example changes the default store time-to-live to 1 minute in the sample
server:
configBinder(binder).bindConfigDefaults(StoreConfig.class, storeConfig -> {
storeConfig.setTtl(new Duration(1, MINUTES));
});
Additionally, we have added support for overriding HTTP client defaults during
binding. For example, this code changes the default idle timeout to 2 seconds:
httpClientBinder(binder).bindHttpClient("event", ForEventClient.class)
.withConfigDefaults(config -> {
config.setIdleTimeout(new Duration(2, SECONDS));
});
Airlift 0.108
Minor maintenance release. See CHANGES.
Airlift 0.107
We have replaced use of SLF4J in the logging backend with a custom logging
implementation directly connected to Java util logging. This eases management
of logging dependencies as the core codebase no longer depends directly on any
third party logging frameworks.
Airlift 0.106
Minor maintenance release. See CHANGES.
Airlift 0.105
Minor maintenance release. See CHANGES.
Airlift 0.104
Minor maintenance release. See CHANGES.
Airlift 0.103
Minor maintenance release. See CHANGES.
Airlift 0.102
* Threads
Thread factories provided by the Threads utility class now add threads to a
ThreadGroup. Some tools organize threads by ThreadGroup which makes it easier
to work with servers with lots of threads. The ThreadGroup is named using:
String.format(nameFormat, "group")
This means the nameFormat must expect a String argument instead of an int. To
ease migration, the code adapts formats with a single %d, but this will be
removed in a future release.
Airlift 0.101
The previous implementation of dense HyperLogLog had an issue where errors
introduced by a loss of information would compound when many instances were
merged together. The new implementation is backward compatible with serialized
HLLs generated by older versions.
HyperLogLog now supports up to 64k buckets.
Airlift 0.100
The previous implementation of sparse HyperLogLog had an issue where errors
introduced by a loss of information would compound when many instances were
merged together. We've replaced it with a new implementation that doesn't
suffer from this problem, but the change in the serialization format breaks
backward compatibility.
Airlift 0.99
* Java 8 is now required
Moving forward, Airlift will be written using the new Java 8 syntax and APIs, and
releases will be compiled using Java 8. This means Java 8 is required for
running Airlift-based servers or using using Airlift libraries.
Airlift 0.98
Minor maintenance release. See CHANGES.
Airlift 0.97
* AsyncSemaphore
AsyncSemaphore is a non-blocking concurrency throttler for asynchronous tasks.
It guarantees that no more than a fixed number of asynchronous tasks will be
outstanding at any point in time without blocking any submission threads. Task
completion is determined by a ListenableFuture returned by the supplied submitter
function.
Airlift 0.96
* AbstractConfigurationAwareModule
Extending this module makes it easy to access configuration at binding time,
which allows conditionally installing modules or bindings based on config.
* Upgrade to Guava 18.0
* HttpClient
We have removed the deprecated interface AsyncHttpClient and binder method
bindAsyncHttpClient(). These can be replaced with HttpClient and
bindHttpClient(), respectively.
* HttpServer
The HTTP server now shows stack traces in error responses by default. To
disable this behavior, set "http-server.show-stack-trace" to "false".
Airlift 0.95
* Discovery
We have added Announcer.forceAnnounce() and ServiceSelector.refresh() which
make synchronizing announcing with a discovery server easier. This is
particularly useful for testing.
Airlift 0.94
* SetThreadName
The SetThreadName class takes advantage of try-with-resources to safely rename a
thread and restore its original name when it goes out of scope.
Here's a usage example:
try (SetThreadName ignored = new SetThreadName("query-%s", queryId)) {
...
}
* HttpClient
JettyHttpClient would request GZIP responses if constructed manually using a
rarely used second constructor.
Airlift 0.93
* Thread Factory
We have changed the thread factory implementations to capture the thread context
class loader during factory creation and set this class loader on threads created
by the factory.
* Smile mapper
We have added a JAX-RS mapper encoding responses using Smile. Smile is a highly
efficient binary encoding of JSON data. For more information on Smile see:
http://wiki.fasterxml.com/SmileFormatSpec
Airlift 0.92
* JAX-RS 2
We have upgraded to Jersey 2.9.1 which implements the JAX-RS 2 specification. As
part of this upgrade we have introduced an explicit binder for JAX-RS resources.
For example the following registers the person JAX-RS resource:
JaxrsBinder.jaxrsBinder(binder).bind(PersonResource.class)
The new explicit binding code is backwards compatible with the "binding scraping"
code, so you do not need to immediately update your code. The new JaxrsModule
will print a warning for each resource that was not explicitly bound, so it is
easy to find update existing code Once you have updated everything, set the
"requireExplicitBindings" when constructing the JaxrsModule to prevent
regressions. In a future version we will remove the backwards compatibility,
so please update soon.
Airlift 0.91
Minor maintenance release. See CHANGES.
Airlift 0.90
Minor maintenance release. See CHANGES.
Airlift 0.89
* BoundedExecutor
BoundedExecutor is a light-weight executor decorator that guarantees that no more
than a certain number of threads will run tasks submitted through it. Multiple
BoundedExecutors that delegate to the same underlying executor will a fair share
of the threads proportional to the configured limit.
Airlift 0.88
* HttpClient
This release fixes a couple of performance issues and bugs in the HttpClient:
- The client was inadvertently requesting GZIP responses. We've disabled this
behavior since it affects CPU utilization.
- We've fixed an issue in the way the response buffers are managed that
affects performance due to unnecessary resizing.
- The maximum response size was hard-coded instead of using the existing
config option.
* HyperLogLog
We've added an implementation of HyperLogLog for cardinality estimation.
Airlift 0.87
* HttpUriBuilder
We've added support for constructing Http URIs with IPv6 addresses in the
host part.
URI uri = HttpUriBuilder.uriBuilder()
.scheme("http")
.host("FEDC:BA98:7654:3210:FEDC:BA98:7654:3210")
.port(8081)
.build();
assertEquals(uri.toASCIIString(), "http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:8081");
* Jetty updated to 9.1.3
Airlift 0.86
* Upgrade to Jetty 9.1
We have upgraded the Jetty server to version 9.1.2 which includes support for
the Servlet API 3.1, websockets and SPDY with server side push. In Jetty 9,
the team rewrote significant portions of the core engine which results in a
dramatic reduction in latency.
* Replaced NettyHttpClient and ApacheHttpClient with JettyHttpClient
We replaced the custom HttpClient based on Netty with the far superior Jetty
http client. The new JettyHttpClient handles both synchronous and asynchronous
requests using a single client, so you no longer need to bind multiple clients.
To migrate to this version you will need to make the the following changes:
- Replace direct uses of ApacheHttpClient, StandaloneNettyAsyncHttpClient
and NettyAsyncHttpClient with JettyHttpClient
- The AsyncHttpClient interface is now deprecated and can be replaced with
HttpClient which now has asynchronous methods.
Airlift 0.85
* JsonCodec
The JsonCodec.jsonCodec() factory method now uses Guava's TypeToken rather than
Guice's TypeLiteral. This backwards incompatible change allows using the json
module without a dependency on Guice.
Airlift 0.84
* NOTICE file
We made a minor improvement to allow projects that generate binary tarballs using
airlift packaging to include a NOTICE file. To take advantage of this feature,
place the NOTICE file at the root of the maven module.
Airlift 0.83
* Upgrade to Guava 15.0
Airlift 0.82
* Fix bug where the launcher was not starting processes in the data directory
Airlift 0.81
* Return local announcements from service selectors
Local announcements will always be included in the list of services
returned from a service selector. For services that need to see their
own announcements, this improves reliability by removing a race condition
and allows them to run without a discovery server for testing purposes.
Airlift 0.80
* Launcher
This release fixes an important issue in the new Python-based launcher introduced in 0.79
that prevents servers from starting properly. If you're relying on packaging/launcher, you
should upgrade to this version.
Airlift 0.79
* JMX agent
We've replaced the custom JMX agent in airlift by the one built into the JVM.
This change makes it possible to use the VisualGC plugin for VisualVM when jstatd
is also running in the same machine as the airlift-based process.
As a result of this change, we've also removed the 'jmx.rmiserver.hostname' configuration
option in favor of Java's native configuration option 'java.rmi.server.hostname'.
* TimeStat
We've deprecated TimedStat in favor of TimeStat. The new implementation operates with nanosecond
granularity instead of milliseconds, provides more accurate results for quantile queries
and supports Java 7's try-with-resources syntax:
TimeStat stat = ...
try (BlockTimer ignored = stat.time()) {
// do something
}
* Roll http request log
The http-request.log created by the http server module is now rolled and compressed
on a daily basis. This change makes the http request log work the same way as the
server.log file. The default retention for log files is:
http-server.log.retention-time = 15d
* Launcher
We've reimplemented the launcher in Python. It is compatible with Python 2.4, which is
generally available in most Unix distributions. This means there's no longer a dependency
on Ruby 1.9.
As part of the rewrite, we've fixed some long-standing issues and added a couple of features:
- Application logs are now written to var/log/server.log instead of launcher.log.
- stdout/stderr from the JVM is now redirected to var/log/launcher.log. This is necessary
for capturing thread dumps and other VM diagnostics output.
- If the package contains a 'plugin' directory, it will be symlinked into the data directory.
This makes it possible for the server to locate and load plugins dynamically when the
data directory does not match the installation directory.
- All jar files in the lib directory are now used to build the classpath for the process. This
makes it easier to re-package servers and add new dependencies (e.g., database drivers),
without having to rebuild the server jar file and the manifest classspath.
- In 64-bit Linux, tools like ps, top, etc will now show a custom name for the Java process
(instead of just 'java'). The name can be overridden by setting the "process-name" property
in the server pom file. The default value is determined by the artifactId of the pom.
- pid file handling is now more robust and no longer suffers from issues due to stale pid files
Important: projects that depend on Airbase need to upgrade to version 8 or higher.
Airlift 0.78
* Units
We've made a backwards incompatible change to the Duration API to align with
the DataSize API. The new Duration code has many new features:
- Duration remembers the original unit, so parse and print round trips
- toMillis() returns a long so it is easier to use with normal Java APIs
- roundTo(TimeUnit) return a long in the specified unit
- convertToMostSuccinctTimeUnit() will select the TimeUnit to produce
the easiest to read value
- timeUnitToString(TimeUnit) to get a clean short name for TimeUnits
To update to the new api, you will need to:
convertTo(TimeUnit) now returns a Duration instead of a double
- use getValue(TimeUnit) for the old behavior
toMillis() now returns a long instead of a double
- use getValue(MILLISECONDS) for the old behavior
toString() returns a string in the original units instead of millis
- use toString(MILLISECONDS) for the old behavior
This API remains in BETA, and is subject to additional backwards incompatible
changes.
* HttpClient exception handling
We have redesigned exception handling in the HttpClient. In the new design,
the handle or handleException method of the Response handler should be called
once per execution. To make this change we had to make some backwards
incompatible changes.
The new signature for handleException in the ResponseHandler is:
T handleException(Request request, Exception exception)
throws E;
This allows the handler to return a "default" value when an exception occurs,
and makes it much clearer to the user how to implement the method.
The AsyncHttpClient.executeAsync method now returns a ListenableFuture instead
of a CheckedFuture. Any caller that was using the checkedGet() method of
CheckedFuture will need to change to get() and handle the exceptions or use
one of the helper methods in Guava Futures.
This API remains in BETA, and is subject to additional backwards incompatible
changes.
* NodeInfo
The IP address detection code now verifies that the address discovered from
the machine's hostname is actually available for use (i.e it is assigned to
the machine and the interface is up). This eliminates the problem of a
machine having a hostname that actually resolves to a different machine.
The TestingNodeModule produces a NodeInfo that is always set to localhost.
This causes unit tests to always bind to localhost rather than the public IP
of the machine, which is safer and reduces potential problems.
* Discovery ServiceSelectorManager
We added a ServiceSelectorManager to the discovery client that allows fetching
or refreshing all service selectors. This is useful for tests or for forcing a
refresh of selectors at startup after the initial announcements have been made.
Airlift 0.77
* QuantileDigest
We made a number of improvements to QuantileDigest. QuantileDigests now support
negative values, can be serialized/deserialized and merged with other QuantileDigests.
Important: QuantileDigest is no longer thread-safe, so if you have code that relies
on this guarantee, you'll need to update it to provide thread-safety at that layer.
Airlift 0.76
* Rack server support has been moved to a separate project: airlift-rack
* Added TestingHttpClient to simplify testing
Airlift 0.75
* Minor bug fixes
Airlift 0.74
* Experimental modules
The trailing "-experimental" has been removed from all artifact names.
Any APIs that are experimental should be annotated with @Beta instead.
* AsyncHttpClient now uses less threads when using multiple clients.
Airlift 0.73
* AsyncHttpClient fixes
This release contains a number of fixes for the AsyncHttpClient and additional
changes to ease debugging of async requests. In some cases the ResponseHandler
would not be notified of errors with the handleException method, even though
the future returned from the executeAsync method would be notified of the
error. To help with debugging, the executeAsync method now returns an
AsyncHttpResponseFuture which has a new method getState that can be used to
determine the current state of the http request. This is helpful when requests
seem to get lost after execution. Finally, we have changed the Netty setup to
properly name the worker threads, so you can more easily find the http client
threads.
Airlift 0.72
* Multiple Event Implementations
The event system now support multiple back end implementations simultaneously.
Events are simply sent to each back end. The existing event implementations
have been retrofitted and no code changes are necessary. The NullEventModule
has been deprecated in favor of the new EventModule, which has no event
contains the base event system with no back end implementation installed.
* Removal of jax-rs classes from clients
We have replaced all uses of jax-rs classes in clients with classes from Guava
or new classes in the Airlift http client. In particular, the HttpHeaders and
MediaType classes in jax-rs has been replaced with HttpHeaders and MediaType
in Guava, and the Status and CacheControl classes have been replaced with
HttpStatus and CacheControl in the Airlift http-client. This reduces the size
of clients and avoids some packing problems with the latest jax-rs releases.
Any existing code can continue to use the jax-rs versions of these classes, but
jax-rs is no longer required.
Airlift 0.71
* New build system
Removed the library POM. Uses the airbase project as base pom for building.
* Global dependency upgrades
- Jetty to 8.1.9
- Guava to 14.0
- BVal to 0.5
- slf4j to 1.7.2
- logback to 1.0.9
- Jersey to 1.17.1
- Joda Time to 2.1
- TestNG to 6.8
- Mockito to 1.9.5
- Hamcrest to 1.3
* Specific dependency upgrades
- JMX: jcommander to 1.30
- DBPool: mysql connector to 5.1.23
- DBPool: h2 to 1.3.170
- httpclient: httpclient to 4.2.3
- httpclient: httpcore to 4.2.3
* Dependency changes
com.google.code.findbugs:jsr305 was replaced with com.google.code.findbugs:annotations
The jsr305 jar contains only the JSR 305 annotations while the
annotations jar also contains additional, Findbugs specific
annotations.
* Replacing the library and rest-server-base pom with airbase
Projects using the airlift/library and airlift/rest-server-base poms as their
parent must switch to use airbase (https://github.com/airlift/airbase/).
Replace the parent section with
<parent>
<groupId>io.airlift</groupId>
<artifactId>airbase</artifactId>
<version>... latest version ...</version>
</parent>
when replacing the rest-server-base, it must also activate the airlift
packaging by creating a file called `.build-airlift` in the directory
of the module or sub-module that should be packaged as an airlift
packaged project.
As airbase provides packaging independently, the version of airlift
used for packaging and launcher is controlled with
`dep.packaging.version`. To ensure that a project uses the same
version for airbase while building and packaging, factoring out the
version of airlift in the parent pom is recommended:
<properties>
<dep.airlift.version>0.71-SNAPSHOT</dep.airlift.version>
<dep.packaging.version>${dep.airlift.version}</dep.packaging.version>
</properties>
...
<dependencyManagement>
<dependencies>
...
<dependency>
<groupId>com.facebook.airlift</groupId>
<artifactId>bootstrap</artifactId>
<version>${dep.airlift.version}</version>
</dependency>
<dependency>
<groupId>com.facebook.airlift</groupId>
<artifactId>configuration</artifactId>
<version>${dep.airlift.version}</version>
</dependency>
...
</dependencies>
</dependencyManagement>
`dep.airlift.version` is picked up when the project is built and
`dep.packaging.version` is used when the project is packaged.
* Logging
The com.facebook.airlift.log.Logger API was updated to work directly against Java's built-in
logging APIs. This is intended to make it easier to allow code that runs in isolated
classloaders to use the logging system and should have no visible effects.
Airlift 0.70
* Upgrade to Jackson 2.1.x
Jackson 1.x has been upgraded to 2.1.x. This requires substantial code and
dependency changes as all the artifacts are named differently and all the
classes are in different packages. The upgrade guide has more details:
http://wiki.fasterxml.com/JacksonUpgradeFrom19To20.
The Json module now also supports Jackson Modules (more details at
http://wiki.fasterxml.com/JacksonFeatureModules).
* True async http client
The AsyncHttpClient has been rewritten on top of Netty. As part of this
work, the AsyncHttpClient has been converted into an interface and the
main implementation is NettyAsyncHttpClient. Additionally, the execute
method has been renamed to executeAsync so the AsyncHttpClient can extend
HttpClient. The change is to simply replace:
asyncHttpClient.execute(request, responseHandler);
with:
asyncHttpClient.executeAsync(request, responseHandler)
The other main change is when using the HttpClientBinder. The bindAsyncHttpClient
method now binds both an AsyncHttpClient and a HttpClient, so if you were binding
both before, you will need to remove the call to bindHttpClient.
This API remains in BETA, and is subject to additional backwards incompatible
changes.
* Socks proxy support in http client
The new NettyAsyncHttpClient supports connecting to servers through a socks proxy.
This is particularly useful for accessing production servers. The easiest way
to use this feature is to establish a socks proxy using ssh, as follows:
ssh -N -D 1080 any.server.running.sshd
Then simply set the HttpClientConfig SocksProxy property either directly in code
or via the following config option:
myclient.http-client.socks-proxy = localhost:1080
* BETA: Bootstrap for testing
The Bootstrap class performs may initialization tasks for servers, but when
testing not all installation tasks are desired. Specifically, the Bootstrap
class loads configuration properties from a file specified using System
property. The new setConfigurationProperty and setConfigurationProperties
have been added to supply the properties directly. Another, problematic
task is logging initialization, which can now be disabled with the new
doNotInitializeLogging() method. For an example of Bootstrap a test see
com.facebook.airlift.sample.TestServer.
Airlift 0.69
* In this release we have upgraded the following dependencies
- jmxutils 1.13
- Jackson 1.9.12
Airlift 0.68
* Support for v1 events has been removed
* HTTP client shutdown
The HttpClient and AsyncHttpClients now implement Closeable and properly
shutdown when used as lifecycle objects. Calling close shuts down the
connection pool for the underlying Apache HTTP client.
* Pretty-printed JSON
The injected JsonCodecFactory and injected codecs no longer produce
pretty-printed JSON. The previous behavior was a bug. JsonCodecFactory
has a method to return a factory that produces pretty-print codecs.
Airlift 0.67
* Cassandra module has been removed
Starting with this version, the Cassandra module is no longer supported
* DataSize and Duration can now be serialized as json
* In this release we have upgraded the following dependencies
- Apache HttpClient 4.2.2
Airlift 0.66
* Java 7 is now required
Moving forward Airlift will be written using the new Java 7 syntax and APIs, and
releases will be compiled using Java 7. This means Java 7 is required for
running Airlift-based servers.
* No thread pool for CounterStat
We changed the CounterStat implementation to use forward decay, which eliminates
the need for a thread pool (and having to manage a thread pool).
* HttpUriBuilder a fluent api for HTTP URIs
Building HTTP URIs using java.net.URI is difficult and error prone, so we added
a simple fluent API for building up HTTP URIs. For example:
URI uri = uriBuilder()
.scheme("http")
.host("www.example.com")
.port(8081)
.replacePath("/a/b/c")
.replaceParameter("k", "1")
.build();
Additionally, the API can manipulate existing URIs:
URI uri = HttpUriBuilder.uriBuilderFrom(URI.create("http://www.example.com:8081/?a=apple&b=banana"))
.replaceParameter("a", "apricot")
.appendPath("a/b/c")
.build();
* Bind Jackson key serializers and deserializers in Guice
We've added the ability to bind Jackson key serializers and deserializers with
the JsonBinder.
* Configuration types can now use a fromString method for coercion
The configuration system will look for methods in the following order:
fromString(String);
valueOf(String);
<init>(String);
* Quantile Digest
We've introduced an implementation of Quantile Digests, a data structure for computing approximate
quantile statistics and histograms in sub-linear space with guaranteed error bounds, from the paper
"Medians and Beyond: New Aggregation Techniques for Sensor Networks". It supports
exponentially-decayed counts and can be used to query quantiles and histograms very efficiently.
* DistributionStat
We've deprecated MeterStat in favor of DistributionStat. This new implementation is based on
QuantileDigest and exposes statistically valid percentile metrics at various resolutions
(1/5/15-minute, all time). It's designed to be exported via jmxutil's @Managed annotations.
Airlift 0.65
* Re-packaged the project under io.airlift
Platform 0.64
* Fix bug that prevented skeleton server from starting
* Enforce use of HttpClientBinder
The previous way of using HttpClient was to create a new instance of the
HttpClientModule or AsyncHttpClientModule for each client. The recent addition
of filter support added a binding API, HttpClientBinder. The use of this API
is now required. The modules cannot be used directly anymore. Here is an
example of how to use the binder:
httpClientBinder(binder).bindHttpClient("foo", FooClient.class)
.withFilter(FirstFilter.class)
.withFilter(SecondFilter.class);
Here is a simpler example to create a client for use with other platform
services. The client will pass the trace token when making requests:
httpClientBinder(binder).bindHttpClient("foo", FooClient.class).withTracing();
Platform 0.63
* Fix bug that prevented sample and skeleton servers from starting
Platform 0.62
* Removed all dependencies to Ning's Asynchronous HTTP client
Since http-client-experimental now replaces the usage of Ning's Asynchronous
HTTP client, we've removed all existing references to that package. Rest
servers that upgrade to 0.62 may need to include it as an explicit dependency
if they don't want to upgrade.
* Cleaned up dependency management
There is now a library project that contains a single parent dependencyManagement
section for all poms to inherit from. This now includes REST Server Base. This
ensures that all platform libraries are built with a single set of versions that
produce fully compatible dependency closures with the services that consume them.
* Multiple refactoring commits for readability
There were multiple refactoring efforts to enhance readability. Some classes that
moved include:
RequestBuilder -> Request.Builder
EchoServlet is a separate class now
MediaType is now available as a class in Guava 12
* Addition of request filter support to HttpClient
HttpClients may now bind in request filters, an example of such can be found by
following the code in com.proofpoint.http.client.TestHttpClientBinder. This
was added to support having the TraceToken added into outbound http client requests.
* Removal of deprecated JavaUrlHttpClient
* Removal of the experimental module, segmented into separate modules
At this time, we will no longer have a single experimental module, please be aware
of classes that have the @Beta annotation going forward. Such classes are subject
to backwards incompatible changes.
Platform 0.61