Package com.dianping.cat.message.internal

Examples of com.dianping.cat.message.internal.MessageIdFactory.initialize()


    MessageIdFactory factory = new MockMessageIdFactory();
    long now = 1343532130488L;
    int num = 100;

    factory.setIpAddress("7f000001");
    factory.initialize("source");
    localManager.setBaseDir(new File("target/bucket/hdfs/dump")); // make local and hdfs base dir same

    for (int i = 0; i < num; i++) {
      MessageTree tree = newMessageTree(factory.getNextId(), i, now + i * 10L);
      MessageId id = MessageId.parse(tree.getMessageId());
View Full Code Here


    File dat = new File("/data/appdatas/cat/mmap.dat");

    MessageIdFactory factory = lookup(MessageIdFactory.class);
    StringBuilder sb = new StringBuilder(8192);

    factory.initialize("cat");

    for (int i = 0; i < 100; i++) {
      createMessage(factory, sb, i);
    }
View Full Code Here

  public void updateWriterIndex() throws Exception {
    File idx = new File("/data/appdatas/cat/mmap.idx");
    MessageIdFactory factory = lookup(MessageIdFactory.class);
    StringBuilder sb = new StringBuilder(8192);

    factory.initialize("cat");

    for (int i = 0; i < 50; i++) {
      createMessage(factory, sb, i);
    }
View Full Code Here

  private MessageIdFactory getMessageIdFactory(String ip, String domain) throws IOException {
    MessageIdFactory factory = new MockMessageIdFactory();

    factory.setIpAddress(ip);
    factory.initialize(domain);

    return factory;
  }

  private DefaultMessageTree newMessageTree(String id, int i, long timestamp) {
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.