geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-3995) Rename server_api.proto
Date Mon, 20 Nov 2017 22:55:01 GMT

    [ https://issues.apache.org/jira/browse/GEODE-3995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16259986#comment-16259986
] 

ASF GitHub Bot commented on GEODE-3995:
---------------------------------------

galen-pivotal closed pull request #1074: GEODE-3995: Moving server_api.proto to locator_api.proto.
URL: https://github.com/apache/geode/pull/1074
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandler.java
b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandler.java
index 41343a8c57..c97b73bae3 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandler.java
@@ -28,16 +28,16 @@
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.v1.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.v1.ClientProtocol;
-import org.apache.geode.internal.protocol.protobuf.v1.ServerAPI;
+import org.apache.geode.internal.protocol.protobuf.v1.LocatorAPI;
 import org.apache.geode.internal.protocol.serialization.SerializationService;
 
 @Experimental
 public class GetAvailableServersOperationHandler implements
-    OperationHandler<ServerAPI.GetAvailableServersRequest, ServerAPI.GetAvailableServersResponse,
ClientProtocol.ErrorResponse> {
+    OperationHandler<LocatorAPI.GetAvailableServersRequest, LocatorAPI.GetAvailableServersResponse,
ClientProtocol.ErrorResponse> {
 
   @Override
-  public Result<ServerAPI.GetAvailableServersResponse, ClientProtocol.ErrorResponse>
process(
-      SerializationService serializationService, ServerAPI.GetAvailableServersRequest request,
+  public Result<LocatorAPI.GetAvailableServersResponse, ClientProtocol.ErrorResponse>
process(
+      SerializationService serializationService, LocatorAPI.GetAvailableServersRequest request,
       MessageExecutionContext messageExecutionContext) throws InvalidExecutionContextException
{
 
     InternalLocator internalLocator = (InternalLocator) messageExecutionContext.getLocator();
@@ -50,8 +50,8 @@
     Collection<BasicTypes.Server> servers = (Collection<BasicTypes.Server>) serversFromSnapshot
         .stream().map(serverLocation -> getServerProtobufMessage((ServerLocation) serverLocation))
         .collect(Collectors.toList());
-    ServerAPI.GetAvailableServersResponse.Builder builder =
-        ServerAPI.GetAvailableServersResponse.newBuilder().addAllServers(servers);
+    LocatorAPI.GetAvailableServersResponse.Builder builder =
+        LocatorAPI.GetAvailableServersResponse.newBuilder().addAllServers(servers);
     return Success.of(builder.build());
   }
 
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/utilities/ProtobufRequestUtilities.java
b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/utilities/ProtobufRequestUtilities.java
index d44fa0dd7a..e1f7e6aafb 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/utilities/ProtobufRequestUtilities.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/utilities/ProtobufRequestUtilities.java
@@ -19,8 +19,8 @@
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.internal.protocol.protobuf.v1.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.v1.ClientProtocol;
+import org.apache.geode.internal.protocol.protobuf.v1.LocatorAPI;
 import org.apache.geode.internal.protocol.protobuf.v1.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.v1.ServerAPI;
 
 /**
  * This class contains helper functions for generating ClientProtocol.Request objects
@@ -110,9 +110,9 @@
     return ClientProtocol.Request.newBuilder().setPutAllRequest(putAllRequestBuilder).build();
   }
 
-  public static ServerAPI.GetAvailableServersRequest createGetAvailableServersRequest() {
-    ServerAPI.GetAvailableServersRequest.Builder builder =
-        ServerAPI.GetAvailableServersRequest.newBuilder();
+  public static LocatorAPI.GetAvailableServersRequest createGetAvailableServersRequest()
{
+    LocatorAPI.GetAvailableServersRequest.Builder builder =
+        LocatorAPI.GetAvailableServersRequest.newBuilder();
     return builder.build();
   }
 }
diff --git a/geode-protobuf/src/main/proto/v1/clientProtocol.proto b/geode-protobuf/src/main/proto/v1/clientProtocol.proto
index 95a0fdc9c2..93be175324 100644
--- a/geode-protobuf/src/main/proto/v1/clientProtocol.proto
+++ b/geode-protobuf/src/main/proto/v1/clientProtocol.proto
@@ -23,7 +23,7 @@ package org.apache.geode.internal.protocol.protobuf.v1;
 
 import "google/protobuf/any.proto";
 import "v1/region_API.proto";
-import "v1/server_API.proto";
+import "v1/locator_API.proto";
 import "v1/basicTypes.proto";
 import "v1/connection_API.proto";
 
diff --git a/geode-protobuf/src/main/proto/v1/server_API.proto b/geode-protobuf/src/main/proto/v1/locator_API.proto
similarity index 100%
rename from geode-protobuf/src/main/proto/v1/server_API.proto
rename to geode-protobuf/src/main/proto/v1/locator_API.proto
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java
b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java
index caa5609f4d..ac432af9ca 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java
@@ -40,7 +40,7 @@
 import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatisticsImpl;
 import org.apache.geode.internal.protocol.protobuf.v1.ClientProtocol;
 import org.apache.geode.internal.protocol.protobuf.v1.ConnectionAPI;
-import org.apache.geode.internal.protocol.protobuf.v1.ServerAPI;
+import org.apache.geode.internal.protocol.protobuf.v1.LocatorAPI;
 import org.apache.geode.internal.protocol.protobuf.v1.serializer.ProtobufProtocolSerializer;
 import org.apache.geode.internal.protocol.protobuf.v1.utilities.ProtobufRequestUtilities;
 import org.apache.geode.internal.protocol.protobuf.v1.utilities.ProtobufUtilities;
@@ -223,7 +223,7 @@ private void validateGetAvailableServersResponse(
     ClientProtocol.Response messageResponse = getAvailableServersResponseMessage.getResponse();
     assertEquals(ClientProtocol.Response.ResponseAPICase.GETAVAILABLESERVERSRESPONSE,
         messageResponse.getResponseAPICase());
-    ServerAPI.GetAvailableServersResponse getAvailableServersResponse =
+    LocatorAPI.GetAvailableServersResponse getAvailableServersResponse =
         messageResponse.getGetAvailableServersResponse();
     assertEquals(1, getAvailableServersResponse.getServersCount());
   }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandlerJUnitTest.java
b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandlerJUnitTest.java
index 940bfca753..a43c5faab5 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandlerJUnitTest.java
@@ -35,8 +35,8 @@
 import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.TestExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.v1.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.v1.ServerAPI;
-import org.apache.geode.internal.protocol.protobuf.v1.ServerAPI.GetAvailableServersResponse;
+import org.apache.geode.internal.protocol.protobuf.v1.LocatorAPI;
+import org.apache.geode.internal.protocol.protobuf.v1.LocatorAPI.GetAvailableServersResponse;
 import org.apache.geode.internal.protocol.protobuf.v1.utilities.ProtobufRequestUtilities;
 import org.apache.geode.test.junit.categories.UnitTest;
 
@@ -72,7 +72,7 @@ public void testServerReturnedFromHandler() throws Exception {
     serverList.add(new ServerLocation(HOSTNAME_2, PORT_2));
     when(locatorLoadSnapshot.getServers(null)).thenReturn(serverList);
 
-    ServerAPI.GetAvailableServersRequest getAvailableServersRequest =
+    LocatorAPI.GetAvailableServersRequest getAvailableServersRequest =
         ProtobufRequestUtilities.createGetAvailableServersRequest();
     Result operationHandlerResult = getOperationHandlerResult(getAvailableServersRequest);
     assertTrue(operationHandlerResult instanceof Success);
@@ -85,7 +85,7 @@ public void testWhenServersFromSnapshotAreNullReturnsEmtpy()
       throws InvalidExecutionContextException {
     when(locatorLoadSnapshot.getServers(any())).thenReturn(null);
 
-    ServerAPI.GetAvailableServersRequest getAvailableServersRequest =
+    LocatorAPI.GetAvailableServersRequest getAvailableServersRequest =
         ProtobufRequestUtilities.createGetAvailableServersRequest();
     Result operationHandlerResult = getOperationHandlerResult(getAvailableServersRequest);
     assertTrue(operationHandlerResult instanceof Success);
@@ -95,7 +95,7 @@ public void testWhenServersFromSnapshotAreNullReturnsEmtpy()
   }
 
   private Result getOperationHandlerResult(
-      ServerAPI.GetAvailableServersRequest getAvailableServersRequest)
+      LocatorAPI.GetAvailableServersRequest getAvailableServersRequest)
       throws InvalidExecutionContextException {
     return operationHandler.process(serializationServiceStub, getAvailableServersRequest,
         TestExecutionContext.getLocatorExecutionContext(internalLocatorMock));


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Rename server_api.proto
> -----------------------
>
>                 Key: GEODE-3995
>                 URL: https://issues.apache.org/jira/browse/GEODE-3995
>             Project: Geode
>          Issue Type: Task
>          Components: client/server
>            Reporter: Brian Rowe
>
> The server_api.proto file contains the message definitions for locator messages, making
the name rather misleading (these are actually the only messages the cache server can't handle).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message