[英]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.