Package org.apache.avro

Examples of org.apache.avro.AvroRemoteException


    @Override
    public Status appendBatch(List<AvroFlumeEvent> events) throws
        AvroRemoteException {
      logger.log(Level.INFO, "Throwing: Received {0} events from appendBatch()",
          events.size());
      throw new AvroRemoteException("Handler smash!");
    }
View Full Code Here


      return future.get();
    } catch (ExecutionException e) {
      if (e.getCause() instanceof Exception) {
        throw (Exception)e.getCause();
      } else {
        throw new AvroRemoteException(e.getCause());
      }
    }
  }
View Full Code Here

            Throwable error = callFuture.getError();
            if (error != null) {
              if (error instanceof Exception) {
                throw (Exception) error;
              } else {
                throw new AvroRemoteException(error);
              }
            }
          }
          return;
        }
View Full Code Here

      if (e instanceof RuntimeException) {
        throw e;
      }
     
      // Not an expected Exception, so wrap it in AvroRemoteException:
      throw new AvroRemoteException(e);
    }
  }
View Full Code Here

    } catch (Exception e) {
      if (e instanceof RuntimeException)
        throw (RuntimeException)e;
      if (e instanceof IOException)
        throw (IOException)e;
      throw new AvroRemoteException(e);
    }
  }
View Full Code Here

    } catch (Exception e) {
      if (e instanceof RuntimeException)
        throw (RuntimeException)e;
      if (e instanceof IOException)
        throw (IOException)e;
      throw new AvroRemoteException(e);
    }
  }
View Full Code Here

  public Exception readError(Schema writer, Schema reader, Decoder in)
    throws IOException {
    Object error = new GenericDatumReader<Object>(writer, reader).read(null,in);
    if (error instanceof CharSequence)
      return new AvroRuntimeException(error.toString()); // system error
    return new AvroRemoteException(error);
  }
View Full Code Here

    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;
    }
View Full Code Here

    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;
    }
View Full Code Here

    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;
    }
View Full Code Here

TOP

Related Classes of org.apache.avro.AvroRemoteException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.