Package org.apache.hadoop.chukwa.datacollection.adaptor

Examples of org.apache.hadoop.chukwa.datacollection.adaptor.AdaptorException


      long offset; // check for obvious errors first
      try {
        offset = Long.parseLong(m.group(5));
      } catch (NumberFormatException e) {
        log.warn("malformed line " + cmd);
        throw new AdaptorException("bad input syntax");
      }

      String adaptorID = m.group(1);
      String adaptorClassName = m.group(2);
      String dataType = m.group(3);
      String params = m.group(4);
      if (params == null)
        params = "";
     
      Adaptor adaptor = AdaptorFactory.createAdaptor(adaptorClassName);
      if (adaptor == null) {
        log.warn("Error creating adaptor of class " + adaptorClassName);
        throw new AdaptorException("Can't load class " + adaptorClassName);
      }
      String coreParams = adaptor.parseArgs(dataType,params,this);
      if(coreParams == null) {
        log.warn("invalid params for adaptor: " + params);      
        throw new AdaptorException("invalid params for adaptor: " + params);
      }
     
      if(adaptorID == null) { //user didn't specify, so synthesize
        try {
         adaptorID = AdaptorNamingUtils.synthesizeAdaptorID(adaptorClassName, dataType, coreParams);
View Full Code Here


        initializeQueue(connection, queue, selector, new JMSListener());
      }
      connection.start();

    } catch(Exception e) {
      throw new AdaptorException(e);
    }
  }
View Full Code Here

      reportSourceThread = new Thread(rs);
      reportSourceThread.start();
      pump.start();
      log.info("starting Report Source");
    } catch(XTraceException e) {
      throw new AdaptorException(e);
    }
  }
View Full Code Here

  public void start(String type, String status, long offset, ChunkReceiver dest) throws AdaptorException
  {
    try{
      bytesPerSec = Integer.parseInt(status);
    } catch(NumberFormatException e) {
      throw new AdaptorException("bad argument to const rate adaptor: " + status);
    }
    this.offset = offset;
    this.type = type;
    this.dest = dest;
    this.setName("ConstRate Adaptor");
View Full Code Here

      if(timer != null){
        timer.cancel();
      }
    } catch (IOException e) {
      log.error("JMXAdaptor shutdown failed due to IOException");
      throw new AdaptorException(ExceptionUtil.getStackTrace(e));
    } catch (Exception e) {
      log.error("JMXAdaptor shutdown failed");
      throw new AdaptorException(ExceptionUtil.getStackTrace(e));
    }
    //in case the start thread is still retrying
    shutdown = true;
      return sendOffset;
   
View Full Code Here

      sendOffset = offset;
      Thread connectThread = new Thread(new JMXConnect());
      connectThread.start();     
    } catch(Exception e) {
      log.error("Failed to schedule JMX connect thread");
      throw new AdaptorException(ExceptionUtil.getStackTrace(e))
    }
   
  }
View Full Code Here

      long offset; // check for obvious errors first
      try {
        offset = Long.parseLong(m.group(5));
      } catch (NumberFormatException e) {
        log.warn("malformed line " + cmd);
        throw new AdaptorException("bad input syntax");
      }

      String adaptorID = m.group(1);
      String adaptorClassName = m.group(2);
      String dataType = m.group(3);
      String params = m.group(4);
      if (params == null)
        params = "";
     
      Adaptor adaptor = AdaptorFactory.createAdaptor(adaptorClassName);
      if (adaptor == null) {
        log.warn("Error creating adaptor of class " + adaptorClassName);
        throw new AdaptorException("Can't load class " + adaptorClassName);
      }
      String coreParams = adaptor.parseArgs(dataType,params,this);
      if(coreParams == null) {
        log.warn("invalid params for adaptor: " + params);      
        throw new AdaptorException("invalid params for adaptor: " + params);
      }
     
      if(adaptorID == null) { //user didn't specify, so synthesize
        try {
         adaptorID = AdaptorNamingUtils.synthesizeAdaptorID(adaptorClassName, dataType, coreParams);
View Full Code Here

      long offset; // check for obvious errors first
      try {
        offset = Long.parseLong(m.group(5));
      } catch (NumberFormatException e) {
        log.warn("malformed line " + cmd);
        throw new AdaptorException("bad input syntax");
      }

      String adaptorID = m.group(1);
      String adaptorClassName = m.group(2);
      String dataType = m.group(3);
      String params = m.group(4);
      if (params == null)
        params = "";
     
      Adaptor adaptor = AdaptorFactory.createAdaptor(adaptorClassName);
      if (adaptor == null) {
        log.warn("Error creating adaptor of class " + adaptorClassName);
        throw new AdaptorException("Can't load class " + adaptorClassName);
      }
      String coreParams = adaptor.parseArgs(dataType,params,this);
      if(coreParams == null) {
        log.warn("invalid params for adaptor: " + params);      
        throw new AdaptorException("invalid params for adaptor: " + params);
      }
     
      if(adaptorID == null) { //user didn't specify, so synthesize
        try {
         adaptorID = AdaptorNamingUtils.synthesizeAdaptorID(adaptorClassName, dataType, coreParams);
View Full Code Here

      reportSourceThread = new Thread(rs);
      reportSourceThread.start();
      pump.start();
      log.info("starting Report Source");
    } catch(XTraceException e) {
      throw new AdaptorException(e);
    }
  }
View Full Code Here

            process = pb.start();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            deregisterAndStop();
            throw new AdaptorException("Cannot execute the command line!");
        }

        if (process != null){
            log.debug("start sender");
            running = true;
View Full Code Here

TOP

Related Classes of org.apache.hadoop.chukwa.datacollection.adaptor.AdaptorException

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.