Class BuildLogFiles
- java.lang.Object
-
- jetbrains.buildServer.serverSide.buildLog.BuildLogFiles
-
public final class BuildLogFiles extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringIDX_EXTENSION_FLOW_AWAREstatic StringIDX_EXTENSION_NEWstatic StringIDX_EXTENSION_OLDstatic StringMSG_EXTENSION_MSG3static StringMSG_EXTENSION_MSG5
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringfindBuildLogId(File artifactsDirectory, boolean buildExists)static FilegetAnchorsFile(String buildLogId)Return a file that contains mapping between anchors and message ids.static FilegetBuildLogDir(String buildLogId)static intgetChunkSize(int formatVersion)static List<File>getFilesToDownload(String buildLogId)static FilegetFlowAwareIndexCannotBeCreatedMarkFile(String buildLogId)static FilegetFlowAwareIndexFile(String buildLogId)Returns the flow aware index file by the provided build log id.static FilegetFlowAwareIndexTmpFile(String buildLogId)static intgetFormatVersion(String buildLogId)Returns the messages file version: from0(the oldest) to6(the newest).static FilegetIndexFile(File messagesFile)Deprecated.It's preferred to use such methods that have dead with String 'buildLogId', not File.static FilegetIndexFile(String buildLogId)Returns the index file by the provided build log id.static FilegetLinearToFlowAwareIndexMappingFile(String buildLogId)Returns the file that contains the mapping from regular index messages numbers to the same messages numbers in the flow-aware index.static longgetLogModifiedTime(String buildLogId)static FilegetMessagesFile(File buildArtifactsDir, String extension)static FilegetMessagesFile(String buildLogId)static longgetMessagesFileLength(String buildLogId)static booleanmessagesFileExists(String buildLogId)static LongparseBuildId(File messagesOrIndexFile)
-
-
-
Field Detail
-
MSG_EXTENSION_MSG3
public static final String MSG_EXTENSION_MSG3
- See Also:
- Constant Field Values
-
MSG_EXTENSION_MSG5
public static final String MSG_EXTENSION_MSG5
- See Also:
- Constant Field Values
-
IDX_EXTENSION_OLD
public static final String IDX_EXTENSION_OLD
- See Also:
- Constant Field Values
-
IDX_EXTENSION_NEW
public static final String IDX_EXTENSION_NEW
- See Also:
- Constant Field Values
-
IDX_EXTENSION_FLOW_AWARE
public static final String IDX_EXTENSION_FLOW_AWARE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMessagesFile
@NotNull public static File getMessagesFile(@NotNull String buildLogId)
- See Also:
getBuildLogId(File)
-
getMessagesFileLength
public static long getMessagesFileLength(@NotNull String buildLogId)
-
messagesFileExists
public static boolean messagesFileExists(@NotNull String buildLogId)
-
getLogModifiedTime
public static long getLogModifiedTime(@NotNull String buildLogId)
-
getIndexFile
@NotNull public static File getIndexFile(@NotNull String buildLogId)
Returns the index file by the provided build log id. It isn't checked that the index file exists!
-
getIndexFile
@Deprecated @NotNull public static File getIndexFile(@NotNull File messagesFile)
Deprecated.It's preferred to use such methods that have dead with String 'buildLogId', not File.Returns the index file by the provided messages file. It isn't checked that the index file exists!
-
getFlowAwareIndexFile
@NotNull public static File getFlowAwareIndexFile(@NotNull String buildLogId)
Returns the flow aware index file by the provided build log id. It isn't checked that the index file exists!
-
getFlowAwareIndexTmpFile
@NotNull public static File getFlowAwareIndexTmpFile(@NotNull String buildLogId)
-
getLinearToFlowAwareIndexMappingFile
@NotNull public static File getLinearToFlowAwareIndexMappingFile(@NotNull String buildLogId)
Returns the file that contains the mapping from regular index messages numbers to the same messages numbers in the flow-aware index. It isn't checked that the mapping file exists!
-
getFlowAwareIndexCannotBeCreatedMarkFile
@NotNull public static File getFlowAwareIndexCannotBeCreatedMarkFile(@NotNull String buildLogId)
-
getAnchorsFile
@NotNull public static File getAnchorsFile(@NotNull String buildLogId)
Return a file that contains mapping between anchors and message ids.- Parameters:
buildLogId- build log identifier.- Returns:
- anchors file.
-
parseBuildId
@Nullable public static Long parseBuildId(@NotNull File messagesOrIndexFile)
- Parameters:
messagesOrIndexFile- messages or index file to check- Returns:
- id of the build the supplied messages or index file belongs to.
- Since:
- 7.1.3
-
getFormatVersion
public static int getFormatVersion(@NotNull String buildLogId)Returns the messages file version: from0(the oldest) to6(the newest).- Returns:
- 0 for oldest format, 1 for next version, in version 2 size of message chunk reduced from 64k to 16k, in version 5 we store blocks finish timestamps
-
getChunkSize
public static int getChunkSize(int formatVersion)
- See Also:
getFormatVersion(java.lang.String)
-
findBuildLogId
@NotNull public static String findBuildLogId(@NotNull File artifactsDirectory, boolean buildExists)
-
-