Bump com.puppycrawl.tools:checkstyle from 10.12.3 to 10.18.2 (#2663)
* Bump com.puppycrawl.tools:checkstyle from 10.12.3 to 10.18.2 Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 10.12.3 to 10.18.2. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-10.12.3...checkstyle-10.18.2) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Minor refactoring to make checkstyle pass --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Arkadiusz Komarzewski <akomarzewski@mozilla.com>
This commit is contained in:
Родитель
f5af719e89
Коммит
4b94b071d5
|
@ -119,7 +119,6 @@ public class ParseReportingUrl extends
|
|||
throw new UncheckedIOException(e);
|
||||
}
|
||||
|
||||
Map<String, String> attributes = new HashMap<>(message.getAttributeMap());
|
||||
String namespace = Optional //
|
||||
.ofNullable(message.getAttribute(Attribute.DOCUMENT_NAMESPACE)) //
|
||||
.orElseThrow(() -> new InvalidAttributeException("Missing namespace"));
|
||||
|
@ -241,6 +240,8 @@ public class ParseReportingUrl extends
|
|||
String reportingUrl = extractReportingUrl(metrics);
|
||||
BuildReportingUrl builtUrl = new BuildReportingUrl(reportingUrl);
|
||||
|
||||
Map<String, String> attributes = new HashMap<>(message.getAttributeMap());
|
||||
|
||||
if (!isUrlValid(builtUrl.getReportingUrl(),
|
||||
Objects.requireNonNull(interaction.getInteractionType()))) {
|
||||
PerDocTypeCounter.inc(attributes, "rejected_nonnull_url");
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO.Write.Method;
|
|||
|
||||
/**
|
||||
* Enum describing the types of inserts we can make to BigQuery, along with options that we need
|
||||
* to set differently for the two types; see https://cloud.google.com/bigquery/quotas
|
||||
* to set differently for the two types; see https://cloud.google.com/bigquery/quotas.
|
||||
*/
|
||||
public enum BigQueryWriteMethod {
|
||||
streaming(Method.STREAMING_INSERTS, 1000 * 1000), //
|
||||
|
|
|
@ -64,12 +64,6 @@ public class BigQuerySchemaStore extends SchemaStore<Schema> {
|
|||
super(null, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema(String path) {
|
||||
// can't find schema without tableId
|
||||
throw SchemaNotFoundException.forName(path);
|
||||
}
|
||||
|
||||
// We have hit rate limiting issues that have sent valid data to error output, so we make the
|
||||
// retry settings a bit more generous; see https://github.com/mozilla/gcp-ingestion/issues/651
|
||||
private static final RetrySettings RETRY_SETTINGS = ServiceOptions //
|
||||
|
@ -80,6 +74,12 @@ public class BigQuerySchemaStore extends SchemaStore<Schema> {
|
|||
private transient Cache<TableId, Schema> tableSchemaCache;
|
||||
private transient BigQuery bqService;
|
||||
|
||||
@Override
|
||||
public Schema getSchema(String path) {
|
||||
// can't find schema without tableId
|
||||
throw SchemaNotFoundException.forName(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema(TableId tableId, Map<String, String> attributes) {
|
||||
if (tableId == null) {
|
||||
|
|
|
@ -195,9 +195,6 @@ public class PubsubMessageToObjectNodeSinkTest {
|
|||
|
||||
private void transformAndTestOutput(List<String> strictSchemaDocTypes, String inputMessagesPath,
|
||||
String outputMessagesPath) throws IOException {
|
||||
PubsubMessageToObjectNode transform = PubsubMessageToObjectNode //
|
||||
.Payload.of(strictSchemaDocTypes, TestConstant.SCHEMAS_LOCATION, FileInputStream::new);
|
||||
|
||||
final List<Map.Entry<Map<String, String>, byte[]>> input;
|
||||
final String inputPath = Resources.getResource(inputMessagesPath).getPath();
|
||||
try (Stream<String> stream = Files.lines(Paths.get(inputPath))) {
|
||||
|
@ -221,6 +218,9 @@ public class PubsubMessageToObjectNodeSinkTest {
|
|||
|
||||
assertEquals(expected.size(), input.size());
|
||||
|
||||
PubsubMessageToObjectNode transform = PubsubMessageToObjectNode //
|
||||
.Payload.of(strictSchemaDocTypes, TestConstant.SCHEMAS_LOCATION, FileInputStream::new);
|
||||
|
||||
for (int i = 0; i < expected.size(); i++) {
|
||||
assertEquals(expected.get(i),
|
||||
Json.asMap(transform.apply(input.get(i).getKey(), input.get(i).getValue())));
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -299,7 +299,7 @@
|
|||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>10.12.3</version>
|
||||
<version>10.18.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
|
|
Загрузка…
Ссылка в новой задаче