Skip to content

HDDS-15664. ozone debug ldb display DeletedBlocksTransactionSummary info#10614

Open
ChenSammi wants to merge 1 commit into
apache:masterfrom
ChenSammi:HDDS-15664
Open

HDDS-15664. ozone debug ldb display DeletedBlocksTransactionSummary info#10614
ChenSammi wants to merge 1 commit into
apache:masterfrom
ChenSammi:HDDS-15664

Conversation

@ChenSammi

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

add support in ldb scan command, to display DeletedBlocksTransactionSummary info.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15664

How was this patch tested?

Manual test

root@vc1337:/var/log/hadoop-ozone# ozone admin scm deletedBlocksTxn summary
RemoteException: SCM Server, while invoking StorageContainerLocationProtocolPB over node1. Retrying in 2000ms after 0 failover attempt(s).
DeletedBlocksTransaction summary:
  Total number of transactions: 43
  Total number of blocks: 43
  Total size of blocks: 2709
  Total replicated size of blocks: 8127


root@vc1337:/var/log/hadoop-ozone# ozone debug ldb --db=/var/lib/hadoop-ozone/scm/data/scm.db/ scan --cf=statefulServiceConfig
{ "DeletedBlockLogStateManager": {
  "memoizedHashCode" : 0,
  "memoizedSize" : -1,
  "unknownFields" : {
    "fields" : { }
  },
  "bitField0_" : 15,
  "totalTransactionCount_" : 43,
  "totalBlockCount_" : 43,
  "totalBlockSize_" : 2709,
  "totalBlockReplicatedSize_" : 8127,
  "memoizedIsInitialized" : 1
}
 }

@priyeshkaratha priyeshkaratha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ChenSammi for the patch. Changes LGTM

@Tejaskriya Tejaskriya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ChenSammi, LGTM!

@adoroszlai adoroszlai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ChenSammi for the patch. DBScanner is very generic, but the PR adds tightly coupled parse logic. Can you please explain why this is needed, why STATEFUL_SERVICE_CONFIG is the only column family that needs special care? If the current logic cannot parse it, can it be implemented in a way that helps with any other column families not handled currently?

Comment on lines +844 to +847
} catch (InvalidProtocolBufferException e) {
LOG.error("Failed to parse {} for key {}", STATEFUL_SERVICE_CONFIG.getName(), SERVICE_NAME, e);
} catch (IOException e) {
LOG.error("Failed to parse {} for key {}", STATEFUL_SERVICE_CONFIG.getName(), SERVICE_NAME, e);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate catch blocks, please merge them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants