Skip to content

Commit

Permalink
storage: Improve HBaseLockManager errors and warn messages. #TASK-5895
Browse files Browse the repository at this point in the history
  • Loading branch information
j-coll committed May 31, 2024
1 parent f15978b commit e968bd2
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.opencb.opencga.storage.core.metadata.models.ProjectMetadata;

import java.io.IOException;
import java.util.concurrent.TimeoutException;

/**
* Created on 02/05/18.
Expand All @@ -17,14 +16,12 @@
public interface ProjectMetadataAdaptor extends AutoCloseable {

default Lock lockProject(long lockDuration, long timeout)
throws InterruptedException, TimeoutException, StorageEngineException {
throws StorageEngineException {
return lockProject(lockDuration, timeout, null);
}

Lock lockProject(long lockDuration, long timeout, String lockName)
throws InterruptedException, TimeoutException, StorageEngineException;

void unLockProject(long lockId) throws StorageEngineException;
throws StorageEngineException;

DataResult<ProjectMetadata> getProjectMetadata();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;

/**
Expand All @@ -29,7 +28,7 @@ public class DummyProjectMetadataAdaptor implements ProjectMetadataAdaptor {
private static Map<String, Integer> counters = new HashMap<>();

@Override
public Lock lockProject(long lockDuration, long timeout, String lockName) throws InterruptedException, TimeoutException {
public Lock lockProject(long lockDuration, long timeout, String lockName) {
return new Lock(0) {
@Override
public void unlock0() {
Expand All @@ -43,10 +42,6 @@ public void refresh() {
};
}

@Override
public void unLockProject(long lockId) {
}

@Override
public synchronized DataResult<ProjectMetadata> getProjectMetadata() {
final DataResult<ProjectMetadata> result = new DataResult<>();
Expand Down
Loading

0 comments on commit e968bd2

Please sign in to comment.