ResultSet 처리
This commit is contained in:
parent
2198e40515
commit
a7d2f18f85
|
@ -47,15 +47,11 @@ public class RedisCralwer extends Crawler {
|
|||
}
|
||||
}
|
||||
|
||||
//Map<String, Object> rr = (Map<String, Object>) parseToMap(jedis.info());
|
||||
|
||||
List<OFResultSet> resultSetList = new ArrayList<>();
|
||||
|
||||
for (Item item : items) {
|
||||
OFResultSet resultSet = OFResultSet.newInstance(item);
|
||||
|
||||
Query query = item.getQuery();
|
||||
String queryString = (String) query.getQueryInfo().get("query");
|
||||
String queryString = (String) item.getQueryInfo().getQuery();
|
||||
String info = jedis.info(queryString);
|
||||
Map<String, String> resultMap = (Map<String, String>) parseToMap(info).get(queryString);
|
||||
|
||||
|
|
|
@ -20,43 +20,48 @@
|
|||
},
|
||||
"items" : [
|
||||
{
|
||||
"metrics" : [
|
||||
"cpu.usage.system",
|
||||
"cpu.usage.user",
|
||||
"cpu.usage.system_children",
|
||||
"cpu.usage.user_children"
|
||||
"keys" : [
|
||||
{
|
||||
"metric":"cpu.usage.system",
|
||||
"key":"used_cpu_sys"
|
||||
},
|
||||
{
|
||||
"metric":"cpu.usage.user",
|
||||
"key":"used_cpu_user"
|
||||
},
|
||||
{
|
||||
"metric":"cpu.usage.system_children",
|
||||
"key":"used_cpu_sys_children"
|
||||
},
|
||||
{
|
||||
"metric":"cpu.usage.user_children",
|
||||
"key":"used_cpu_user_children"
|
||||
}
|
||||
],
|
||||
"query": {
|
||||
"queryInfo" : {
|
||||
"query" : "CPU"
|
||||
},
|
||||
"keys" : [
|
||||
"used_cpu_sys",
|
||||
"used_cpu_user",
|
||||
"used_cpu_sys_children",
|
||||
"used_cpu_user_children"
|
||||
]
|
||||
}
|
||||
"mappingInfo" : {}
|
||||
},
|
||||
{
|
||||
"metrics" : [
|
||||
"memory.usage.used",
|
||||
"memory.usage.rss",
|
||||
"memory.usage.reak"
|
||||
],
|
||||
"query":
|
||||
"keys" : [
|
||||
{
|
||||
"metric":"memory.usage.used",
|
||||
"key":"used_memory"
|
||||
},
|
||||
{
|
||||
"metric":"memory.usage.rss",
|
||||
"key":"used_memory_rss"
|
||||
},
|
||||
{
|
||||
"metric":"memory.usage.peak",
|
||||
"key":"used_memory_peak"
|
||||
}
|
||||
],
|
||||
"queryInfo" : {
|
||||
"query" : "Memory"
|
||||
},
|
||||
|
||||
"keys" : [
|
||||
"used_memory",
|
||||
"used_memory_rss",
|
||||
"used_memory_peak"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
"mappingInfo" : {}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user