GetAction action = plan.getGetAction();
EntityGroupLocation entityGroupLocation = action
.getEntityGroupLocation();
EntityGroupInfo entityGroupInfo = entityGroupLocation
.getEntityGroupInfo();
ServerName serverName = new ServerName(
entityGroupLocation.getHostname(), entityGroupLocation.getPort(),
ServerName.NON_STARTCODE);
ClientProtos.GetResponse response = null;
// local
boolean localGet = workingOnLocalServer(server, serverName);
if (localGet) {// if the target entityGroup's server is current
// server, run it in local.
response = server.get(entityGroupInfo.getEntityGroupName(), action);
} else {// rpc
ClientProtocol clientProtocol = connection.getClient(
serverName.getHostname(), serverName.getPort());
response = clientProtocol.get(null,
RequestConverter.buildGetRequest(action));
}
if (response.getExists()) {
queryResultProtos.add(response.getResult());