本文整理了Java中com.addthis.hydra.data.query.Query.getParameter
方法的一些代码示例,展示了Query.getParameter
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getParameter
方法的具体详情如下:
包路径:com.addthis.hydra.data.query.Query
类名称:Query
方法名:getParameter
暂无
代码示例来源:origin: addthis/hydra
public String getParameter(String key) {
return getParameter(key, null);
}
代码示例来源:origin: addthis/hydra
QueryEntry(Query query, String[] opsLog, TrackerHandler trackerHandler, MeshSourceAggregator aggregator) {
this.query = query;
this.opsLog = opsLog;
this.trackerHandler = trackerHandler;
this.preOpLines = new AtomicInteger();
this.postOpLines = new AtomicInteger();
this.aggregator = aggregator;
final String timeoutInSeconds = query.getParameter("timeout");
this.startTime = System.currentTimeMillis();
if (timeoutInSeconds != null) {
waitTime = Integer.parseInt(timeoutInSeconds);
} else {
waitTime = -1;
}
}
代码示例来源:origin: addthis/hydra
private static AutoField getSourceField(Query query) {
String sourceFieldName = query.getParameter("injectSource");
if (sourceFieldName != null) {
try {
return Configs.decodeObject(AutoField.class, sourceFieldName);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
} else {
return null;
}
}
代码示例来源:origin: addthis/hydra
public QueryEntryInfo getStat() {
QueryEntryInfo stat = new QueryEntryInfo();
stat.paths = query.getPaths();
stat.uuid = query.queryId();
stat.ops = opsLog;
stat.job = query.getJob();
stat.sources = query.getParameter("sources");
stat.remoteip = query.getParameter("remoteip");
stat.sender = query.getParameter("sender");
stat.lines = preOpLines.get();
stat.sentLines = postOpLines.get();
stat.runTime = getRunTime();
stat.startTime = startTime;
stat.tasks = lastSourceInfo;
stat.state = queryState;
return stat;
}
代码示例来源:origin: addthis/hydra
private Supplier<List<QueryTaskSource>> createQueryTaskSourceSupplier(MeshSourceAggregator sourceAggregator) {
Query query = sourceAggregator.query;
int totalTasks = sourceAggregator.totalTasks;
int maxSimul = getMaxSimul(query.getParameter("maxSimul"), totalTasks);
if (maxSimul == totalTasks) {
return new DefaultQueryTaskSourceSupplier(sourceAggregator);
} else {
return new MaxSimulQueryTaskSourceSupplier(sourceAggregator, maxSimul);
}
}
代码示例来源:origin: addthis/hydra
public void allocateQueryTasks(Query query, QueryTaskSource[] taskSources, ChannelMaster meshy,
Map<String, String> queryOptions) {
String queryAllocator = query.getParameter("allocator", DEFAULT_ALLOCATOR).toLowerCase();
switch (queryAllocator) {
case "parallel":
PARALLEL_ALLOCATOR.allocateTasks(taskSources, meshy, queryOptions);
break;
case "lazy":
LAZY_ALLOCATOR.allocateTasks(taskSources, meshy, queryOptions);
break;
case "balanced":
balancedAllocator.allocateTasks(taskSources, meshy, queryOptions);
break;
case "legacy":
default:
PER_QUERY_RR_ALLOCATOR.allocateTasks(taskSources, meshy, queryOptions);
break;
}
}
}
代码示例来源:origin: addthis/hydra
boolean allowPartial = Boolean.valueOf(query.getParameter("allowPartial"));
Set<Integer> tasks = parseTasks(query.getParameter("tasks"));
List<QueryTaskSource[]> sourcesPerDir = new ArrayList<>(2);
for (String combinedUnresolved : JOB_SPLITTER.split(query.getJob())) {
代码示例来源:origin: addthis/hydra
.put("type", "query.starting")
.put("query.path", query.getPaths()[0])
.put("query.hosts", query.getParameter("hosts"))
.put("query.ops", query.getOps())
.put("trace", query.isTraced())
.put("sources", query.getParameter("sources"))
.put("time", System.currentTimeMillis())
.put("job.id", query.getJob())
.put("query.id", query.uuid())
.put("sender", query.getParameter("sender"))
.put("format", format)
.put("filename", filename)
.put("originalrequest", query.getParameter("originalrequest"))
.put("timeout", query.getParameter("timeout"))
.put("requestIP", query.getParameter("remoteip"))
.put("allocator", query.getParameter("allocator"))
.put("allowPartial", query.getParameter("allowPartial"))
.put("tasks", query.getParameter("tasks")).createKVPairs().toString());
内容来源于网络,如有侵权,请联系作者删除!