Examples of BlurServerContext


Examples of org.apache.blur.server.BlurServerContext

            return method.invoke(iface, args);
          } catch (InvocationTargetException e) {
            throw e.getTargetException();
          }
        }
        BlurServerContext context = getServerContext(controller);
        if (context == null) {
          try {
            return method.invoke(iface, args);
          } catch (InvocationTargetException e) {
            throw e.getTargetException();
          }
        }
        UserContext.setUser(UserConverter.toUserFromThrift(context.getUser()));
        try {
          return method.invoke(iface, args);
        } catch (InvocationTargetException e) {
          throw e.getTargetException();
        } finally {
View Full Code Here

Examples of org.apache.blur.server.BlurServerContext

            return method.invoke(iface, args);
          } catch (InvocationTargetException e) {
            throw e.getTargetException();
          }
        }
        BlurServerContext context = getServerContext(controller);
        if (context == null) {
          try {
            return method.invoke(iface, args);
          } catch (InvocationTargetException e) {
            throw e.getTargetException();
          }
        }
        String rootTraceId = context.getTraceRootId();
        if (rootTraceId != null) {
          Trace.setupTrace(rootTraceId, context.getTraceRequestId());
        }
        try {
          return method.invoke(iface, args);
        } catch (InvocationTargetException e) {
          throw e.getTargetException();
        } finally {
          Trace.tearDownTrace();
          context.resetTraceIds();
        }
      }

      private BlurServerContext getServerContext(boolean controller) {
        if (controller) {
View Full Code Here

Examples of org.apache.blur.server.BlurServerContext

    super(configuration, iface, shard);
  }

  @Override
  public void createTable(TableDescriptor tableDescriptor) throws BlurException, TException {
    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

Examples of org.apache.blur.server.BlurServerContext

    }
  }

  @Override
  public void enableTable(String table) throws BlurException, TException {
    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

Examples of org.apache.blur.server.BlurServerContext

    }
  }

  @Override
  public void disableTable(String table) throws BlurException, TException {
    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

Examples of org.apache.blur.server.BlurServerContext

    }
  }

  @Override
  public void removeTable(String table, boolean deleteIndexFiles) throws BlurException, TException {
    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
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.