Package org.apache.blur.thrift.generated

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


    BlurServerContext serverContext = getServerContext();
    User user = serverContext.getUser();
    if (isAllowed(user)) {
      _iface.createTable(tableDescriptor);
    } else {
      throw new BlurException("Action not allowed by this user.", null, ErrorType.UNKNOWN);
    }
  }
View Full Code Here


    BlurServerContext serverContext = getServerContext();
    User user = serverContext.getUser();
    if (isAllowed(user)) {
      _iface.enableTable(table);
    } else {
      throw new BlurException("Action not allowed by this user.", null, ErrorType.UNKNOWN);
    }
  }
View Full Code Here

    BlurServerContext serverContext = getServerContext();
    User user = serverContext.getUser();
    if (isAllowed(user)) {
      _iface.disableTable(table);
    } else {
      throw new BlurException("Action not allowed by this user.", null, ErrorType.UNKNOWN);
    }
  }
View Full Code Here

    BlurServerContext serverContext = getServerContext();
    User user = serverContext.getUser();
    if (isAllowed(user)) {
      _iface.removeTable(table, deleteIndexFiles);
    } else {
      throw new BlurException("Action not allowed by this user.", null, ErrorType.UNKNOWN);
    }
  }
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 (trace != null) {
View Full Code Here

        String clientHostnamePort = getNode(table, selector);
        List<Selector> list = selectorBatches.get(clientHostnamePort);
        List<Integer> indexes = selectorBatchesIndexes.get(clientHostnamePort);
        if (list == null) {
          if (indexes != null) {
            throw new BlurException("This should never happen,", null, ErrorType.UNKNOWN);
          }
          list = new ArrayList<Selector>();
          indexes = new ArrayList<Integer>();
          selectorBatches.put(clientHostnamePort, list);
          selectorBatchesIndexes.put(clientHostnamePort, indexes);
View Full Code Here

          }
        }
      }).start();
      Thread.sleep(500);
      client.cancelQuery(tableName, blurQueryRow.getUuid());
      BlurException blurException = pollForError(error, 10, TimeUnit.SECONDS, null, fail, -1);
      if (fail.get()) {
        fail("Unknown error, failing test.");
      }
      assertEquals(blurException.getErrorType(), ErrorType.QUERY_CANCEL);
    } finally {
      IndexManager.DEBUG_RUN_SLOW.set(false);
    }
    // Tests that the exitable reader was reset.
    client.terms(tableName, "test", "facet", null, (short) 100);
View Full Code Here

        }
      }
    }).start();
    Thread.sleep(500);
    List<byte[]> bufferToPutGcWatcherOverLimitList = new ArrayList<byte[]>();
    BlurException blurException = pollForError(error, 120, TimeUnit.SECONDS, bufferToPutGcWatcherOverLimitList, fail,
        (int) (difference / 7));
    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

    }
    while (totalTime > System.nanoTime()) {
      if (fail.get()) {
        fail("The query failed.");
      }
      BlurException blurException = error.get();
      if (blurException != null) {
        return blurException;
      }
      Thread.sleep(100);
      if (bufferToPutGcWatcherOverLimitList != null) {
View Full Code Here

      return fetchDataIfNeeded(merge, table, blurQuery.getSelector());
    } 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

TOP

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

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.