[ 
https://issues.apache.org/jira/browse/HAMA-812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Illecker updated HAMA-812:
---------------------------------

    Attachment: HAMA-812.patch

Added check for local mode in BSPJobClient.close to avoid 
IllegalArgumentException: not a proxy instance.

{code}
  public synchronized void close() throws IOException {
    String masterAdress = this.getConf().get("bsp.master.address");
    if (masterAdress != null && !masterAdress.equals("local")) {
      RPC.stopProxy(jobSubmitClient);
    }
  }
{code}

Similar check was in BSPJobClient.init before, where the proxy instance is 
added. In local mode there is no proxy instance in jobSubmitClient.

{code}
  public void init(Configuration conf) throws IOException {
    String masterAdress = conf.get("bsp.master.address");
    if (masterAdress != null && !masterAdress.equals("local")) {
      this.jobSubmitClient = (JobSubmissionProtocol) RPC.getProxy(
          JobSubmissionProtocol.class, HamaRPCProtocolVersion.versionID,
          BSPMaster.getAddress(conf), conf,
          NetUtils.getSocketFactory(conf, JobSubmissionProtocol.class));
    } else {
      LOG.debug("Using local BSP runner.");
      this.jobSubmitClient = new LocalBSPRunner(conf);
    }
  }
{code}



> In local mode BSPJobClient.close throws java.lang.IllegalArgumentException: 
> not a proxy instance
> ------------------------------------------------------------------------------------------------
>
>                 Key: HAMA-812
>                 URL: https://issues.apache.org/jira/browse/HAMA-812
>             Project: Hama
>          Issue Type: Bug
>          Components: bsp core
>    Affects Versions: 0.6.3
>            Reporter: Martin Illecker
>            Assignee: Martin Illecker
>            Priority: Minor
>             Fix For: 0.7.0
>
>         Attachments: HAMA-812.patch
>
>
> BSPJobClient.close does not check for local mode before calling 
> RPC.stopProxy. (in local mode there is no proxy instance)
> See HAMA-811.
> {code}
> Exception in thread "main" java.lang.IllegalArgumentException: not a proxy 
> instance
>       at java.lang.reflect.Proxy.getInvocationHandler(Proxy.java:767)
>       at org.apache.hama.ipc.RPC.stopProxy(RPC.java:476)
>       at org.apache.hama.bsp.BSPJobClient.close(BSPJobClient.java:245)
>       at org.apache.hama.bsp.BSPJobClient.runJob(BSPJobClient.java:771)
>       at org.apache.hama.pipes.Submitter.runJob(Submitter.java:222)
>       at org.apache.hama.pipes.Submitter.run(Submitter.java:538)
>       at org.apache.hama.pipes.Submitter.main(Submitter.java:552)
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to