[
https://issues.apache.org/jira/browse/HDFS-15790?focusedWorklogId=579789&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-579789
]
ASF GitHub Bot logged work on HDFS-15790:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Apr/21 06:31
Start Date: 09/Apr/21 06:31
Worklog Time Spent: 10m
Work Description: aajisaka commented on a change in pull request #2767:
URL: https://github.com/apache/hadoop/pull/2767#discussion_r610378108
##########
File path:
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRpc.java
##########
@@ -179,10 +281,41 @@ public void testProtoBufRpc2() throws Exception {
MetricsRecordBuilder rpcDetailedMetrics =
getMetrics(server.getRpcDetailedMetrics().name());
assertCounterGt("Echo2NumOps", 0L, rpcDetailedMetrics);
+
+ if (testWithLegacy) {
+ testProtobufLegacy();
+ }
+ }
+
+ private void testProtobufLegacy()
+ throws IOException, com.google.protobuf.ServiceException {
+ TestRpcService2Legacy client = getClientLegacy();
+
+ // Test ping method
+ client.ping2(null,
TestProtosLegacy.EmptyRequestProto.newBuilder().build());
+
+ // Test echo method
+ TestProtosLegacy.EchoResponseProto echoResponse = client.echo2(null,
+ TestProtosLegacy.EchoRequestProto.newBuilder().setMessage("hello")
+ .build());
+ assertThat(echoResponse.getMessage()).isEqualTo("hello");
+
+ // Ensure RPC metrics are updated
+ MetricsRecordBuilder rpcMetrics =
getMetrics(server.getRpcMetrics().name());
+ assertCounterGt("RpcQueueTimeNumOps", 0L, rpcMetrics);
+ assertCounterGt("RpcProcessingTimeNumOps", 0L, rpcMetrics);
+
+ MetricsRecordBuilder rpcDetailedMetrics =
+ getMetrics(server.getRpcDetailedMetrics().name());
+ assertCounterGt("Echo2NumOps", 0L, rpcDetailedMetrics);
}
@Test (timeout=5000)
public void testProtoBufRandomException() throws Exception {
+ if (testWithLegacy) {
+ //No test with legacy
+ return;
+ }
Review comment:
`assumeFalse(testWithLegacy)` can be used instead.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 579789)
Time Spent: 1h 40m (was: 1.5h)
> Make ProtobufRpcEngineProtos and ProtobufRpcEngineProtos2 Co-Exist
> ------------------------------------------------------------------
>
> Key: HDFS-15790
> URL: https://issues.apache.org/jira/browse/HDFS-15790
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> Changing from Protobuf 2 to Protobuf 3 broke some stuff in Apache Hive
> project. This was not an awesome thing to do between minor versions in
> regards to backwards compatibility for downstream projects.
> Additionally, these two frameworks are not drop-in replacements, they have
> some differences. Also, Protobuf 2 is not deprecated or anything so let us
> have both protocols available at the same time. In Hadoop 4.x Protobuf 2
> support can be dropped.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]