Package org.apache.avro

Examples of org.apache.avro.AvroRemoteException


    @Override
    public Status append(AvroFlumeEvent event) throws AvroRemoteException {
      logger.info("Throwing: Received event from append(): {}",
          new String(event.getBody().array(), Charset.forName("UTF8")));
      throw new AvroRemoteException("Handler smash!");
    }
View Full Code Here


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

    private void sleep() throws AvroRemoteException {
      try {
        Thread.sleep(delay.get());
      } catch (InterruptedException e) {
        throw new AvroRemoteException("Interrupted while sleeping", e);
      }
    }
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

    } 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 schema, Decoder in)
    throws IOException {
    Object error = new GenericDatumReader<Object>(schema).read(null,in);
    if (error instanceof CharSequence)
      return new AvroRuntimeException(error.toString()); // system error
    return new AvroRemoteException(error);
  }
View Full Code Here

    @Override
    public Status append(AvroFlumeEvent event) throws AvroRemoteException {
      logger.info("Throwing: Received event from append(): {}",
          new String(event.getBody().array(), Charset.forName("UTF8")));
      throw new AvroRemoteException("Handler smash!");
    }
View Full Code Here

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

    private void sleep() throws AvroRemoteException {
      try {
        Thread.sleep(delay.get());
      } catch (InterruptedException e) {
        throw new AvroRemoteException("Interrupted while sleeping", e);
      }
    }
View Full Code Here

    @Override
    public Status append(AvroFlumeEvent event) throws AvroRemoteException {
      logger.log(Level.INFO, "Throwing: Received event from append(): {0}",
          new String(event.getBody().array(), Charset.forName("UTF8")));
      throw new AvroRemoteException("Handler smash!");
    }
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.