private void updateHiveLLAPSettingsIfRequired(ViewInstanceEntity viewInstanceEntity, Service service) {
    String INTERACTIVE_KEY = "use.hive.interactive.mode";
    String LLAP_COMPONENT_NAME = "HIVE_SERVER_INTERACTIVE";
    String viewVersion = viewInstanceEntity.getViewDefinition().getVersion();
    String viewName = viewInstanceEntity.getViewDefinition().getViewName();
    if(!viewName.equalsIgnoreCase("HIVE") || viewVersion.equalsIgnoreCase("1.0.0")) {
      return;
    }

    try {
      ServiceComponent component = service.getServiceComponent(LLAP_COMPONENT_NAME);
      if (component.getServiceComponentHosts().size() == 0) {
        // The LLAP server is not installed in any of the hosts. Hence, return;
        return;
      }

      for (Map.Entry<String, String> property : viewInstanceEntity.getPropertyMap().entrySet()) {
        if (INTERACTIVE_KEY.equals(property.getKey()) && (!"true".equalsIgnoreCase(property.getValue()))) {
          ViewInstancePropertyEntity propertyEntity = new ViewInstancePropertyEntity();
          propertyEntity.setViewInstanceName(viewInstanceEntity.getName());
          propertyEntity.setViewName(viewInstanceEntity.getViewName());
          propertyEntity.setName(INTERACTIVE_KEY);
          propertyEntity.setValue("true");
          propertyEntity.setViewInstanceEntity(viewInstanceEntity);
          viewInstanceEntity.getProperties().add(propertyEntity);
        }
      }

    } catch (AmbariException e) {
      LOG.error("Failed to update '{}' parameter for viewName: {}, version: {}. Exception: {}",
          INTERACTIVE_KEY, viewName, viewVersion, e);
    }

  }
Checks is service is 'HIVE' and INTERACTIVE_SERVICE(LLAP) is enabled. Then, it sets the view instance
parameter 'use.hive.interactive.mode' for the 'AUTO_INSTANCE_VIEW' to be true.
@param viewInstanceEntity
@param service
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java