Skip to content

Instantly share code, notes, and snippets.

@quiiver
Created November 9, 2023 21:08
Show Gist options
  • Save quiiver/1e3f14aa46b4bb5a06d48b8461b1ec1b to your computer and use it in GitHub Desktop.
Save quiiver/1e3f14aa46b4bb5a06d48b8461b1ec1b to your computer and use it in GitHub Desktop.
#!/bin/bash
set -ux
PROJECT="contextual-services-dev"
JOB_NAME="contextual-services-reporter-$(whoami)"
mvn exec:java -Dexec.mainClass=com.mozilla.telemetry.ContextualServicesReporter -Dexec.args="\
--runner=Dataflow \
--jobName=$JOB_NAME \
--project=$PROJECT \
--inputType=pubsub \
--input='projects/contextual-services-dev/subscriptions/ctxsvc-input' \
--outputTableRowFormat=payload \
--errorBqWriteMethod=streaming \
--errorOutputType=bigquery \
--errorOutput=$PROJECT:contextual_services.reporting_errors \
--region=us-central1 \
--usePublicIps=true \
--gcsUploadBufferSizeBytes=16777216 \
--urlAllowList=gs://contextual-services-data-dev/urlAllowlist.csv \
--allowedDocTypes=topsites-click,topsites-impression,quicksuggest-impression,quicksuggest-click \
--allowedNamespaces=contextual-services,org-mozilla-fenix,org-mozilla-firefox-beta,org-mozilla-firefox,org-mozilla-ios-firefox,org-mozilla-ios-firefoxbeta,org-mozilla-ios-fennec \
--aggregationWindowDuration=10m \
--clickSpikeWindowDuration=3m \
--clickSpikeThreshold=10 \
--reportingEnabled=false \
--logReportingUrls=true \
--maxNumWorkers=2 \
--numWorkers=1 \
--autoscalingAlgorithm=THROUGHPUT_BASED \
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment