You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Maja Kabiljo (JIRA)" <ji...@apache.org> on 2012/10/17 22:02:03 UTC

[jira] [Commented] (GIRAPH-362) Address master task id for communication for master (known issue from GIRAPH-211)

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

Maja Kabiljo commented on GIRAPH-362:
-------------------------------------

Eugene, when I run an application I can see master's task id. Is the issue because of situations like in tests when we have both master and worker in the same task? Or is it something related to the way secure version is run?
                
> Address master task id for communication for master (known issue from GIRAPH-211)
> ---------------------------------------------------------------------------------
>
>                 Key: GIRAPH-362
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-362
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Avery Ching
>
> There is a workaround from GIRAPH-211 to handle requests a little differently due to issues communicating to the master.  We should fix this to be a regular request in the future.
> {code}
>   public void sendWritableRequest(Integer destWorkerId,
>                                   InetSocketAddress remoteServer,
>                                   WritableRequest request) {
>     if (clientRequestIdRequestInfoMap.isEmpty()) {
>       byteCounter.resetAll();
>     }
>     boolean registerRequest = true;
> /*if[HADOOP_NON_SECURE]
> else[HADOOP_NON_SECURE]*/
>     if (request.getType() == RequestType.SASL_TOKEN_MESSAGE_REQUEST) {
>       registerRequest = false;
>     }
> /*end[HADOOP_NON_SECURE]*/
>     Channel channel = getNextChannel(remoteServer);
>     RequestInfo newRequestInfo = new RequestInfo(remoteServer, request);
>     if (registerRequest) {
>       request.setClientId(clientId);
>       request.setRequestId(
>         addressRequestIdGenerator.getNextRequestId(remoteServer));
>       ClientRequestId clientRequestId =
>         new ClientRequestId(destWorkerId, request.getRequestId());
>       RequestInfo oldRequestInfo = clientRequestIdRequestInfoMap.putIfAbsent(
>         clientRequestId, newRequestInfo);
>       if (oldRequestInfo != null) {
>         throw new IllegalStateException("sendWritableRequest: Impossible to " +
>           "have a previous request id = " + request.getRequestId() + ", " +
>           "request info of " + oldRequestInfo);
>       }
>     }
>     ChannelFuture writeFuture = channel.write(request);
>     newRequestInfo.setWriteFuture(writeFuture);
>     if (limitNumberOfOpenRequests &&
>         clientRequestIdRequestInfoMap.size() > maxNumberOfOpenRequests) {
>       waitSomeRequests(maxNumberOfOpenRequests);
>     }
>   }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira