Skip to content

Commit b0dc024

Browse files
committed
changes to bq schema and consumer group id name
1 parent 99bd0b7 commit b0dc024

File tree

3 files changed

+30
-29
lines changed

3 files changed

+30
-29
lines changed

broker/consumer/lvk/psconnect-worker-authenticated.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sasl.jaas.config=org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginMo
2323
clientSecret="CLIENT_SECRET";
2424

2525
# settings with `consumer.` prefixes are passed through to the Kafka consumer
26-
consumer.group.id=pitt-google-broker
26+
consumer.group.id=GROUP_ID
2727
consumer.auto.offset.reset=earliest
2828
consumer.sasl.mechanism=OAUTHBEARER
2929
consumer.sasl.kerberos.service.name=kafka

broker/consumer/lvk/vm_startup.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,22 @@ client_id="${survey}-${PROJECT_ID}-client-id"
6060
client_secret="${survey}-${PROJECT_ID}-client-secret"
6161
CLIENT_ID=$(gcloud secrets versions access latest --secret="${client_id}")
6262
CLIENT_SECRET=$(gcloud secrets versions access latest --secret="${client_secret}")
63+
group_id="pittgooglebroker"
64+
# use test resources, if requested
65+
if [ "$testid" != "False" ]; then
66+
group_id="${group_id}-${testid}"
67+
fi
6368

6469
cd "${workingdir}" || exit
6570

6671
fconfig=admin.properties
67-
sed -i "s/CLIENT_ID/${CLIENT_ID}/g" ${fconfig}
68-
sed -i "s/CLIENT_SECRET/${CLIENT_SECRET}/g" ${fconfig}
72+
sed -i "s/CLIENT_ID/${CLIENT_ID}/g" ${fconfig} && sed -i "s/CLIENT_SECRET/${CLIENT_SECRET}/g" ${fconfig}
6973

7074
fconfig=psconnect-worker-authenticated.properties
71-
sed -i "s/CLIENT_ID/${CLIENT_ID}/g" ${fconfig}
72-
sed -i "s/CLIENT_SECRET/${CLIENT_SECRET}/g" ${fconfig}
75+
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}
7376

7477
fconfig=ps-connector.properties
75-
sed -i "s/PROJECT_ID/${PROJECT_ID}/g" ${fconfig}
76-
sed -i "s/PS_TOPIC/${PS_TOPIC}/g" ${fconfig}
77-
sed -i "s/KAFKA_TOPIC/${KAFKA_TOPIC}/g" ${fconfig}
78+
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}
7879

7980
#--- Check until alerts start streaming into the topic
8081
alerts_flowing=false

broker/setup_broker/lvk/templates/bq_lvk_alerts_v1_0_schema.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
},
6262
{
6363
"description": "A skymap in a multi-order FITS format as a Base64-encoded string.",
64-
"mode": "REQUIRED",
64+
"mode": "NULLABLE",
6565
"name": "skymap",
6666
"type": "STRING"
6767
},
@@ -93,31 +93,31 @@
9393
"description": "The central frequency of the burst. Only present if group=Burst.",
9494
"mode": "NULLABLE",
9595
"name": "central_frequency",
96-
"type": "INTEGER"
96+
"type": "FLOAT"
9797
},
9898
{
9999
"description": "The probabilities that the source has various properties, assuming that the source is astrophysical.",
100100
"fields": [
101101
{
102102
"description": "Probability that at least one of the compact objects was a neutron star",
103-
"mode": "REQUIRED",
104-
"name": "HasNS",
103+
"mode": "NULLABLE",
104+
"name": "hasns",
105105
"type": "FLOAT"
106106
},
107107
{
108108
"description": "Probability that the system ejected a non-zero amount of neutron star matter",
109-
"mode": "REQUIRED",
110-
"name": "HasRemnant",
109+
"mode": "NULLABLE",
110+
"name": "hasremnant",
111111
"type": "FLOAT"
112112
},
113113
{
114114
"description": "Probability that at least one of the compact objects has mass in the range 3-5 solar masses",
115-
"mode": "REQUIRED",
116-
"name": "HasMassGap",
115+
"mode": "NULLABLE",
116+
"name": "hasmassgap",
117117
"type": "FLOAT"
118118
}
119119
],
120-
"mode": "REQUIRED",
120+
"mode": "NULLABLE",
121121
"name": "properties",
122122
"type": "RECORD"
123123
},
@@ -126,30 +126,30 @@
126126
"fields": [
127127
{
128128
"description": "Probability that the source is a BNS",
129-
"mode": "REQUIRED",
130-
"name": "BNS",
129+
"mode": "NULLABLE",
130+
"name": "bns",
131131
"type": "FLOAT"
132132
},
133133
{
134134
"description": "Probability that the source is a NSBH",
135-
"mode": "REQUIRED",
136-
"name": "NSBH",
135+
"mode": "NULLABLE",
136+
"name": "nsbh",
137137
"type": "FLOAT"
138138
},
139139
{
140140
"description": "Probability that the source is a BBH",
141-
"mode": "REQUIRED",
142-
"name": "BBH",
141+
"mode": "NULLABLE",
142+
"name": "bbh",
143143
"type": "FLOAT"
144144
},
145145
{
146146
"description": "Probability that the source is Terrestrial (i.e, noise)",
147-
"mode": "REQUIRED",
148-
"name": "Terrestrial",
147+
"mode": "NULLABLE",
148+
"name": "terrestrial",
149149
"type": "FLOAT"
150150
}
151151
],
152-
"mode": "REQUIRED",
152+
"mode": "NULLABLE",
153153
"name": "classification",
154154
"type": "RECORD"
155155
}
@@ -193,19 +193,19 @@
193193
},
194194
{
195195
"description": "The joint time coincidence FAR in units of Hz, if available.",
196-
"mode": "REQUIRED",
196+
"mode": "NULLABLE",
197197
"name": "time_coincidence_far",
198198
"type": "FLOAT"
199199
},
200200
{
201201
"description": "The joint time and sky position coincidence FAR in units of Hz, if available.",
202-
"mode": "REQUIRED",
202+
"mode": "NULLABLE",
203203
"name": "time_sky_position_coincidence_far",
204204
"type": "FLOAT"
205205
},
206206
{
207207
"description": "A skymap in a multi-order FITS format produced by combining the GW skymap and the external coincidence skymap.",
208-
"mode": "REQUIRED",
208+
"mode": "NULLABLE",
209209
"name": "combined_skymap",
210210
"type": "STRING"
211211
}

0 commit comments

Comments
 (0)