You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Markus Weimer (JIRA)" <ji...@apache.org> on 2015/09/15 02:50:45 UTC
[jira] [Comment Edited] (REEF-703) Make NameLookupClient injectable
[ https://issues.apache.org/jira/browse/REEF-703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14743400#comment-14743400 ]
Markus Weimer edited comment on REEF-703 at 9/15/15 12:50 AM:
--------------------------------------------------------------
I am configuring the NameLookupClient in the NameClient:
{code}
final Configuration nameLookupClientConf = NameLookupClientConfiguration.CONF
.set(NameLookupClientConfiguration.SERVER_ADDRESS, serverAddr)
...
.set(NameLookupClientConfiguration.REPLY_QUEUE,
(Class<? extends BlockingQueue<NamingLookupResponse>>) replyLookupQueue.getClass())
.set(NameLookupClientConfiguration.CACHE, cache.getClass())
.build();
{code}
This approach fails with the "InjectionException: Could not invoke constructor: new NameServerImpl ...".
I suspect this happens because of the REPLY_QUEUE.
In the NameLookupClientConfiguration, I have:
{code}
public static final RequiredParameter<BlockingQueue<NamingLookupResponse>> REPLY_QUEUE = new RequiredParameter<>();
{code}
I define the ReplyQueue parameter as:
{code}
@NamedParameter
public class ReplyQueue implements Name<BlockingQueue<NamingLookupResponse>> { }
{code}
Do I configure the ReplyQueue parameter right and what maybe the other Exception causes?
was (Author: dss-2009@yandex.ru):
I am configuring the NameLookupClient in the NameClient:
final Configuration nameLookupClientConf = NameLookupClientConfiguration.CONF
.set(NameLookupClientConfiguration.SERVER_ADDRESS, serverAddr)
...
.set(NameLookupClientConfiguration.REPLY_QUEUE,
(Class<? extends BlockingQueue<NamingLookupResponse>>) replyLookupQueue.getClass())
.set(NameLookupClientConfiguration.CACHE, cache.getClass())
.build();
This approach fails with the "InjectionException: Could not invoke constructor: new NameServerImpl ...".
I suspect this happens because of the REPLY_QUEUE.
In the NameLookupClientConfiguration, I have:
public static final RequiredParameter<BlockingQueue<NamingLookupResponse>> REPLY_QUEUE = new RequiredParameter<>();
I define the ReplyQueue parameter as:
@NamedParameter
public class ReplyQueue implements Name<BlockingQueue<NamingLookupResponse>> { }
Do I configure the ReplyQueue parameter right and what maybe the other Exception causes?
> Make NameLookupClient injectable
> --------------------------------
>
> Key: REEF-703
> URL: https://issues.apache.org/jira/browse/REEF-703
> Project: REEF
> Issue Type: Task
> Components: REEF-IO
> Reporter: Mariia Mykhailova
> Priority: Minor
>
> `org/apache/reef/io/network/naming/NameLookupClient.java` should be injectable, with one constructor (and others deprecated).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)