com.addthis.hydra.data.query.Query.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(235)

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

Query.<init>介绍

暂无

代码示例

代码示例来源:origin: addthis/hydra

  1. /**
  2. * @return first a query suitable for the next query worker in the stack
  3. */
  4. public Query createPipelinedQuery() {
  5. Query newQuery = cloneTo(new Query());
  6. if (ops != null && ops.length > 0) {
  7. String[] newops = new String[ops.length - 1];
  8. System.arraycopy(ops, 1, newops, 0, newops.length);
  9. newQuery.ops = newops;
  10. String pop = ops[0];
  11. ops = new String[]{pop};
  12. }
  13. return newQuery;
  14. }

代码示例来源:origin: addthis/hydra

  1. Query query = new Query(job, paths.toArray(new String[paths.size()]), ops.toArray(new String[ops.size()]));
  2. query.setTraced(traced);
  3. for (Entry<String, String> e : qparam.entrySet()) {

代码示例来源:origin: addthis/hydra

  1. @Test
  2. public void pipeline() {
  3. String path = "+:+hits,+nodes$+foo=123/+/++123/+%top=hit/a,b,c/|foo/|+bar/*/+%goo/(1-5)+";
  4. String[] ops = {"sort"};
  5. Query q = new Query("job", new String[] { path }, ops);
  6. Query subQ = q.createPipelinedQuery();
  7. System.out.println(subQ.toString());
  8. }
  9. }

代码示例来源:origin: addthis/hydra

  1. @Before
  2. public void setup() throws Exception {
  3. query = new Query("jobid", new String[]{"path"}, new String[]{"ops"});
  4. MockitoAnnotations.initMocks(this);
  5. QueryTaskSource[] taskSources = new QueryTaskSource[]{taskSource0, taskSource1, taskSource2, taskSource3};
  6. for (QueryTaskSource x: taskSources) {
  7. stubSelectedSource(x);
  8. }
  9. MeshSourceAggregator underlying = new MeshSourceAggregator(taskSources, null, null, query);
  10. underlying.queryPromise = mock(ChannelProgressivePromise.class);
  11. underlying.consumer = mock(DataChannelOutput.class);
  12. underlying.channelWritable = true;
  13. underlying.executor = executor;
  14. sourceAggregator = spy(underlying);
  15. queryTask = new QueryTask(sourceAggregator);
  16. }

代码示例来源:origin: addthis/hydra

  1. @Test
  2. public void testCompact() {
  3. String path = "+:+hits,+nodes$+foo=123/+/++123/+%top=hit/a,b,c/|foo/|+bar/*/+%goo/(1-5)+";
  4. Query q = new Query("job", new String[] { path }, null);
  5. Assert.assertEquals(path, q.getPathString(q.getQueryPaths().get(0)));
  6. }

代码示例来源:origin: addthis/hydra

  1. Query q = new Query(null,
  2. new String[]{kv.getValue("query", kv.getValue("path", ""))},
  3. null);

代码示例来源:origin: addthis/hydra

  1. Query query = new Query(job, new String[]{path}, new String[]{kv.getValue("ops"), kv.getValue("rops")});
  2. query.setTraced(kv.getIntValue("trace", 0) == 1);
  3. query.setParameterIfNotYetSet("hosts", kv.getValue("hosts"));

相关文章