99100101102103104105106
if (e instanceof RuntimeException) { throw e; } // Not an expected Exception, so wrap it in AvroRemoteException: throw new AvroRemoteException(e); } }
144145146147148149150151152153154
do { try { Status status = (batch == null) ? client.append(avroEvent) : client.appendBatch(batch); if (!status.equals(Status.OK)) { throw new AvroRemoteException("RPC communication failed to " + agents[current].getHost() + ":" + agents[current].getPort()); } return; } catch (Exception ex) { if (i == retries - 1) {
150151152153154155156157158159160
do { try { final Status status = (batch == null) ? client.append(avroEvent) : client.appendBatch(batch); if (!status.equals(Status.OK)) { throw new AvroRemoteException("RPC communication failed to " + agents[current].getHost() + ":" + agents[current].getPort()); } return; } catch (final Exception ex) { if (i == retries - 1) {
359360361362363364365366367
public Object respond(Message message, Object request) throws AvroRemoteException { try { Thread.sleep((Long)((GenericRecord)request).get("millis")); } catch (InterruptedException e) { throw new AvroRemoteException(e); } return null; }
129130131132133134135136137
if (e instanceof RuntimeException) { throw e; } // Not an expected Exception, so wrap it in AvroRemoteException: throw new AvroRemoteException(e); } } }
145146147148149150151152153154155
180181182183184185186187
CallFuture<Status> callFuture = new CallFuture<Status>(); try { append(event, callFuture); return callFuture.get(); } catch (Exception e) { throw new AvroRemoteException(e); } }
191192193194195196197198
CallFuture<Status> callFuture = new CallFuture<Status>(); try { appendBatch(events, callFuture); return callFuture.get(); } catch (Exception e) { throw new AvroRemoteException(e); } }