本文整理了Java中com.addthis.hydra.data.query.Query.<init>
方法的一些代码示例,展示了Query.<init>
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.<init>
方法的具体详情如下:
包路径:com.addthis.hydra.data.query.Query
类名称:Query
方法名:<init>
暂无
代码示例来源:origin: addthis/hydra
/**
* @return first a query suitable for the next query worker in the stack
*/
public Query createPipelinedQuery() {
Query newQuery = cloneTo(new Query());
if (ops != null && ops.length > 0) {
String[] newops = new String[ops.length - 1];
System.arraycopy(ops, 1, newops, 0, newops.length);
newQuery.ops = newops;
String pop = ops[0];
ops = new String[]{pop};
}
return newQuery;
}
代码示例来源:origin: addthis/hydra
Query query = new Query(job, paths.toArray(new String[paths.size()]), ops.toArray(new String[ops.size()]));
query.setTraced(traced);
for (Entry<String, String> e : qparam.entrySet()) {
代码示例来源:origin: addthis/hydra
@Test
public void pipeline() {
String path = "+:+hits,+nodes$+foo=123/+/++123/+%top=hit/a,b,c/|foo/|+bar/*/+%goo/(1-5)+";
String[] ops = {"sort"};
Query q = new Query("job", new String[] { path }, ops);
Query subQ = q.createPipelinedQuery();
System.out.println(subQ.toString());
}
}
代码示例来源:origin: addthis/hydra
@Before
public void setup() throws Exception {
query = new Query("jobid", new String[]{"path"}, new String[]{"ops"});
MockitoAnnotations.initMocks(this);
QueryTaskSource[] taskSources = new QueryTaskSource[]{taskSource0, taskSource1, taskSource2, taskSource3};
for (QueryTaskSource x: taskSources) {
stubSelectedSource(x);
}
MeshSourceAggregator underlying = new MeshSourceAggregator(taskSources, null, null, query);
underlying.queryPromise = mock(ChannelProgressivePromise.class);
underlying.consumer = mock(DataChannelOutput.class);
underlying.channelWritable = true;
underlying.executor = executor;
sourceAggregator = spy(underlying);
queryTask = new QueryTask(sourceAggregator);
}
代码示例来源:origin: addthis/hydra
@Test
public void testCompact() {
String path = "+:+hits,+nodes$+foo=123/+/++123/+%top=hit/a,b,c/|foo/|+bar/*/+%goo/(1-5)+";
Query q = new Query("job", new String[] { path }, null);
Assert.assertEquals(path, q.getPathString(q.getQueryPaths().get(0)));
}
代码示例来源:origin: addthis/hydra
Query q = new Query(null,
new String[]{kv.getValue("query", kv.getValue("path", ""))},
null);
代码示例来源:origin: addthis/hydra
Query query = new Query(job, new String[]{path}, new String[]{kv.getValue("ops"), kv.getValue("rops")});
query.setTraced(kv.getIntValue("trace", 0) == 1);
query.setParameterIfNotYetSet("hosts", kv.getValue("hosts"));
内容来源于网络,如有侵权,请联系作者删除!