map中根据value获取key
public
static
String getKeyByValue(Map map, Object value) {
String keys=
""
;
Iterator it = map.entrySet().iterator();
while
(it.hasNext()) {
Map.Entry entry = (Entry) it.next();
Object obj = entry.getValue();
if
(obj !=
null
&& obj.equals(value)) {
keys=(String) entry.getKey();
}
}
return
keys;
}
hadoop大数据相关