在emr上重新启动hiveserver2

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

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

b1zrtrql

b1zrtrql1#

可以在启动集群之前添加配置单元配置,而不是在集群就绪之后。您可以在引导步骤中将它们添加为配置设置。
e、 g.您可以使用以下语法(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

qoefvg9y

qoefvg9y2#

initctl list
status hive-server2

sudo restart hive-server2
sudo stop hive-server2
sudo start hive-server2

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

相关问题