neils-dev opened a new pull request #2601: URL: https://github.com/apache/ozone/pull/2601
## What changes were proposed in this pull request? This PR includes the Grpc server service servicing `OzoneManagerProtocol` requests over gRPC invoked by the OM. The server consists of `GrpcOzoneManagerServer` that is started by the OM and establishes the persistent connection between the om and the s3 gateway (current port 8981 and configurable by java configuration class). The server creates the connection with the `OzoneManagerServiceGrpc` that services `OMRequests` through the `OzoneManagerProtocolServerSideTranslatorPB`. The `OzoneManagerServiceGrpc` requires creating a thread context '`Server.Call`' for every ratis transaction request processed through the `OzoneManagerProtocolServerSideTranslatorPB`. The Grpc server service is enabled / disabled through the boolean configuration key : `OZONE_OM_S3_GPRC_SERVER_ENABLED` and corresponding property `ozone.om.s3.grpc.server_enabled`. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-5211 ## How was this patch tested? Patch was tested in 2 ways, 1. Unit test `TestGrpcOzoneManagerServer`: Tests invoking Om gRPC service - creating gRPC server channel invoking grpc service to service OzoneManagerProtocol requests and tearing down service. `$ cd hadoop-ozone/ozone-manager` `$ mvn -Dtest=TestGrpcOzoneManagerServer test` ``` [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.hadoop.ozone.om.TestGrpcOzoneManagerServer [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.067 s - in org.apache.hadoop.ozone.om.TestGrpcOzoneManagerServer [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 ``` 2. Manual testing through configuring `ozone-site.xml `to enable (true)/ disable (false) ozone-manager Grpc server service through property ``` <property> <name>ozone.om.s3.grpc.server_enabled</name> <value>true</value> </property> ``` Ensuring that gRPC server is started by OM when enabled and not started when disabled though log4j logs. eg. `INFO om.GrpcOzoneManagerServer (GrpcOzoneManagerServer.java:start(61)) - GrpcOzoneManagerServer is started using port 8981 ` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
