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<>();
|
List<OFResultSet> resultSetList = new ArrayList<>();
|
||||||
|
|
||||||
for (Item item : items) {
|
for (Item item : items) {
|
||||||
OFResultSet resultSet = OFResultSet.newInstance(item);
|
OFResultSet resultSet = OFResultSet.newInstance(item);
|
||||||
|
|
||||||
Query query = item.getQuery();
|
String queryString = (String) item.getQueryInfo().getQuery();
|
||||||
String queryString = (String) query.getQueryInfo().get("query");
|
|
||||||
String info = jedis.info(queryString);
|
String info = jedis.info(queryString);
|
||||||
Map<String, String> resultMap = (Map<String, String>) parseToMap(info).get(queryString);
|
Map<String, String> resultMap = (Map<String, String>) parseToMap(info).get(queryString);
|
||||||
|
|
||||||
|
|
|
@ -20,43 +20,48 @@
|
||||||
},
|
},
|
||||||
"items" : [
|
"items" : [
|
||||||
{
|
{
|
||||||
"metrics" : [
|
"keys" : [
|
||||||
"cpu.usage.system",
|
{
|
||||||
"cpu.usage.user",
|
"metric":"cpu.usage.system",
|
||||||
"cpu.usage.system_children",
|
"key":"used_cpu_sys"
|
||||||
"cpu.usage.user_children"
|
},
|
||||||
],
|
{
|
||||||
"query": {
|
"metric":"cpu.usage.user",
|
||||||
"queryInfo" : {
|
"key":"used_cpu_user"
|
||||||
"query" : "CPU"
|
},
|
||||||
},
|
{
|
||||||
"keys" : [
|
"metric":"cpu.usage.system_children",
|
||||||
"used_cpu_sys",
|
"key":"used_cpu_sys_children"
|
||||||
"used_cpu_user",
|
},
|
||||||
"used_cpu_sys_children",
|
{
|
||||||
"used_cpu_user_children"
|
"metric":"cpu.usage.user_children",
|
||||||
]
|
"key":"used_cpu_user_children"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"queryInfo" : {
|
||||||
|
"query" : "CPU"
|
||||||
|
},
|
||||||
|
"mappingInfo" : {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metrics" : [
|
"keys" : [
|
||||||
"memory.usage.used",
|
{
|
||||||
"memory.usage.rss",
|
"metric":"memory.usage.used",
|
||||||
"memory.usage.reak"
|
"key":"used_memory"
|
||||||
],
|
|
||||||
"query":
|
|
||||||
{
|
|
||||||
"queryInfo" : {
|
|
||||||
"query" : "Memory"
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
"keys" : [
|
"metric":"memory.usage.rss",
|
||||||
"used_memory",
|
"key":"used_memory_rss"
|
||||||
"used_memory_rss",
|
},
|
||||||
"used_memory_peak"
|
{
|
||||||
]
|
"metric":"memory.usage.peak",
|
||||||
}
|
"key":"used_memory_peak"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"queryInfo" : {
|
||||||
|
"query" : "Memory"
|
||||||
|
},
|
||||||
|
"mappingInfo" : {}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user