Commit Graph

2801 Commits

Author SHA1 Message Date
Eric Anderson 894c815832
core: Document Metadata ownership passes to the Call{,Listener}
This was already clearly documented in ServerCall.Listener and
ClientCall.
2018-05-03 07:08:27 -07:00
zpencer 722acb151a
services: BinaryLog is an overused term, rename to BinlogHelper (#4429)
This class really is an internal helper class for the implementation.
2018-05-02 18:11:21 -07:00
Carl Mastrangelo 9817281dc3
service: include go package in channelz.proto 2018-05-02 17:15:00 -07:00
Grant Oakley 6bf8e0c084 core: add @CheckReturnValue to CallOptions 2018-05-02 15:56:52 -07:00
Carl Mastrangelo aeb61db278
services: update channelz proto package 2018-05-02 15:16:29 -07:00
ZHANG Dapeng e19e8f7d40
core: populate effective deadline to ClientStream
Added `ClientStream.setDeadline(Deadline deadline)` method, which will set the timeout header.

Resolves #4412
2018-05-02 13:31:03 -07:00
ZHANG Dapeng d50c191aca
core/stub: fix lint warnings 2018-05-02 10:37:32 -07:00
Eric Anderson 3a11a1f8b2 services: BinaryLogProviderImpl is experimental (#4420)
This class is not stable API.
2018-05-02 08:21:37 -07:00
Grant Oakley fcb48ff216 core,stub: Add toString() to ClientCallImpl and GrpcFuture 2018-05-01 16:49:56 -07:00
zpencer f8424f7b7b
examples: add kotlin and kotlin android examples (#4037)
Add kotlin version of HelloWorldClient and HelloWorldServer.
Add kotlin version of android example.
2018-05-01 14:54:34 -07:00
Carl Mastrangelo 3e43757efc
protobuf-nano: use specific package in test proto 2018-05-01 10:23:47 -07:00
Carl Mastrangelo 8be87de9b0
compiler: make testing service used by compiler not conflict with interop-testing proto
This change puts the compiler test.proto file in a directory that matches it's path.  The current proto package has a namespace collision with the grpc.testing proto in interop-testing.  Thus, this PR:

* change the package of test.proto to be grpc.testing.compiler
* moves the test.proto into the matching grpc/testing/compiler/test.proto path
* updates the generated code.
2018-05-01 10:13:18 -07:00
Carl Mastrangelo d35e77869e
services: move health.proto to correct directory 2018-04-30 18:32:02 -07:00
ZHANG Dapeng 02c4fa01c6
testing: GrpcCleanupRule
This will ease a lot of test scenarios that we want to automatically shut down servers and channels, with much more flexibility than `GrpcServerRule`. Resolves #3624

**ManagedChannel/Server cleanup details:**
- If the test has already failed, call `shutdownNow()` for each of the resources registered. Throw (an exception including) the original failure. End.
- If the test is successful, call `shutdown()` for each of the resources registered.
- Call `awaitTermination()` with `timeout = deadline - current time` and assert termination for each resource.  If any error occurs, break immediately and call `shutdownNow()` for the current resource and all the rest resources.
-  Throw the first exception encountered if any.
2018-04-30 17:15:52 -07:00
Carl Mastrangelo 045c566b88
netty: bump to 4.1.24-Final 2018-04-30 16:55:52 -07:00
ZHANG Dapeng b58e0f4059
core: stickiness for RoundRobinLoadBalancer
Add weak stickiness support for Round Robin lb.
2018-04-30 16:46:35 -07:00
Carl Mastrangelo 2b6edfc79d
grpclb: move load balancer proto to package-matching directory 2018-04-30 16:14:32 -07:00
Jorg Heymans 48f103c1ed examples: remove deprecated usage of usePlainText(boolean) (#4396)
Update examples (including android) to use non deprecated version of method.
2018-04-30 16:12:41 -07:00
Carl Mastrangelo 6bd5582175
services: update channelz with docs from upstream 2018-04-30 15:26:36 -07:00
Carl Mastrangelo b0333c6588
benchmarks: move proto to matching package structure 2018-04-30 14:12:53 -07:00
Carl Mastrangelo 017399027e
android-interop-testing: normalize integration proto directories 2018-04-30 11:31:10 -07:00
Carl Mastrangelo 26581562f0
interop-testing: normalize integration proto directories 2018-04-30 11:30:49 -07:00
Eric Gribkoff 785ac4772e
README.md: clarify that Android is for client-side use (#4408) 2018-04-30 10:28:41 -07:00
Eric Gribkoff 1ad11c1008
android: avoid static init of robolectric shadows (#4402) 2018-04-28 07:22:59 -07:00
Carl Mastrangelo f4f4302b85
services: remove monitoring file 2018-04-27 21:34:43 -07:00
zpencer acfb3b9851
services,core: simplify CallId generation (#4365)
BinaryLog.java is the class that is responsible for intercepting
client and server calls. It now requires a CallId to be passed
in. The BinaryLogProviderImpl is responsible for generating a
CallId and passing it in.
2018-04-27 18:32:36 -07:00
zpencer 9ada30b25d
(low priority) core,netty,interop-testing: stabilize maxInboundMessageSize API (#4399)
On server side, `maxMessageSize` is deprecated for
`maxInboundMessageSize` to match the channel builder.

Update usages to use new setter.
2018-04-27 16:01:16 -07:00
zpencer 1d80febbc0
buildscripts: make unix.sh and make_dependencies.sh arch aware (#4384)
ARCH can be '32' or '64'. If it is not set then default to '64'.

make_dependencies.sh should do the symlinking
2018-04-27 15:59:16 -07:00
Carl Mastrangelo 6046831e58
alts: make imported files have imports below package, and set licence 2018-04-26 14:48:11 -07:00
David Ostrovsky 23fcedfb6f Bazel: Fix compilation in Java 9
Fixes: #3633.

Test Plan:

On most recent Bazel version run:

  $ bazel --host_javabase=/usr/lib64/jvm/java-9-openjdk \
    build --javacopt='--release 9' \
    --java_toolchain=@bazel_tools//tools/jdk:toolchain_jdk9 \
    examples:helloworld_java_grpc
2018-04-26 14:37:57 -07:00
zpencer 44c79fbe5d
services: fix channelz linter warnings (#4395)
- final classes should have toString()
- fix arg name mismatch
2018-04-25 17:55:42 -07:00
Carl Mastrangelo 2027f6f81c
services: update to remote channelz.proto def 2018-04-25 17:05:58 -07:00
zpencer c6c20e9491
buildscripts: add linux job that release_artifacts can dep on (#4392)
* buildscripts: add linux job that release_artifacts can dep on

* rename linux -> linux_artifacts

* fix script name
2018-04-25 15:54:15 -07:00
Carl Mastrangelo 720d4fab69
all: print out diff of methods in android APK 2018-04-25 15:53:56 -07:00
Eric Gribkoff ef2a085acd
android-interop-testing: re-add min sdk version (#4393) 2018-04-25 14:48:35 -07:00
zpencer 1a2d076aed
core,netty,okhttp,services,testing: expose security info to channelz (#4300)
Pull the TLS info from the SSLSession object for TLS, and AltsContext for ALTS.
2018-04-25 14:38:09 -07:00
zpencer 218e944e16
buildscripts: initial kokoro config for auto releasing artifacts (#4391)
The script does nothing at the moment other than set up the kokoro
job.
2018-04-25 14:12:06 -07:00
zpencer 7cd2f5c3c0
buildscripts: sonatype uploader ussing CONF before it is set (#4388)
Set $CONF before we use it.
Also enable some defensive bash flags to catch errors.
Default value for USER and PASS
2018-04-25 12:54:49 -07:00
Carl Mastrangelo 6bdf5de342
alts: move alts protos to match proto package 2018-04-25 12:01:22 -07:00
Eric Gribkoff 3beb73eb46
android-interop-testing: update app dependencies (#4313) 2018-04-24 14:33:06 -07:00
zpencer 62e6e2de78
Start 1.13.0 development cycle (#4383) 2018-04-23 15:24:24 -07:00
Eric Gribkoff ba86a86c77
android: add AndroidChannelBuilder (#4172) 2018-04-23 11:49:36 -07:00
Eric Anderson a47266ea4a kokoro: Avoid --include-build for Android
Since 4369e8cd the --include-build just opens us up to trouble with
accidentally building the protoc plugin. Since we're going to do a
./gradlew install anyway, let's just wait until after that point for
building cronet.

This sort of problem was experienced while developing #4369.
2018-04-21 00:03:44 -07:00
Carl Mastrangelo 9f6270848b
benchmarks: remove unused proto import 2018-04-20 17:40:32 -07:00
zpencer 48b7c62b43
buildscripts: always keep mvn artifacts (#4372)
After searching for "artifacts retention policy" in the
kokoro-users group, I learned that there's a default 90 day
retention policy already in place.
2018-04-20 15:19:48 -07:00
Carl Mastrangelo c37ea15830
core: also expose parser on JsonParser 2018-04-20 13:25:21 -07:00
ZHANG Dapeng 74532acce0
core: use List instead of Set for drainedSubstreams
This improves latency performance (retry enabled) for NETTY transport by about 2us. For INPROCESS, NETTY_LOCAL, OKHTTP transports, the improvement seems much less than 2us.

```
before
Benchmark                                               (direct)  (transport)    Mode     Cnt         Score     Error  Units
TransportBenchmark.unaryCall1024                            true        NETTY  sample  260801     76566.536 ± 189.439  ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.00        true        NETTY  sample             60480.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.50        true        NETTY  sample             75264.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.90        true        NETTY  sample             85504.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.95        true        NETTY  sample             87424.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.99        true        NETTY  sample            100864.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.999       true        NETTY  sample            140800.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.9999      true        NETTY  sample            205547.469            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p1.00        true        NETTY  sample           3915776.000            ns/op 
TransportBenchmark.unaryCall1024                           false        NETTY  sample  208352     95865.619 ± 113.142  ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.00       false        NETTY  sample             72576.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.50       false        NETTY  sample             93568.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.90       false        NETTY  sample            105728.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.95       false        NETTY  sample            109568.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.99       false        NETTY  sample            124544.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.999      false        NETTY  sample            161792.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.9999     false        NETTY  sample            230520.448            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p1.00       false        NETTY  sample           3997696.000            ns/op
```

```
after
Benchmark                                               (direct)  (transport)    Mode     Cnt         Score     Error  Units
TransportBenchmark.unaryCall1024                            true        NETTY  sample  269471     74104.666 ± 182.514  ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.00        true        NETTY  sample             60992.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.50        true        NETTY  sample             70912.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.90        true        NETTY  sample             83584.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.95        true        NETTY  sample             85888.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.99        true        NETTY  sample            100224.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.999       true        NETTY  sample            142848.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.9999      true        NETTY  sample            489527.706            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p1.00        true        NETTY  sample           4300800.000            ns/op
TransportBenchmark.unaryCall1024                           false        NETTY  sample  216000     92468.337 ±  90.229  ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.00       false        NETTY  sample             68480.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.50       false        NETTY  sample             89472.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.90       false        NETTY  sample            103680.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.95       false        NETTY  sample            107008.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.99       false        NETTY  sample            120960.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.999      false        NETTY  sample            159232.000            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p0.9999     false        NETTY  sample            272076.493            ns/op
TransportBenchmark.unaryCall1024:unaryCall1024·p1.00       false        NETTY  sample           2662400.000            ns/op
```
2018-04-20 11:22:32 -07:00
Carl Mastrangelo c8aa9f70ca
services: move channelz proto into normalized directory structure 2018-04-20 10:53:45 -07:00
zpencer f5e8ec18b7
services: avoid static initialization for BinaryLog.java (#4363)
The code that uses this will create an instance.
2018-04-19 17:51:49 -07:00
Eric Anderson ddf77f59cc core: Fix experimental API issue for channel state API
The earlier issue was for the feature itself, not the stabilization.
2018-04-19 17:38:20 -07:00