Package org.apache.blur.thrift.generated

Examples of org.apache.blur.thrift.generated.BlurException$BlurExceptionStandardScheme


        searcher.search(query, col);
        totalHitsRef.totalHits.set(collector.getTotalHits());
        TopDocs topDocs = collector.topDocs();
        scoreDocs = topDocs.scoreDocs;
      } catch (StopExecutionCollectorException e) {
        throw new BlurException(STOP_EXECUTION_COLLECTOR_EXCEPTION, null, ErrorType.UNKNOWN);
      } catch (ExitingReaderException e) {
        throw new BlurException(STOP_EXECUTION_COLLECTOR_EXCEPTION, null, ErrorType.UNKNOWN);
      } catch (IOException e) {
        throw new BException("Unknown error during search call", e);
      }
      if (scoreDocs.length > 0) {
        lastScoreDoc = scoreDocs[scoreDocs.length - 1];
View Full Code Here


      }).merge(merger);
    } catch (StopExecutionCollectorException e) {
      BlurQueryStatus queryStatus = status.getQueryStatus();
      QueryState state = queryStatus.getState();
      if (state == QueryState.BACK_PRESSURE_INTERRUPTED) {
        throw new BlurException("Cannot execute query right now.", null, ErrorType.BACK_PRESSURE);
      } else if (state == QueryState.INTERRUPTED) {
        throw new BlurException("Cannot execute query right now.", null, ErrorType.QUERY_CANCEL);
      }
      throw e;
    } catch (ExitingReaderException e) {
      BlurQueryStatus queryStatus = status.getQueryStatus();
      QueryState state = queryStatus.getState();
      if (state == QueryState.BACK_PRESSURE_INTERRUPTED) {
        throw new BlurException("Cannot execute query right now.", null, ErrorType.BACK_PRESSURE);
      } else if (state == QueryState.INTERRUPTED) {
        throw new BlurException("Cannot execute query right now.", null, ErrorType.QUERY_CANCEL);
      }
      throw e;
    } finally {
      _statusManager.removeStatus(status);
    }
View Full Code Here

          if (cause instanceof TTransportException) {
            TTransportException t = (TTransportException) cause;
            if (handleError(connection, client, retries, command, t, maxRetries, backOffTime, maxBackOffTime)) {
              Throwable c = t.getCause();
              if (cause instanceof SocketTimeoutException) {
                throw new BlurException(c.getMessage(), BException.toString(c), ErrorType.REQUEST_TIMEOUT);
              }
              throw t;
            }
          } else {
            throw e;
          }
        } catch (TTransportException e) {
          if (handleError(connection, client, retries, command, e, maxRetries, backOffTime, maxBackOffTime)) {
            Throwable c = e.getCause();
            if (c instanceof SocketTimeoutException) {
              throw new BlurException(c.getMessage(), BException.toString(c), ErrorType.REQUEST_TIMEOUT);
            }
            throw e;
          }
        } finally {
          if (client.get() != null) {
View Full Code Here

          service.cancelAll();
          return iterable;
        }
      } else {
        LOG.info("Query timeout with max query time of [{2}] for query [{1}].", _maxQueryTime, _blurQuery);
        throw new BlurException("Query timeout with max query time of [" + _maxQueryTime + "] for query [" + _blurQuery
            + "].", null, ErrorType.QUERY_TIMEOUT);
      }
    }
    return iterable;
  }
View Full Code Here

    try {

      IndexManager.fetchRow(_searcher.getIndexReader(), _table, _shard, _selector, fetchResult, null,
          _maxHeapPerRowFetch);
    } catch (IOException e) {
      throw new BlurException("Unknown IO error", null, ErrorType.UNKNOWN);
    }
    return fetchResult;
  }
View Full Code Here

        }
      }
    }).start();
    Thread.sleep(500);
    client.cancelQuery("test", blurQueryRow.getUuid());
    BlurException blurException = pollForError(error, 10, TimeUnit.SECONDS, null);
    if (fail.get()) {
      fail("Unknown error, failing test.");
    }
    assertEquals(blurException.getErrorType(), ErrorType.QUERY_CANCEL);
  }
View Full Code Here

        }
      }
    }).start();
    Thread.sleep(500);
    List<byte[]> bufferToPutGcWatcherOverLimitList = new ArrayList<byte[]>();
    BlurException blurException = pollForError(error, 10, TimeUnit.SECONDS, bufferToPutGcWatcherOverLimitList);
    if (fail.get()) {
      fail("Unknown error, failing test.");
    }
    System.out.println(bufferToFillHeap.hashCode());
    System.out.println(bufferToPutGcWatcherOverLimitList.hashCode());
    assertEquals(blurException.getErrorType(), ErrorType.BACK_PRESSURE);
    bufferToPutGcWatcherOverLimitList.clear();
    bufferToPutGcWatcherOverLimitList = null;
    bufferToFillHeap = null;
  }
View Full Code Here

    long totalTime = timeUnit.toNanos(period) + s;
    if (bufferToPutGcWatcherOverLimitList != null) {
      bufferToPutGcWatcherOverLimitList.add(new byte[_1MB * 5]);
    }
    while (totalTime > System.nanoTime()) {
      BlurException blurException = error.get();
      if (blurException != null) {
        return blurException;
      }
      Thread.sleep(500);
      if (bufferToPutGcWatcherOverLimitList != null) {
View Full Code Here

        _searcher.search(_query, col);
        _totalHitsRef.totalHits.set(collector.getTotalHits());
        TopDocs topDocs = collector.topDocs();
        scoreDocs = topDocs.scoreDocs;
      } catch (StopExecutionCollectorException e) {
        throw new BlurException(STOP_EXECUTION_COLLECTOR_EXCEPTION, null, ErrorType.UNKNOWN);
      } catch (ExitingReaderException e) {
        throw new BlurException(STOP_EXECUTION_COLLECTOR_EXCEPTION, null, ErrorType.UNKNOWN);
      } catch (IOException e) {
        throw new BException("Unknown error during search call", e);
      }
      if (scoreDocs.length > 0) {
        after = scoreDocs[scoreDocs.length - 1];
View Full Code Here

    if (commandLine.hasOption(QueryCommandHelper.WIDTH)) {
      _width = Integer.parseInt(commandLine.getOptionValue(QueryCommandHelper.WIDTH));
    }
    ConsoleReader reader = getConsoleReader();
    if (reader == null) {
      throw new BlurException("This command can only be run with a proper jline environment.", null, ErrorType.UNKNOWN);
    }

    long s = System.nanoTime();
    BlurResults blurResults = client.query(tablename, blurQuery);
    long e = System.nanoTime();
View Full Code Here

TOP

Related Classes of org.apache.blur.thrift.generated.BlurException$BlurExceptionStandardScheme

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.