在emr上重新启动hiveserver2

a9wyjsp7  于 2021-06-26  发布在  Hive
关注(0)|答案(2)|浏览(606)

我终止了hiveserver2进程(在找到带有 ps aux|grep -i hiveserver2 )在我的emr集群上,有一个主服务器和两个工作服务器。在杀死hiveserver2之前,我可以通过hue在浏览器上浏览和查询hive。我试着重新开始 hive --service hiveserver2 但我再也无法从色调连接,它要么挂起,要么说它无法连接到 <publicDNS>:10000 我的用例是,我想在不关闭集群的情况下修改emr集群的配置单元配置。这有可能吗?

b1zrtrql

b1zrtrql1#

可以在启动集群之前添加配置单元配置,而不是在集群就绪之后。您可以在引导步骤中将它们添加为配置设置。
e、 g.您可以使用以下语法(java)在hive-site.xml中添加配置:

  1. Map<String,String> hiveProperties = new HashMap<String,String>();
  2. hiveProperties.put("hive.vectorized.execution.enabled","true");
  3. hiveProperties.put("hive.vectorized.execution.reduce.enabled","true");
  4. hiveProperties.put("hive.execution.engine","Tez");
  5. hiveProperties.put("hive.auto.convert.join","true");
  6. hiveProperties.put("hive.exec.parallel","true");
  7. Configuration myHiveConfig = new Configuration()
  8. .withClassification("hive-site")
  9. .withProperties(hiveProperties);
  10. List <Application> apps = new ArrayList<Application>();
  11. apps.add(new Application().withName("Hadoop"));
  12. apps.add(new Application().withName("Hive"));
  13. apps.add(new Application().withName("Spark"));
  14. //apps.add(new Application().withName("Pig"));
  15. //apps.add(new Application().withName("Zeppelin-Sandbox"));
  16. RunJobFlowRequest request = new RunJobFlowRequest()
  17. .withName("abc")
  18. .withReleaseLabel(emrVersion) //"emr-4.3.0"
  19. .withServiceRole("EMR_DefaultRole")
  20. .withConfigurations(myHiveConfig)
  21. .withInstances(
  22. new JobFlowInstancesConfig()
  23. .withInstanceCount(numberofInstances)
  24. .withKeepJobFlowAliveWhenNoSteps(true)
  25. .withTerminationProtected(false)
  26. .withMasterInstanceType(mserverType)
  27. .withSlaveInstanceType(sserverType)
  28. )
  29. .withApplications(apps)
  30. .withJobFlowRole("EMR_EC2_DefaultRole")
  31. .withSteps(generalSteps);

更多详情请参见以下链接:
http://docs.aws.amazon.com/elasticmapreduce/latest/releaseguide/emr-configure-apps.html

展开查看全部
qoefvg9y

qoefvg9y2#

  1. initctl list
  2. status hive-server2
  3. sudo restart hive-server2
  4. sudo stop hive-server2
  5. sudo start hive-server2

如何在amazon emr中重新启动服务?

相关问题