Package org.apache.flume

Examples of org.apache.flume.ChannelException


      if (writeInitialized) {
        try {
          outputStream.close();
        } catch (IOException e) {
          throw new ChannelException("Unable to close current output file", e);
        }
      }

      if (readInitialized) {
        // TODO: Implement me!
View Full Code Here


          case THROW_ERROR:
            throw new TestError();
          case THROW_RUNTIME:
            throw new TestRuntimeException();
          case THROW_CHANNEL:
            throw new ChannelException("test");
          case SLEEP:
            Thread.sleep(300000);
            break;
        }
      }
View Full Code Here

      } else if (e instanceof Error) {
        throw (Error) e;
      } else if (e instanceof RuntimeException) {
        throw (RuntimeException) e;
      }
      throw new ChannelException(e);
    } finally {
      interrupted = interrupted || Thread.currentThread().isInterrupted();
      try {
        transaction.close();
      } catch (Throwable e) {
        if (committed) {
          if (e instanceof Error) {
            throw (Error) e;
          } else if (e instanceof RuntimeException) {
            throw (RuntimeException) e;
          } else {
            throw new ChannelException(e);
          }
        } else {
          logger.error(
              "Failed to close transaction after error, exception follows:", e);
        }
View Full Code Here

        "No queue defined (Did you forget to configure me?");

    try {
      queue.put(event);
    } catch (InterruptedException ex) {
      throw new ChannelException("Failed to put(" + event + ")", ex);
    }
  }
View Full Code Here

        "No queue defined (Did you forget to configure me?");

    try {
      return queue.poll(keepAlive, TimeUnit.SECONDS);
    } catch (InterruptedException ex) {
      throw new ChannelException("Failed to take()", ex);
    }
  }
View Full Code Here

    try {
      doPut(event);
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      throw new ChannelException(e.toString(), e);
    }
  }
View Full Code Here

    try {
      doBegin();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      throw new ChannelException(e.toString(), e);
    }
    state = State.OPEN;
  }
View Full Code Here

    try {
      doCommit();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      throw new ChannelException(e.toString(), e);
    }
    state = State.COMPLETED;
  }
View Full Code Here

    state = State.COMPLETED;
    try {
      doRollback();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      throw new ChannelException(e.toString(), e);
    }
  }
View Full Code Here

    }

    @Override
    protected void doPut(Event event) {
      if(!putList.offer(event)) {
        throw new ChannelException("Put queue for MemoryTransaction of capacity " +
            putList.size() + " full, consider committing more frequently, " +
            "increasing capacity or increasing thread count");
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.flume.ChannelException

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.