Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
How to generate a report of actual space consumed by the compressed archives per project wise
Description:
How to generate a report of actual space consumed by the compressed archives per project wise
Answer/Solution:
Since StarTeam DB stores the file size before the compression, it is not possible to query StarTeam DB to generate report of actual space consumed by compressed archives per project wise. However there is a way…use StarTeam Java SDK API to get the archive names of all revisions of all files in a project and then based on archive file name, traverse through Repository path(refer below) to calculate the compressed archive file size. Java IO package can be useful in this scenario
How to find archive path
StarTeam organizes the files located in the Archives and Cache folders into subfolders. The name of the subfolders in which StarTeam stores a file revision is based on the initial characters in the name of the archive.
For example, suppose the contents of a file revision has an MD5 value of 01fc3c4ac5e0e92cc707f30fb73a0726.
Assuming the user specified an Archives path of C:\DefaultHive\Archives, the Archives path for this revision would be one of the following, depending on whether or not StarTeam compresses the archive file:
C:\DefaultHive\Archives\01\f\01fc3c4ac5e0e92cc707f30fb73a0726
C:\DefaultHive\Archives\01\f\01fc3c4ac5e0e92cc707f30fb73a0726.gz