[英]Restart hiveserver2 on emr
我在有一个主服务器和两个工作器的EMR集群上杀死了hiveserver2进程(使用ps aux|grep -i hiveserver2
找到PID之后)。 在杀死hiveserver2之前,我可以通过HUE在浏览器中浏览和查询Hive。 我尝试使用hive --service hiveserver2
重新启动,但是随后我无法再从HUE连接,它要么挂起,要么说它无法连接到<publicDNS>:10000
我的用例是我想在不关闭群集的情况下修改EMR群集的配置单元配置。 那有可能吗?
initctl list
status hive-server2
sudo restart hive-server2
sudo stop hive-server2
sudo start hive-server2
配置单元配置可以在启动集群之前添加,而不是在集群准备就绪之后添加。 您可以在引导步骤中将它们添加为配置设置。
EG您可以使用以下语法(在Java中)在hive-site.xml中添加配置:
Map<String,String> hiveProperties = new HashMap<String,String>();
hiveProperties.put("hive.vectorized.execution.enabled","true");
hiveProperties.put("hive.vectorized.execution.reduce.enabled","true");
hiveProperties.put("hive.execution.engine","Tez");
hiveProperties.put("hive.auto.convert.join","true");
hiveProperties.put("hive.exec.parallel","true");
Configuration myHiveConfig = new Configuration()
.withClassification("hive-site")
.withProperties(hiveProperties);
List <Application> apps = new ArrayList<Application>();
apps.add(new Application().withName("Hadoop"));
apps.add(new Application().withName("Hive"));
apps.add(new Application().withName("Spark"));
//apps.add(new Application().withName("Pig"));
//apps.add(new Application().withName("Zeppelin-Sandbox"));
RunJobFlowRequest request = new RunJobFlowRequest()
.withName("abc")
.withReleaseLabel(emrVersion) //"emr-4.3.0"
.withServiceRole("EMR_DefaultRole")
.withConfigurations(myHiveConfig)
.withInstances(
new JobFlowInstancesConfig()
.withInstanceCount(numberofInstances)
.withKeepJobFlowAliveWhenNoSteps(true)
.withTerminationProtected(false)
.withMasterInstanceType(mserverType)
.withSlaveInstanceType(sserverType)
)
.withApplications(apps)
.withJobFlowRole("EMR_EC2_DefaultRole")
.withSteps(generalSteps);
在下面的链接中有更多详细信息:
http://docs.aws.amazon.com/ElasticMapReduce/latest/ReleaseGuide/emr-configure-apps.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.