datawave.webservice.query.Query.getQueryLogicName()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(182)

本文整理了Java中datawave.webservice.query.Query.getQueryLogicName方法的一些代码示例,展示了Query.getQueryLogicName的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getQueryLogicName方法的具体详情如下:
包路径:datawave.webservice.query.Query
类名称:Query
方法名:getQueryLogicName

Query.getQueryLogicName介绍

暂无

代码示例

代码示例来源:origin: NationalSecurityAgency/datawave

@Override
public String toString() {
  
  String host = System.getProperty("jboss.host.name");
  
  return new StringBuilder().append("host:").append(host).append(", id:").append(this.getSettings().getId()).append(", query:")
          .append(StringEscapeUtils.escapeHtml(this.getSettings().getQuery())).append(", auths:")
          .append(this.getSettings().getQueryAuthorizations()).append(", user:").append(this.getSettings().getOwner()).append(", queryLogic:")
          .append(this.getSettings().getQueryLogicName()).append(", name:").append(this.getSettings().getQueryName()).append(", pagesize:")
          .append(this.getSettings().getPagesize()).append(", begin:").append(this.getSettings().getBeginDate()).append(", end:")
          .append(this.getSettings().getEndDate()).append(", expiration:").append(this.getSettings().getExpirationDate()).append(", params: ")
          .append(this.getSettings().getParameters()).append(", callTime: ")
          .append((this.getTimeOfCurrentCall() == 0) ? 0 : System.currentTimeMillis() - this.getTimeOfCurrentCall()).toString();
  
}

代码示例来源:origin: NationalSecurityAgency/datawave

ps.setString(x++, query.getQueryLogicName());
ps.setString(x++, query.getQueryName());
ps.setString(x++, query.getOwner());

代码示例来源:origin: NationalSecurityAgency/datawave

crq.queryLogicName = query.getQueryLogicName();
crq.originalQueryId = uuid;
if (crq.view != null && crq.fields != null && crq.user != null) {

代码示例来源:origin: NationalSecurityAgency/datawave

private RunningQuery adminGetQueryById(String id) throws Exception {
  RunningQuery query = queryCache.get(id);
  
  if (query == null) {
    log.info("Query not found in cache, retrieving from accumulo");
    List<Query> queries = persister.adminFindById(id);
    
    if (queries == null || queries.isEmpty())
      throw new NotFoundQueryException(DatawaveErrorCode.NO_QUERY_OBJECT_MATCH);
    if (queries.size() > 1)
      throw new NotFoundQueryException(DatawaveErrorCode.TOO_MANY_QUERY_OBJECT_MATCHES);
    
    Query q = queries.get(0);
    
    final String auths = q.getQueryAuthorizations();
    
    // will throw IllegalArgumentException if not defined
    final QueryLogic<?> logic = queryLogicFactory.getQueryLogic(q.getQueryLogicName(), ctx.getCallerPrincipal());
    final AccumuloConnectionFactory.Priority priority = logic.getConnectionPriority();
    query = RunningQuery.createQueryWithAuthorizations(metrics, null, priority, logic, q, auths,
            new RunningQueryTimingImpl(queryExpirationConf, qp.getPageTimeout()), this.executor, this.predictor, this.metricFactory);
    
    // Put in the cache by id and name, we will have two copies that reference the same object
    queryCache.put(q.getId().toString(), query);
  }
  
  return query;
}

代码示例来源:origin: NationalSecurityAgency/datawave

logic = queryFactory.getQueryLogic(q.getQueryLogicName(), principal);

代码示例来源:origin: NationalSecurityAgency/datawave

public QueryInformation(Query query, String queryStr) {
  Preconditions.checkNotNull(query);
  queryId = testAndSetOption(query.getId());
  queryLogicName = testAndSetOption(query.getQueryLogicName());
  queryName = testAndSetOption(query.getQueryName());
  if (null == queryStr)
    queryString = testAndSetOption(query.getQuery());
  else
    queryString = testAndSetOption(queryStr);
  queryUser = testAndSetOption(query.getOwner());
}

代码示例来源:origin: NationalSecurityAgency/datawave

QueryLogic<?> logic = queryLogicFactory.getQueryLogic(q.getQueryLogicName(), principal);
AccumuloConnectionFactory.Priority priority = logic.getConnectionPriority();
query = new RunningQuery(metrics, null, priority, logic, q, q.getQueryAuthorizations(), principal, new RunningQueryTimingImpl(

代码示例来源:origin: NationalSecurityAgency/datawave

QueryLogic<?> logic = queryLogicFactory.getQueryLogic(q.getQueryLogicName(), p);
AccumuloConnectionFactory.Priority priority = logic.getConnectionPriority();
RunningQuery query = new RunningQuery(metrics, null, priority, logic, q, q.getQueryAuthorizations(), p, new RunningQueryTimingImpl(

代码示例来源:origin: NationalSecurityAgency/datawave

public HudQuerySummary build(Query query) {
  HudQuerySummary summary = new HudQuerySummary();
  summary.setQueryLogicName(query.getQueryLogicName());
  summary.setId(query.getId().toString());
  summary.setQueryName(query.getQueryName());
  summary.setUserDN(query.getUserDN());
  summary.setQuery(query.getQuery());
  summary.setQueryAuthorizations(query.getQueryAuthorizations());
  summary.setExpirationDate(query.getExpirationDate().getTime());
  return summary;
}

代码示例来源:origin: NationalSecurityAgency/datawave

QueryLogic<?> logic = queryFactory.getQueryLogic(q.getQueryLogicName(), p);
AccumuloConnectionFactory.Priority priority = logic.getConnectionPriority();
query = new RunningQuery(metrics, null, priority, logic, q, q.getQueryAuthorizations(), p, new RunningQueryTimingImpl(queryExpirationConf,

代码示例来源:origin: NationalSecurityAgency/datawave

return createQuery(q.getQueryLogicName(), newSettings);
} catch (DatawaveWebApplicationException e) {
  throw e;

代码示例来源:origin: NationalSecurityAgency/datawave

Map<String,String> trackingMap = this.connectionFactory.getTrackingMap(Thread.currentThread().getStackTrace());
connector = this.connectionFactory.getConnection(Priority.ADMIN, trackingMap);
QueryLogic<?> queryLogic = queryLogicFactory.getQueryLogic(query.getQueryLogicName(), datawavePrincipal);
if (queryLogic instanceof QueryMetricQueryLogic) {
  ((QueryMetricQueryLogic) queryLogic).setRolesSets(datawavePrincipal.getPrimaryUser().getRoles());

代码示例来源:origin: NationalSecurityAgency/datawave

private void setMetricsInfo() {
  
  BaseQueryMetric m = this.getMetric();
  
  // set the metric information
  m.setQueryType(this.getClass());
  m.setQueryId(this.queryId);
  m.setUser(this.user);
  m.setUserDN(this.query.getUserDN());
  if (this.query != null) {
    m.setColumnVisibility(this.query.getColumnVisibility());
    m.setQueryAuthorizations(this.query.getQueryAuthorizations());
    m.setQueryLogic(this.query.getQueryLogicName());
    m.setBeginDate(this.query.getBeginDate());
    m.setEndDate(this.query.getEndDate());
  }
}

相关文章