Skip to content

Commit

Permalink
changes to bq schema and consumer group id name
Browse files Browse the repository at this point in the history
  • Loading branch information
hernandezc1 committed Oct 7, 2024
1 parent 99bd0b7 commit b0dc024
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sasl.jaas.config=org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginMo
clientSecret="CLIENT_SECRET";

# settings with `consumer.` prefixes are passed through to the Kafka consumer
consumer.group.id=pitt-google-broker
consumer.group.id=GROUP_ID
consumer.auto.offset.reset=earliest
consumer.sasl.mechanism=OAUTHBEARER
consumer.sasl.kerberos.service.name=kafka
Expand Down
15 changes: 8 additions & 7 deletions broker/consumer/lvk/vm_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,22 @@ client_id="${survey}-${PROJECT_ID}-client-id"
client_secret="${survey}-${PROJECT_ID}-client-secret"
CLIENT_ID=$(gcloud secrets versions access latest --secret="${client_id}")
CLIENT_SECRET=$(gcloud secrets versions access latest --secret="${client_secret}")
group_id="pittgooglebroker"
# use test resources, if requested
if [ "$testid" != "False" ]; then
group_id="${group_id}-${testid}"
fi

cd "${workingdir}" || exit

fconfig=admin.properties
sed -i "s/CLIENT_ID/${CLIENT_ID}/g" ${fconfig}
sed -i "s/CLIENT_SECRET/${CLIENT_SECRET}/g" ${fconfig}
sed -i "s/CLIENT_ID/${CLIENT_ID}/g" ${fconfig} && sed -i "s/CLIENT_SECRET/${CLIENT_SECRET}/g" ${fconfig}

fconfig=psconnect-worker-authenticated.properties
sed -i "s/CLIENT_ID/${CLIENT_ID}/g" ${fconfig}
sed -i "s/CLIENT_SECRET/${CLIENT_SECRET}/g" ${fconfig}
sed -i "s/CLIENT_ID/${CLIENT_ID}/g" ${fconfig} && sed -i "s/CLIENT_SECRET/${CLIENT_SECRET}/g" ${fconfig} && sed -i "s/GROUP_ID/${group_id}/g" ${fconfig}

fconfig=ps-connector.properties
sed -i "s/PROJECT_ID/${PROJECT_ID}/g" ${fconfig}
sed -i "s/PS_TOPIC/${PS_TOPIC}/g" ${fconfig}
sed -i "s/KAFKA_TOPIC/${KAFKA_TOPIC}/g" ${fconfig}
sed -i "s/PROJECT_ID/${PROJECT_ID}/g" ${fconfig} && sed -i "s/PS_TOPIC/${PS_TOPIC}/g" ${fconfig} && sed -i "s/KAFKA_TOPIC/${KAFKA_TOPIC}/g" ${fconfig}

#--- Check until alerts start streaming into the topic
alerts_flowing=false
Expand Down
42 changes: 21 additions & 21 deletions broker/setup_broker/lvk/templates/bq_lvk_alerts_v1_0_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
{
"description": "A skymap in a multi-order FITS format as a Base64-encoded string.",
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "skymap",
"type": "STRING"
},
Expand Down Expand Up @@ -93,31 +93,31 @@
"description": "The central frequency of the burst. Only present if group=Burst.",
"mode": "NULLABLE",
"name": "central_frequency",
"type": "INTEGER"
"type": "FLOAT"
},
{
"description": "The probabilities that the source has various properties, assuming that the source is astrophysical.",
"fields": [
{
"description": "Probability that at least one of the compact objects was a neutron star",
"mode": "REQUIRED",
"name": "HasNS",
"mode": "NULLABLE",
"name": "hasns",
"type": "FLOAT"
},
{
"description": "Probability that the system ejected a non-zero amount of neutron star matter",
"mode": "REQUIRED",
"name": "HasRemnant",
"mode": "NULLABLE",
"name": "hasremnant",
"type": "FLOAT"
},
{
"description": "Probability that at least one of the compact objects has mass in the range 3-5 solar masses",
"mode": "REQUIRED",
"name": "HasMassGap",
"mode": "NULLABLE",
"name": "hasmassgap",
"type": "FLOAT"
}
],
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "properties",
"type": "RECORD"
},
Expand All @@ -126,30 +126,30 @@
"fields": [
{
"description": "Probability that the source is a BNS",
"mode": "REQUIRED",
"name": "BNS",
"mode": "NULLABLE",
"name": "bns",
"type": "FLOAT"
},
{
"description": "Probability that the source is a NSBH",
"mode": "REQUIRED",
"name": "NSBH",
"mode": "NULLABLE",
"name": "nsbh",
"type": "FLOAT"
},
{
"description": "Probability that the source is a BBH",
"mode": "REQUIRED",
"name": "BBH",
"mode": "NULLABLE",
"name": "bbh",
"type": "FLOAT"
},
{
"description": "Probability that the source is Terrestrial (i.e, noise)",
"mode": "REQUIRED",
"name": "Terrestrial",
"mode": "NULLABLE",
"name": "terrestrial",
"type": "FLOAT"
}
],
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "classification",
"type": "RECORD"
}
Expand Down Expand Up @@ -193,19 +193,19 @@
},
{
"description": "The joint time coincidence FAR in units of Hz, if available.",
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "time_coincidence_far",
"type": "FLOAT"
},
{
"description": "The joint time and sky position coincidence FAR in units of Hz, if available.",
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "time_sky_position_coincidence_far",
"type": "FLOAT"
},
{
"description": "A skymap in a multi-order FITS format produced by combining the GW skymap and the external coincidence skymap.",
"mode": "REQUIRED",
"mode": "NULLABLE",
"name": "combined_skymap",
"type": "STRING"
}
Expand Down

0 comments on commit b0dc024

Please sign in to comment.