GCP Dataproc:在激活堆栈驱动程序的情况下创建集群

时间:2019-10-30 14:54:56

标签: google-cloud-platform google-cloud-dataproc stackdriver google-cloud-stackdriver

使用GCP,我为我的处理实例化工作流程。我想激活Stackdriver日志以获取更多指标(请参见https://cloud.google.com/dataproc/docs/guides/stackdriver-logging)。

从文档中,我应该设置属性:

<f:widget.paginate objects="{imageData}" as="paginatedImages"
                       configuration="{itemsPerPage: 24, insertAbove: 1, insertBelow: 0}">

        <f:for each="{paginatedImages}" as="image" key="i">
            <!-- Assigning Variables -->
            <f:variable name="thumbnail" value="{image.imageData.thumbnail}"/>
            <f:variable name="fullSizeImage" value="{image.imageData.fullSizeImage}"/>
            <f:variable name="imageHeight" value="{image.imageData.imageHeight}"/>
            <f:variable name="label" value="{image.imageData.label}"/>
            <f:variable name="welshLabel" value="{image.imageData.welshLabel}"/>
            <f:variable name="description" value="{image.imageData.description}"/>
            <f:variable name="welshDescription" value="{image.imageData.welshDescription}"/>

            <!-- Displaying Images -->
            <div class="grid__item">
                <div class="hovereffect">
                    <a href="{fullSizeImage}">
                        <img src="{thumbnail}" itemprop="thumbnail" alt="{label}">
                    </a>
                </div>
            </div>
            <f:debug>{_all}</f:debug>
        </f:for>
    </f:widget.paginate>

我的工作流程模板如下:

dataproc:dataproc.logging.stackdriver.job.driver.enable=true

我应该在哪里设置此属性?

谢谢。

1 个答案:

答案 0 :(得分:3)

以下内容应该起作用。

由于API层次结构是深层嵌套的,因此您可以使用gcloud dataproc workflow-templates接口构建初始模板,describe命令将为您提供正确的YAML或JSON。然后,您可以使用本地文件中的instantiate-inline进行快速迭代。

placement:
  managedCluster:
    clusterName: my-cluster
    config:
      gceClusterConfig:
        zoneUri: europe-west1-d
      masterConfig:
        machineTypeUri: n1-standard-4
      workerConfig:
        machineTypeUri: n1-standard-4
        numInstances: 10
      softwareConfig:
        properties:
          dataproc:dataproc.logging.stackdriver.job.driver.enable: true    
相关问题