Examples of ZoieException


Examples of proj.zoie.api.ZoieException

    QueryParser parser = new QueryParser(Version.LUCENE_43, "contents", idxSystem.getAnalyzer());
    Query q = null;
    try {
      q = parser.parse(query);
    } catch (Exception e) {
      throw new ZoieException(e.getMessage(), e);
    }

    try {
      List<DataEvent<String>> list;
View Full Code Here

Examples of proj.zoie.api.ZoieException

        futures[x].get();
        assertTrue("count mismatch[" + queryRunnables[x].message + "]", !queryRunnables[x].mismatch);
      }
    } catch (Exception e) {
      for (QueryRunnable queryThread : queryRunnables) {
        if (queryThread.exception == null) throw new ZoieException(e);
      }
    } finally {
      memoryProvider.stop();
      for (String bname : idxSystem.getStandardMBeanNames()) {
        unregisterMBean(bname);
      }
      idxSystem.shutdown();
      deleteDirectory(idxDir);
    }
    System.out.println(" done round");
    log.info(" done round");
    for (QueryRunnable queryThread : queryRunnables) {
      if (queryThread.exception != null) throw new ZoieException(queryThread.exception);
    }
  }
View Full Code Here

Examples of proj.zoie.api.ZoieException

        queryThread.join();
        assertTrue("count mismatch[" + queryThread.message + "]", !queryThread.mismatch);
      }
    } catch (Exception e) {
      for (QueryThread queryThread : queryThreads) {
        if (queryThread.exception == null) throw new ZoieException(e);
      }
    } finally {
      memoryProvider.stop();
      for (String bname : idxSystem.getStandardMBeanNames()) {
        unregisterMBean(bname);
      }
      idxSystem.shutdown();
      deleteDirectory(idxDir);
    }
    System.out.println(" done round");
    log.info(" done round");
    for (QueryThread queryThread : queryThreads) {
      if (queryThread.exception != null) throw new ZoieException(queryThread.exception);
    }
  }
View Full Code Here

Examples of proj.zoie.api.ZoieException

        if (optType == OptimizeType.FULL) {
          try {
            expungeDeletes();
          } catch (IOException ioe) {
            ZoieHealth.setFatal();
            throw new ZoieException(ioe.getMessage(), ioe);
          } finally {
            _optScheduler.finished();
          }
        }
      } finally {
View Full Code Here

Examples of proj.zoie.api.ZoieException

      if (optType == OptimizeType.FULL) {
        try {
          expungeDeletes();
        } catch (IOException ioe) {
          ZoieHealth.setFatal();
          throw new ZoieException(ioe.getMessage(), ioe);
        } finally {
          _optScheduler.finished();
        }
      }
    }
View Full Code Here

Examples of proj.zoie.api.ZoieException

      return;
    }
    BaseSearchIndex<R> idx = getSearchIndex();

    if (idx == null) {
      throw new ZoieException("trying to consume to null index");
    }
    Long2ObjectMap<List<IndexingReq>> addList = new Long2ObjectOpenHashMap<List<IndexingReq>>();
    String version = idx.getVersion(); // current version

    LongSet delSet = new LongOpenHashSet();
View Full Code Here

Examples of proj.zoie.api.ZoieException

        _idxMgr.setDiskIndexerStatus(Status.Sleep);
      }
    } catch (IOException ioe) {
      ZoieHealth.setFatal();
      log.error("Problem copying segments: " + ioe.getMessage(), ioe);
      throw new ZoieException(ioe);
    }
  }
View Full Code Here

Examples of proj.zoie.api.ZoieException

      synchronized (this) // this blocks the batch disk loader thread while indexing to RAM
      {
        while (_batchList.size() > _maxBatchSize) {
          // check if load manager thread is alive
          if (_loadMgrThread == null || !_loadMgrThread.isAlive()) {
            throw new ZoieException("fatal: indexing thread loader manager has stopped");
          }

          try {
            this.wait(60000); // 1 min
          } catch (InterruptedException e) {
View Full Code Here

Examples of proj.zoie.api.ZoieException

        this.notifyAll();
        long now1 = System.currentTimeMillis();

        if (timeOut <= 0) {
          log.error("sync timed out");
          throw new ZoieException("timed out");
        }
        try {
          long waittime = Math.min(200, timeOut);
          this.wait(waittime);
        } catch (InterruptedException e) {
          throw new ZoieException(e.getMessage());
        }

        long now2 = System.currentTimeMillis();

        timeOut -= (now2 - now1);
View Full Code Here

Examples of proj.zoie.api.ZoieException

   * @param timeInMillis the max amount of time to wait in milliseconds.
   * @param version the version of events which it waits for.
   * @throws ZoieException
   */
  public void syncWithVersion(long timeInMillis, String version) throws ZoieException {
    if (_consumerThread == null) throw new ZoieException("not running");
    if (version == null) {
      log.info("buffered version is NULL. Nothing to flush.");
      return;
    }
    synchronized (this) {
      long timeRemaining = Long.MAX_VALUE;
      while (_currentVersion == null || _versionComparator.compare(_currentVersion, version) < 0) {
        if (log.isDebugEnabled()) {
          if (timeRemaining > timeInMillis + 5000) log.debug("syncWithVersion: timeRemaining: "
              + timeInMillis + "ms current: " + _currentVersion + " expecting: " + version);
          timeRemaining = timeInMillis;
        }
        this.notifyAll();
        long now1 = System.currentTimeMillis();
        if (timeInMillis <= 0) {
          throw new ZoieException("sync timed out at current: " + _currentVersion + " expecting: "
              + version);
        }
        try {
          long waitTime = Math.min(5000, timeInMillis);
          this.wait(waitTime);
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.