Skip to content

Commit

Permalink
remove guava from common module;handle exceptions in sweeper
Browse files Browse the repository at this point in the history
  • Loading branch information
apanicker-nflx committed Apr 26, 2022
1 parent f3bf576 commit e739c34
Show file tree
Hide file tree
Showing 92 changed files with 990 additions and 2,669 deletions.
8 changes: 4 additions & 4 deletions annotations-processor/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
]
},
"com.google.protobuf:protobuf-java": {
"locked": "3.20.0"
"locked": "3.20.1"
},
"com.netflix.conductor:conductor-annotations": {
"project": true
Expand Down Expand Up @@ -181,7 +181,7 @@
]
},
"com.google.protobuf:protobuf-java": {
"locked": "3.20.0"
"locked": "3.20.1"
},
"com.netflix.conductor:conductor-annotations": {
"project": true
Expand Down Expand Up @@ -280,7 +280,7 @@
]
},
"com.google.protobuf:protobuf-java": {
"locked": "3.20.0"
"locked": "3.20.1"
},
"com.jayway.jsonpath:json-path": {
"locked": "2.4.0",
Expand Down Expand Up @@ -661,7 +661,7 @@
]
},
"com.google.protobuf:protobuf-java": {
"locked": "3.20.0"
"locked": "3.20.1"
},
"com.jayway.jsonpath:json-path": {
"locked": "2.4.0",
Expand Down
100 changes: 0 additions & 100 deletions azureblob-storage/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -439,50 +439,6 @@
"com.fasterxml.jackson.dataformat:jackson-dataformat-xml"
]
},
"com.github.rholder:guava-retrying": {
"locked": "2.0.0",
"transitive": [
"com.netflix.conductor:conductor-common"
]
},
"com.google.code.findbugs:jsr305": {
"locked": "3.0.2",
"transitive": [
"com.github.rholder:guava-retrying",
"com.google.guava:guava"
]
},
"com.google.errorprone:error_prone_annotations": {
"locked": "2.3.4",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.guava:failureaccess": {
"locked": "1.0.1",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.guava:guava": {
"locked": "30.0-jre",
"transitive": [
"com.github.rholder:guava-retrying",
"com.netflix.conductor:conductor-core"
]
},
"com.google.guava:listenablefuture": {
"locked": "9999.0-empty-to-avoid-conflict-with-guava",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.j2objc:j2objc-annotations": {
"locked": "1.3",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.protobuf:protobuf-java": {
"locked": "3.13.0",
"transitive": [
Expand Down Expand Up @@ -754,12 +710,6 @@
"com.netflix.conductor:conductor-core"
]
},
"org.checkerframework:checker-qual": {
"locked": "3.5.0",
"transitive": [
"com.google.guava:guava"
]
},
"org.codehaus.woodstox:stax2-api": {
"locked": "4.2.1",
"transitive": [
Expand Down Expand Up @@ -1424,50 +1374,6 @@
"com.fasterxml.jackson.dataformat:jackson-dataformat-xml"
]
},
"com.github.rholder:guava-retrying": {
"locked": "2.0.0",
"transitive": [
"com.netflix.conductor:conductor-common"
]
},
"com.google.code.findbugs:jsr305": {
"locked": "3.0.2",
"transitive": [
"com.github.rholder:guava-retrying",
"com.google.guava:guava"
]
},
"com.google.errorprone:error_prone_annotations": {
"locked": "2.3.4",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.guava:failureaccess": {
"locked": "1.0.1",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.guava:guava": {
"locked": "30.0-jre",
"transitive": [
"com.github.rholder:guava-retrying",
"com.netflix.conductor:conductor-core"
]
},
"com.google.guava:listenablefuture": {
"locked": "9999.0-empty-to-avoid-conflict-with-guava",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.j2objc:j2objc-annotations": {
"locked": "1.3",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.protobuf:protobuf-java": {
"locked": "3.13.0",
"transitive": [
Expand Down Expand Up @@ -1791,12 +1697,6 @@
"org.springframework.boot:spring-boot-starter-test"
]
},
"org.checkerframework:checker-qual": {
"locked": "3.5.0",
"transitive": [
"com.google.guava:guava"
]
},
"org.codehaus.woodstox:stax2-api": {
"locked": "4.2.1",
"transitive": [
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ allprojects {
testLogging {
events = ["SKIPPED", "FAILED"]
exceptionFormat = "full"
displayGranularity = 1
showStandardStreams = false
}
}
Expand Down
98 changes: 4 additions & 94 deletions cassandra-persistence/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -330,49 +330,10 @@
"com.github.jnr:jnr-ffi"
]
},
"com.github.rholder:guava-retrying": {
"locked": "2.0.0",
"transitive": [
"com.netflix.conductor:conductor-common"
]
},
"com.google.code.findbugs:jsr305": {
"locked": "3.0.2",
"transitive": [
"com.github.rholder:guava-retrying",
"com.google.guava:guava"
]
},
"com.google.errorprone:error_prone_annotations": {
"locked": "2.3.4",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.guava:failureaccess": {
"locked": "1.0.1",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.guava:guava": {
"locked": "30.0-jre",
"transitive": [
"com.datastax.cassandra:cassandra-driver-core",
"com.github.rholder:guava-retrying",
"com.netflix.conductor:conductor-core"
]
},
"com.google.guava:listenablefuture": {
"locked": "9999.0-empty-to-avoid-conflict-with-guava",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.j2objc:j2objc-annotations": {
"locked": "1.3",
"locked": "19.0",
"transitive": [
"com.google.guava:guava"
"com.datastax.cassandra:cassandra-driver-core"
]
},
"com.google.protobuf:protobuf-java": {
Expand Down Expand Up @@ -562,12 +523,6 @@
"com.netflix.conductor:conductor-core"
]
},
"org.checkerframework:checker-qual": {
"locked": "3.5.0",
"transitive": [
"com.google.guava:guava"
]
},
"org.ow2.asm:asm": {
"locked": "5.0.4",
"transitive": [
Expand Down Expand Up @@ -1496,49 +1451,10 @@
"com.github.jnr:jnr-ffi"
]
},
"com.github.rholder:guava-retrying": {
"locked": "2.0.0",
"transitive": [
"com.netflix.conductor:conductor-common"
]
},
"com.google.code.findbugs:jsr305": {
"locked": "3.0.2",
"transitive": [
"com.github.rholder:guava-retrying",
"com.google.guava:guava"
]
},
"com.google.errorprone:error_prone_annotations": {
"locked": "2.3.4",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.guava:failureaccess": {
"locked": "1.0.1",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.guava:guava": {
"locked": "30.0-jre",
"transitive": [
"com.datastax.cassandra:cassandra-driver-core",
"com.github.rholder:guava-retrying",
"com.netflix.conductor:conductor-core"
]
},
"com.google.guava:listenablefuture": {
"locked": "9999.0-empty-to-avoid-conflict-with-guava",
"transitive": [
"com.google.guava:guava"
]
},
"com.google.j2objc:j2objc-annotations": {
"locked": "1.3",
"locked": "19.0",
"transitive": [
"com.google.guava:guava"
"com.datastax.cassandra:cassandra-driver-core"
]
},
"com.google.protobuf:protobuf-java": {
Expand Down Expand Up @@ -1846,12 +1762,6 @@
"org.springframework.boot:spring-boot-starter-test"
]
},
"org.checkerframework:checker-qual": {
"locked": "3.5.0",
"transitive": [
"com.google.guava:guava"
]
},
"org.codehaus.groovy:groovy": {
"locked": "2.5.14",
"transitive": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@
*/
package com.netflix.conductor.cassandra.dao;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import java.util.*;
import java.util.stream.Collectors;

import org.slf4j.Logger;
Expand All @@ -28,7 +23,6 @@
import com.netflix.conductor.cassandra.util.Statements;
import com.netflix.conductor.common.metadata.events.EventExecution;
import com.netflix.conductor.common.metadata.tasks.TaskDef;
import com.netflix.conductor.common.utils.RetryUtil;
import com.netflix.conductor.core.exception.ApplicationException;
import com.netflix.conductor.core.exception.ApplicationException.Code;
import com.netflix.conductor.dao.ConcurrentExecutionLimitDAO;
Expand All @@ -37,25 +31,12 @@
import com.netflix.conductor.model.TaskModel;
import com.netflix.conductor.model.WorkflowModel;

import com.datastax.driver.core.BatchStatement;
import com.datastax.driver.core.PreparedStatement;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Row;
import com.datastax.driver.core.Session;
import com.datastax.driver.core.*;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;

import static com.netflix.conductor.cassandra.util.Constants.DEFAULT_SHARD_ID;
import static com.netflix.conductor.cassandra.util.Constants.DEFAULT_TOTAL_PARTITIONS;
import static com.netflix.conductor.cassandra.util.Constants.ENTITY_KEY;
import static com.netflix.conductor.cassandra.util.Constants.ENTITY_TYPE_TASK;
import static com.netflix.conductor.cassandra.util.Constants.ENTITY_TYPE_WORKFLOW;
import static com.netflix.conductor.cassandra.util.Constants.PAYLOAD_KEY;
import static com.netflix.conductor.cassandra.util.Constants.TASK_ID_KEY;
import static com.netflix.conductor.cassandra.util.Constants.TOTAL_PARTITIONS_KEY;
import static com.netflix.conductor.cassandra.util.Constants.TOTAL_TASKS_KEY;
import static com.netflix.conductor.cassandra.util.Constants.WORKFLOW_ID_KEY;
import static com.netflix.conductor.cassandra.util.Constants.*;

@Trace
public class CassandraExecutionDAO extends CassandraBaseDAO
Expand Down Expand Up @@ -746,19 +727,11 @@ public void addTaskToLimit(TaskModel task) {
try {
recordCassandraDaoRequests(
"addTaskToLimit", task.getTaskType(), task.getWorkflowType());
new RetryUtil<>()
.retryOnException(
() ->
session.execute(
updateTaskDefLimitStatement.bind(
UUID.fromString(task.getWorkflowInstanceId()),
task.getTaskDefName(),
UUID.fromString(task.getTaskId()))),
null,
null,
3,
"Adding to task_def_limit",
"addTaskToLimit");
session.execute(
updateTaskDefLimitStatement.bind(
UUID.fromString(task.getWorkflowInstanceId()),
task.getTaskDefName(),
UUID.fromString(task.getTaskId())));
} catch (Exception e) {
Monitors.error(CLASS_NAME, "addTaskToLimit");
String errorMsg =
Expand All @@ -775,18 +748,9 @@ public void removeTaskFromLimit(TaskModel task) {
try {
recordCassandraDaoRequests(
"removeTaskFromLimit", task.getTaskType(), task.getWorkflowType());
new RetryUtil<>()
.retryOnException(
() ->
session.execute(
deleteTaskDefLimitStatement.bind(
task.getTaskDefName(),
UUID.fromString(task.getTaskId()))),
null,
null,
3,
"Deleting from task_def_limit",
"removeTaskFromLimit");
session.execute(
deleteTaskDefLimitStatement.bind(
task.getTaskDefName(), UUID.fromString(task.getTaskId())));
} catch (Exception e) {
Monitors.error(CLASS_NAME, "removeTaskFromLimit");
String errorMsg =
Expand Down
Loading

0 comments on commit e739c34

Please sign in to comment.