Package proj.zoie.api

Examples of proj.zoie.api.DefaultZoieVersion


     if(str.equals("null"))
     {  
       return null;
     }
     DefaultZoieVersion zvt = new DefaultZoieVersion();
     long id = Long.parseLong(str);
     zvt.setVersionId(id);
     return zvt; 
   }
View Full Code Here


   
    long accumulatedTime = 0;
    for(int i=initNumDocs; i<initNumDocs + numTestContent; i++)
    {
      List<DataEvent<String,DefaultZoieVersion>> list=new ArrayList<DataEvent<String,DefaultZoieVersion>>(2);
      DefaultZoieVersion dzv = new DefaultZoieVersion();
      dzv.setVersionId(i);
      list.add(new DataEvent<String,DefaultZoieVersion>("" +i, dzv));
      memoryProvider.addEvents(list);
      if (i%113 !=0) continue;
      long flushtime = System.currentTimeMillis();
      int numDoc = -1;
View Full Code Here

    try
    {
      idxSystem.setBatchSize(10);

      final int count = TestData.testdata.length;
      DefaultZoieVersion zvt = null;
      List<DataEvent<String, DefaultZoieVersion>> list = new ArrayList<DataEvent<String, DefaultZoieVersion>>(count);
      for (int i = 0; i < count; i++)
      {
        //list.add(new DataEvent<String>(i, TestData.testdata[i]));
        zvt = new DefaultZoieVersion();
        zvt.setVersionId(i);
        list.add(new DataEvent<String,DefaultZoieVersion>(TestData.testdata[i],zvt));
      }
      memoryProvider.addEvents(list);
      //idxSystem.syncWthVersion(100000, count - 1);
      idxSystem.syncWthVersion(100000, zvt);
      Future[] futures = new Future<?>[queryRunnables.length];
      for(int x = 0 ; x< queryRunnables.length; x++)
      {
        futures[x] = threadPool.submit(queryRunnables[x]);
      }

      for(int n = 1; n <= 3; n++)
      {
        for (int i = 0; i < count; i++)
        {
          //long version = n * count + i;
          //list = new ArrayList<DataEvent<String>>(1);
          //list.add(new DataEvent<String>(version, TestData.testdata[i]));
         
          zvt = new DefaultZoieVersion();
          long version = n * count + i;
          zvt.setVersionId(version);
         
          list = new ArrayList<DataEvent<String,DefaultZoieVersion>>(1);
          list.add(new DataEvent<String,DefaultZoieVersion>(TestData.testdata[i], zvt));
         
          memoryProvider.addEvents(list);
View Full Code Here

    {
      idxSystem.setBatchSize(10);

      final int count = testdata.length;
      List<DataEvent<String,DefaultZoieVersion>> list = new ArrayList<DataEvent<String,DefaultZoieVersion>>(count);
      DefaultZoieVersion zvt = null;
      for (int i = 0; i < count; i++)
      {
        zvt = new DefaultZoieVersion();
        zvt.setVersionId(i);
        list.add(new DataEvent<String,DefaultZoieVersion>(testdata[i], zvt));
      }
      memoryProvider.addEvents(list);
      idxSystem.syncWthVersion(100000, zvt);

      for(QueryThread queryThread : queryThreads) queryThread.start();

      for(int n = 1; n <= 3; n++)
      {
        for (int i = 0; i < count; i++)
        {
          zvt = new DefaultZoieVersion();
          long version = n * count + i;
          zvt.setVersionId(version);
          list = new ArrayList<DataEvent<String,DefaultZoieVersion>>(1);
          list.add(new DataEvent<String, DefaultZoieVersion>(testdata[r.nextInt(testdata.length)], zvt));
          memoryProvider.addEvents(list);
          idxSystem.syncWthVersion(100000, zvt);
          if (System.currentTimeMillis() > endtime) break;
View Full Code Here

    memoryProvider.start();

   
    List<DataEvent<String, DefaultZoieVersion>> list=new ArrayList<DataEvent<String,DefaultZoieVersion>>(2);
   
    DefaultZoieVersion zvt1 = new DefaultZoieVersion();
    zvt1.setVersionId(0);
   
    DefaultZoieVersion zvt2 = new DefaultZoieVersion();
    zvt2.setVersionId(1);
 
    list.add(new DataEvent<String,DefaultZoieVersion>("hao,yan 0", zvt1));
    list.add(new DataEvent<String,DefaultZoieVersion>("hao,yan 1", zvt2));
    memoryProvider.addEvents(list);
View Full Code Here

    memoryProvider.start();
   
    try{
      int count=TestData.testdata.length;
      List<DataEvent<String,DefaultZoieVersion>> list=new ArrayList<DataEvent<String,DefaultZoieVersion>>(count);
      DefaultZoieVersion zvt = null;
      for (int i=0;i<count;++i){
        zvt = new DefaultZoieVersion();
        zvt.setVersionId(i);
        list.add(new DataEvent<String,DefaultZoieVersion>(TestData.testdata[i], zvt));
      }
      memoryProvider.addEvents(list);
      memoryProvider.flush();
     
View Full Code Here

    try
    {
      int count=TestData.testdata.length;
      List<DataEvent<String,DefaultZoieVersion>> list=new ArrayList<DataEvent<String,DefaultZoieVersion>>(count);
     
      DefaultZoieVersion zvt = null;
      for (int i=0;i<count;++i)
      {
        zvt = new DefaultZoieVersion();
        zvt.setVersionId(i);
       
        list.add(new DataEvent<String,DefaultZoieVersion>(TestData.testdata[i], zvt));
      }
      memoryProvider.addEvents(list);
      idxSystem.syncWthVersion(10000, zvt);
View Full Code Here

    try
    {
      int count=10;

      List<DataEvent<Integer,DefaultZoieVersion>> list=new ArrayList<DataEvent<Integer,DefaultZoieVersion>>(count);
      DefaultZoieVersion zvt = null;
      for (int i=0;i<count;++i)
      {
        zvt = new DefaultZoieVersion();
        zvt.setVersionId(i);
        //list.add(new DataEvent<Integer,DefaultZoieVersion>(i,i));
        list.add(new DataEvent<Integer,DefaultZoieVersion>(i,zvt));
      }
      memoryProvider.addEvents(list);
View Full Code Here

    try
    {
      int count=10;

      List<DataEvent<Integer,DefaultZoieVersion>> list=new ArrayList<DataEvent<Integer,DefaultZoieVersion>>(count);
      DefaultZoieVersion zvt = null;
      for (int i=0;i<count;++i)
      {
        zvt = new DefaultZoieVersion();
        zvt.setVersionId(i);
        //list.add(new DataEvent<Integer,DefaultZoieVersion>(i,i));
        list.add(new DataEvent<Integer,DefaultZoieVersion>(i,zvt));
      }
      memoryProvider.addEvents(list);
View Full Code Here

        memoryProvider.start();
        memoryProvider.setBatchSize(batchSize);
        try
        {
          List<DataEvent<Integer,DefaultZoieVersion>> list=new ArrayList<DataEvent<Integer,DefaultZoieVersion>>(count);
          DefaultZoieVersion zvt = null;
          for (int i=0;i<count;++i)
          {
            //System.out.println("ZoieTest.java:testAsyncDataConsumer():delay:" + delay + ", batchSize:" + batchSize + ",forloop: i: " + i);
            zvt = new DefaultZoieVersion();
            zvt.setVersionId(i);
            list.add(new DataEvent<Integer,DefaultZoieVersion>(i,zvt));
          }
          memoryProvider.addEvents(list);

          boolean done = false;
View Full Code Here

TOP

Related Classes of proj.zoie.api.DefaultZoieVersion

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.