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 @@ -452,10 +452,6 @@ public final class ScmConfigKeys {
public static final boolean
OZONE_SCM_PIPELINE_AUTO_CREATE_FACTOR_ONE_DEFAULT = true;

public static final String OZONE_SCM_BLOCK_DELETION_MAX_RETRY =
"ozone.scm.block.deletion.max.retry";
public static final int OZONE_SCM_BLOCK_DELETION_MAX_RETRY_DEFAULT = 4096;

public static final String OZONE_SCM_BLOCK_DELETION_PER_DN_DISTRIBUTION_FACTOR =
"ozone.scm.block.deletion.per.dn.distribution.factor";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.apache.hadoop.hdds.protocol.DatanodeDetails;
import org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.ContainerDataProto;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos.DeletedBlocksTransactionInfo;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ContainerBalancerStatusInfoResponseProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.DecommissionScmResponseProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.StartContainerBalancerResponseProto;
Expand Down Expand Up @@ -412,26 +411,6 @@ StartContainerBalancerResponseProto startContainerBalancer(
*/
void transferLeadership(String newLeaderId) throws IOException;

/**
* Return the failed transactions of the Deleted blocks. A transaction is
* considered to be failed if it has been sent more than MAX_RETRY limit
* and its count is reset to -1.
*
* @param count Maximum num of returned transactions, if {@literal < 0}. return all.
* @param startTxId The least transaction id to start with.
* @return a list of failed deleted block transactions.
* @throws IOException
*/
List<DeletedBlocksTransactionInfo> getFailedDeletedBlockTxn(int count,
long startTxId) throws IOException;

/**
* Reset the failed deleted block retry count.
* @param txIDs transactionId list to be reset
* @throws IOException
*/
int resetDeletedBlockRetryCount(List<Long> txIDs) throws IOException;

/**
* Get usage information of datanode by address or uuid.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ Pipeline createReplicationPipeline(HddsProtos.ReplicationType type,
* @return a list of failed deleted block transactions.
* @throws IOException
*/
@Deprecated
List<DeletedBlocksTransactionInfo> getFailedDeletedBlockTxn(int count,
long startTxId) throws IOException;

Expand All @@ -357,6 +358,7 @@ List<DeletedBlocksTransactionInfo> getFailedDeletedBlockTxn(int count,
* @return num of successful reset
* @throws IOException
*/
@Deprecated
int resetDeletedBlockRetryCount(List<Long> txIDs) throws IOException;

/**
Expand Down
10 changes: 0 additions & 10 deletions hadoop-hdds/common/src/main/resources/ozone-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -768,16 +768,6 @@
The port number of the Ozone SCM block client service.
</description>
</property>
<property>
<name>ozone.scm.block.deletion.max.retry</name>
<value>4096</value>
<tag>OZONE, SCM</tag>
<description>
SCM wraps up many blocks in a deletion transaction and sends that to data
node for physical deletion periodically. This property determines how many
times SCM is going to retry sending a deletion operation to the data node.
</description>
</property>
<property>
<name>ozone.scm.block.deletion.per.dn.distribution.factor</name>
<value>8</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.io.Closeable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -78,8 +79,6 @@
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainersOnDecomNodeRequestProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetContainersOnDecomNodeResponseProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetExistContainerWithPipelinesInBatchRequestProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetFailedDeletedBlocksTxnRequestProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetFailedDeletedBlocksTxnResponseProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetMetricsRequestProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetMetricsResponseProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.GetPipelineRequestProto;
Expand All @@ -102,7 +101,6 @@
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ReplicationManagerReportResponseProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ReplicationManagerStatusRequestProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ReplicationManagerStatusResponseProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.ResetDeletedBlockRetryCountRequestProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMCloseContainerRequestProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMCloseContainerResponseProto;
import org.apache.hadoop.hdds.protocol.proto.StorageContainerLocationProtocolProtos.SCMDeleteContainerRequestProto;
Expand Down Expand Up @@ -789,31 +787,18 @@ public void transferLeadership(String nodeId)
builder -> builder.setTransferScmLeadershipRequest(reqBuilder.build()));
}

@Deprecated
@Override
public List<DeletedBlocksTransactionInfo> getFailedDeletedBlockTxn(int count,
long startTxId) throws IOException {
GetFailedDeletedBlocksTxnRequestProto request =
GetFailedDeletedBlocksTxnRequestProto.newBuilder()
.setCount(count)
.setStartTxId(startTxId)
.build();
GetFailedDeletedBlocksTxnResponseProto resp = submitRequest(
Type.GetFailedDeletedBlocksTransaction,
builder -> builder.setGetFailedDeletedBlocksTxnRequest(request)).
getGetFailedDeletedBlocksTxnResponse();
return resp.getDeletedBlocksTransactionsList();
return Collections.emptyList();
}

@Deprecated
@Override
public int resetDeletedBlockRetryCount(List<Long> txIDs)
throws IOException {
ResetDeletedBlockRetryCountRequestProto request =
ResetDeletedBlockRetryCountRequestProto.newBuilder()
.addAllTransactionId(txIDs)
.build();
return submitRequest(Type.ResetDeletedBlockRetryCount,
builder -> builder.setResetDeletedBlockRetryCountRequest(request)).
getResetDeletedBlockRetryCountResponse().getResetCount();
return 0;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ message ScmContainerLocationRequest {
optional GetContainerCountRequestProto getContainerCountRequest = 38;
optional GetContainerReplicasRequestProto getContainerReplicasRequest = 39;
optional ReplicationManagerReportRequestProto replicationManagerReportRequest = 40;
optional ResetDeletedBlockRetryCountRequestProto resetDeletedBlockRetryCountRequest = 41;
optional ResetDeletedBlockRetryCountRequestProto resetDeletedBlockRetryCountRequest = 41 [deprecated=true];
optional TransferLeadershipRequestProto transferScmLeadershipRequest = 42;
optional GetFailedDeletedBlocksTxnRequestProto getFailedDeletedBlocksTxnRequest = 43;
optional GetFailedDeletedBlocksTxnRequestProto getFailedDeletedBlocksTxnRequest = 43 [deprecated=true];
optional DecommissionScmRequestProto decommissionScmRequest = 44;
optional SingleNodeQueryRequestProto singleNodeQueryRequest = 45;
optional GetContainersOnDecomNodeRequestProto getContainersOnDecomNodeRequest = 46;
Expand Down Expand Up @@ -134,9 +134,9 @@ message ScmContainerLocationResponse {
optional GetContainerCountResponseProto getContainerCountResponse = 38;
optional GetContainerReplicasResponseProto getContainerReplicasResponse = 39;
optional ReplicationManagerReportResponseProto getReplicationManagerReportResponse = 40;
optional ResetDeletedBlockRetryCountResponseProto resetDeletedBlockRetryCountResponse = 41;
optional ResetDeletedBlockRetryCountResponseProto resetDeletedBlockRetryCountResponse = 41 [deprecated=true];
optional TransferLeadershipResponseProto transferScmLeadershipResponse = 42;
optional GetFailedDeletedBlocksTxnResponseProto getFailedDeletedBlocksTxnResponse = 43;
optional GetFailedDeletedBlocksTxnResponseProto getFailedDeletedBlocksTxnResponse = 43 [deprecated=true];
optional DecommissionScmResponseProto decommissionScmResponse = 44;
optional SingleNodeQueryResponseProto singleNodeQueryResponse = 45;
optional GetContainersOnDecomNodeResponseProto getContainersOnDecomNodeResponse = 46;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ message DeletedBlocksTransaction {
required int64 containerID = 2;
repeated int64 localID = 3;
// the retry time of sending deleting command to datanode.
required int32 count = 4;
// We don't have to store the retry count in DB.
optional int32 count = 4 [deprecated=true];
}

// ACK message datanode sent to SCM, contains the result of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,38 +51,13 @@ DatanodeDeletedBlockTransactions getTransactions(
throws IOException;

/**
* Return the failed transactions in batches in the log. A transaction is
* considered to be failed if it has been sent more than MAX_RETRY limit
* and its count is reset to -1.
*
* @param count Number of failed transactions to be returned.
* @param startTxId The least transaction id to start with.
* @return a list of failed deleted block transactions.
* @throws IOException
*/
List<DeletedBlocksTransaction> getFailedTransactions(int count,
long startTxId) throws IOException;

/**
* Increments count for given list of transactions by 1.
* The log maintains a valid range of counts for each transaction
* [0, MAX_RETRY]. If exceed this range, resets it to -1 to indicate
* the transaction is no longer valid.
*
* @param txIDs - transaction ID.
* Increments count for the given list of transactions by 1.
* The retry count is maintained only for in-flight transactions,
* this will be useful in debugging.
*/
void incrementCount(List<Long> txIDs)
throws IOException;


/**
* Reset DeletedBlock transaction retry count.
*
* @param txIDs transactionId list to be reset
* @return num of successful reset
*/
int resetCount(List<Long> txIDs) throws IOException;

/**
* Records the creation of a transaction for a DataNode.
*
Expand Down
Loading