/**
* 合并多个map
* @param maps
* @param <K>
* @param <V>
* @return
* @throws Exception
*/
public static <K, V> Map mergeMaps(Map<K, V>... maps) {
Class clazz = maps[0].getClass(); // 获取传入map的类型
Map<K, V> map = null;
try {
map = (Map) clazz.newInstance();
} catch (Exception e) {
e.printStackTrace();
}
for (int i = 0, len = maps.length; i < len; i++) {
map.putAll(maps[i]);
}
return map;
client环境搭建 hadoop 如何搭建hadoop环境
Hadoop基础环境搭建(转载尚硅谷)说明个人学习记录基于虚拟机搭建,需要提前准备虚拟机环境搭建版本:hadoop-3.1.3搭建HDFS和yarn提前准备Hadoop安装包:hadoop-3.1.3.tar.gzHadoop下载地址:https://archive.apache.org/dist/hadoop/common/hadoop-3.1.3/
提前准备JDK安装包:jdk-8u212-l