mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 01:17:14 +02:00
Consolidate BigQuery handling into one place
I'm writing a follow-up CL that will send integrity checking data to BigQuery, and that is made a lot easier by centralizing the BigQuery connection logic. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=119375766
This commit is contained in:
parent
c880a042a7
commit
755fce9e52
12 changed files with 329 additions and 347 deletions
|
@ -14,30 +14,14 @@
|
|||
|
||||
package com.google.domain.registry.monitoring.whitebox;
|
||||
|
||||
import com.google.api.services.bigquery.model.TableFieldSchema;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.domain.registry.bigquery.BigqueryUtils.FieldType;
|
||||
import com.google.domain.registry.bigquery.BigquerySchemas;
|
||||
import com.google.domain.registry.model.eppoutput.Result.Code;
|
||||
|
||||
/** The EPP Metrics collector. See {@link Metrics}. */
|
||||
public class EppMetrics extends Metrics {
|
||||
|
||||
public static final ImmutableList<TableFieldSchema> SCHEMA_FIELDS =
|
||||
ImmutableList.<TableFieldSchema>of(
|
||||
new TableFieldSchema().setName("requestId").setType(FieldType.STRING.name()),
|
||||
new TableFieldSchema().setName("startTime").setType(FieldType.TIMESTAMP.name()),
|
||||
new TableFieldSchema().setName("endTime").setType(FieldType.TIMESTAMP.name()),
|
||||
new TableFieldSchema().setName("commandName").setType(FieldType.STRING.name()),
|
||||
new TableFieldSchema().setName("clientId").setType(FieldType.STRING.name()),
|
||||
new TableFieldSchema().setName("privilegeLevel").setType(FieldType.STRING.name()),
|
||||
new TableFieldSchema().setName("eppTarget").setType(FieldType.STRING.name()),
|
||||
new TableFieldSchema().setName("eppStatus").setType(FieldType.INTEGER.name()),
|
||||
new TableFieldSchema().setName("attempts").setType(FieldType.INTEGER.name()));
|
||||
|
||||
public static final String TABLE_ID = "eppMetrics";
|
||||
|
||||
public EppMetrics() {
|
||||
setTableId(TABLE_ID);
|
||||
setTableId(BigquerySchemas.EPPMETRICS_TABLE_ID);
|
||||
fields.put("attempts", 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue