@@ -50,7 +50,7 @@ public class AdaptiveBigQueryWriter extends BigQueryWriter {
50
50
51
51
private final BigQuery bigQuery ;
52
52
private final SchemaManager schemaManager ;
53
- private final boolean updateSchemas ;
53
+ private final boolean autoUpdateSchemas ;
54
54
private final boolean autoCreateTables ;
55
55
56
56
/**
@@ -63,12 +63,12 @@ public AdaptiveBigQueryWriter(BigQuery bigQuery,
63
63
SchemaManager schemaManager ,
64
64
int retry ,
65
65
long retryWait ,
66
- boolean updateSchemas ,
66
+ boolean autoUpdateSchemas ,
67
67
boolean autoCreateTables ) {
68
68
super (retry , retryWait );
69
69
this .bigQuery = bigQuery ;
70
70
this .schemaManager = schemaManager ;
71
- this .updateSchemas = updateSchemas ;
71
+ this .autoUpdateSchemas = autoUpdateSchemas ;
72
72
this .autoCreateTables = autoCreateTables ;
73
73
}
74
74
@@ -104,14 +104,14 @@ public Map<Long, List<BigQueryError>> performWriteRequest(
104
104
// Should only perform one schema update attempt; may have to continue insert attempts due to
105
105
// BigQuery schema updates taking up to two minutes to take effect
106
106
if (writeResponse .hasErrors ()
107
- && onlyContainsInvalidSchemaErrors (writeResponse .getInsertErrors ()) && updateSchemas ) {
107
+ && onlyContainsInvalidSchemaErrors (writeResponse .getInsertErrors ()) && autoUpdateSchemas ) {
108
108
attemptSchemaUpdate (tableId , topic );
109
109
}
110
110
} catch (BigQueryException exception ) {
111
111
// Should only perform one table creation attempt.
112
112
if (isTableNotExistedException (exception ) && autoCreateTables && bigQuery .getTable (tableId .getBaseTableId ()) == null ) {
113
113
attemptTableCreate (tableId .getBaseTableId (), topic );
114
- } else if (isTableMissingSchema (exception ) && updateSchemas ) {
114
+ } else if (isTableMissingSchema (exception ) && autoUpdateSchemas ) {
115
115
attemptSchemaUpdate (tableId , topic );
116
116
} else {
117
117
throw exception ;
0 commit comments