Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,5 @@ void deleteContainer(ContainerID containerID)
* Returns containerStateManger.
* @return containerStateManger
*/
ContainerStateManagerV2 getContainerStateManager();
ContainerStateManager getContainerStateManager();
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public class ContainerManagerImpl implements ContainerManager {
/**
*
*/
private final ContainerStateManagerV2 containerStateManager;
private final ContainerStateManager containerStateManager;

private final SCMHAManager haManager;
private final SequenceIdGenerator sequenceIdGen;
Expand Down Expand Up @@ -443,7 +443,7 @@ public void close() throws IOException {

// Remove this after fixing Recon
@VisibleForTesting
public ContainerStateManagerV2 getContainerStateManager() {
public ContainerStateManager getContainerStateManager() {
return containerStateManager;
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
* This class is NOT thread safe. All the calls are idempotent.
*/
public final class ContainerStateManagerImpl
implements ContainerStateManagerV2 {
implements ContainerStateManager {

/**
* Logger instance of ContainerStateManagerImpl.
Expand Down Expand Up @@ -561,21 +561,21 @@ public Builder setContainerStore(
return this;
}

public ContainerStateManagerV2 build() throws IOException {
public ContainerStateManager build() throws IOException {
Preconditions.checkNotNull(conf);
Preconditions.checkNotNull(pipelineMgr);
Preconditions.checkNotNull(table);

final ContainerStateManagerV2 csm = new ContainerStateManagerImpl(
final ContainerStateManager csm = new ContainerStateManagerImpl(
conf, pipelineMgr, table, transactionBuffer);

final SCMHAInvocationHandler invocationHandler =
new SCMHAInvocationHandler(RequestType.CONTAINER, csm,
scmRatisServer);

return (ContainerStateManagerV2) Proxy.newProxyInstance(
return (ContainerStateManager) Proxy.newProxyInstance(
SCMHAInvocationHandler.class.getClassLoader(),
new Class<?>[]{ContainerStateManagerV2.class}, invocationHandler);
new Class<?>[]{ContainerStateManager.class}, invocationHandler);
}

}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
public final class TestUtils {

private static ThreadLocalRandom random = ThreadLocalRandom.current();
private static PipelineID randomPipelineID = PipelineID.randomId();

private TestUtils() {
}
Expand Down Expand Up @@ -621,15 +622,28 @@ public static StorageContainerManager getScm(OzoneConfiguration conf,
return StorageContainerManager.createSCM(conf, configurator);
}

public static ContainerInfo getContainer(
private static ContainerInfo.Builder getDefaultContainerInfoBuilder(
final HddsProtos.LifeCycleState state) {
return new ContainerInfo.Builder()
.setContainerID(RandomUtils.nextLong())
.setReplicationConfig(
new RatisReplicationConfig(ReplicationFactor.THREE))
.setState(state)
.setSequenceId(10000L)
.setOwner("TEST")
.setOwner("TEST");
}

public static ContainerInfo getContainer(
final HddsProtos.LifeCycleState state) {
return getDefaultContainerInfoBuilder(state)
.setPipelineID(randomPipelineID)
.build();
}

public static ContainerInfo getContainer(
final HddsProtos.LifeCycleState state, PipelineID pipelineID) {
return getDefaultContainerInfoBuilder(state)
.setPipelineID(pipelineID)
.build();
}

Expand Down
Loading