public DRPCRequest fetchRequest(String func) throws TException, AuthorizationException { DistributedRPCInvocations.Client c = client.get(); try { if (c == null) { throw new TException("Client is not connected..."); } return c.fetchRequest(func); } catch (AuthorizationException aze) { throw aze; } catch (TException e) { client.compareAndSet(c, null); throw e; } }
@Override public void run() { try { for (int i = 0; i < tryTimes; i++) { long thisBegin = System.currentTimeMillis(); client.getClient().sendSupervisorWorkerHeartbeats(mockedHeartbeats()); long thisEnd = System.currentTimeMillis(); this.runtimesBook[i] = (thisEnd - thisBegin) / 1000D; } totalCostTimesBook.add(this.runtimesBook); readyFlags[taskId] = true; Thread.currentThread().interrupt(); } catch (TException e) { e.printStackTrace(); } } }
public void failRequest(String id) throws TException, AuthorizationException { DistributedRPCInvocations.Client c = client.get(); try { if (c == null) { throw new TException("Client is not connected..."); } c.failRequest(id); } catch (AuthorizationException aze) { throw aze; } catch (TException e) { client.compareAndSet(c, null); throw e; } }
void stop() { try { stopSupervisors(); stopUI(); stopNimbus(); } catch (TException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
public void result(String id, String result) throws TException, AuthorizationException { DistributedRPCInvocations.Client c = client.get(); try { if (c == null) { throw new TException("Client is not connected..."); } c.result(id, result); } catch (AuthorizationException aze) { throw aze; } catch (TException e) { client.compareAndSet(c, null); throw e; } }
@Override public void failRequestV2(String id, DRPCExecutionException ex) throws AuthorizationException, TException { DistributedRPCInvocations.Client c = client.get(); try { if (c == null) { throw new TException("Client is not connected..."); } c.failRequestV2(id, ex); } catch (AuthorizationException aze) { throw aze; } catch (TException e) { client.compareAndSet(c, null); throw e; } } }
public void failRequest(String id) throws TException, AuthorizationException { DistributedRPCInvocations.Client c = client.get(); try { if (c == null) { throw new TException("Client is not connected..."); } c.failRequest(id); } catch(AuthorizationException aze) { throw aze; } catch(TException e) { client.compareAndSet(c, null); throw e; } }
public void result(String id, String result) throws TException, AuthorizationException { DistributedRPCInvocations.Client c = client.get(); try { if (c == null) { throw new TException("Client is not connected..."); } c.result(id, result); } catch(AuthorizationException aze) { throw aze; } catch(TException e) { client.compareAndSet(c, null); throw e; } }
public DRPCRequest fetchRequest(String func) throws TException, AuthorizationException { DistributedRPCInvocations.Client c = client.get(); try { if (c == null) { throw new TException("Client is not connected..."); } return c.fetchRequest(func); } catch(AuthorizationException aze) { throw aze; } catch(TException e) { client.compareAndSet(c, null); throw e; } }