Examples of stopAdaptor()


Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.stopAdaptor()

    assertTrue(c.getSeqID() == testFile.length());
   
    c = chunks.waitForAChunk(1000);
    assertNull(c);
   
    agent.stopAdaptor(adaptorId, false);
    agent.shutdown();
  }

  /**
   *
 
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.stopAdaptor()

          assertTrue(l != -1);
          runningAdaptors.add(l);
        }
        Thread.sleep(1000);  
        for(Long l: runningAdaptors)
          agent.stopAdaptor(l, true);
        assertTrue(agent.adaptorCount() == 0);
      }
      agent.shutdown();
    } catch(Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.stopAdaptor()

      String dat = new String(c.getData());
      assertTrue(dat.startsWith("0 abcdefghijklmnopqrstuvwxyz"));
      assertTrue(dat.endsWith("9 abcdefghijklmnopqrstuvwxyz\n"));
      assertTrue(c.getDataType().equals("raw"));
      if(agent.adaptorCount() > 0)
        agent.stopAdaptor("test", false);
    }
    agent.shutdown();
  }
 
}
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.stopAdaptor()

          c.getRecordOffsets()[rec] - recStart + 1);
      assertTrue(record.equals(rec + " abcdefghijklmnopqrstuvwxyz\n"));
      recStart = c.getRecordOffsets()[rec] + 1;
    }
    assertTrue(c.getDataType().equals("lines"));
    agent.stopAdaptor(adaptorId, false);
    agent.shutdown();
    Thread.sleep(2000);
  }

  private File makeTestFile(String name, int size) throws IOException {
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.stopAdaptor()

          c.getRecordOffsets()[rec] - recStart + 1);
      assertTrue(record.equals(rec + " abcdefghijklmnopqrstuvwxyz\n"));
      recStart = c.getRecordOffsets()[rec] + 1;
    }
    assertTrue(c.getDataType().equals("lines"));
    agent.stopAdaptor(adaptorId, false);
    agent.shutdown();
    Thread.sleep(2000);
  }
 
  public void testRepeatedlyOnBigFile() throws IOException,
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.stopAdaptor()

      String dat = new String(c.getData());
      assertTrue(dat.startsWith("0 abcdefghijklmnopqrstuvwxyz"));
      assertTrue(dat.endsWith("9 abcdefghijklmnopqrstuvwxyz\n"));
      assertTrue(c.getDataType().equals("raw"));
      if(agent.adaptorCount() > 0)
        agent.stopAdaptor("test", false);
    }
    agent.shutdown();
  }

  private File makeTestFile(String name, int size) throws IOException {
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.stopAdaptor()

  }
 
  private void unregisterFromAgent() {
    ChukwaAgent agent = ChukwaAgent.getAgent();
    if (agent != null) {
      agent.stopAdaptor(adaptorID, false);
     
    } else {
      log.warn("Agent is null, cannot unregister " + toWatch.getAbsolutePath());
    }
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.stopAdaptor()

          return false;
        }

        ChukwaAgent agent = ChukwaAgent.getAgent();
        if (agent != null) {
          agent.stopAdaptor(adaptorID, false);
        } else {
          log.info("Agent is null, running in default mode");
        }
        return false;
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.stopAdaptor()

          assertTrue(l != -1);
          runningAdaptors.add(l);
        }
        Thread.sleep(1000);
        for (Long l : runningAdaptors)
          agent.stopAdaptor(l, false);
        Thread.sleep(5000);
        assertTrue(agent.adaptorCount() == count);
      }
      agent.shutdown();
    } catch (Exception e) {
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.stopAdaptor()

      System.out.println("record " + rec + " was: " + record);
      assertTrue(record.equals(rec + " abcdefghijklmnopqrstuvwxyz\n"));
      recStart = c.getRecordOffsets()[rec] + 1;
    }
    assertTrue(c.getDataType().equals("lines"));
    agent.stopAdaptor(adaptorId, false);
    agent.shutdown();
  }

  public void testStartAfterOffset() throws IOException, InterruptedException,
      ChukwaAgent.AlreadyRunningException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.