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 String
IDX_EXTENSION_FLOW_AWARE
static String
IDX_EXTENSION_NEW
static String
IDX_EXTENSION_OLD
static String
MSG_EXTENSION_MSG3
static String
MSG_EXTENSION_MSG5
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
findBuildLogId(File artifactsDirectory, boolean buildExists)
static File
getAnchorsFile(String buildLogId)
Return a file that contains mapping between anchors and message ids.static File
getBuildLogDir(String buildLogId)
static int
getChunkSize(int formatVersion)
static List<File>
getFilesToDownload(String buildLogId)
static File
getFlowAwareIndexCannotBeCreatedMarkFile(String buildLogId)
static File
getFlowAwareIndexFile(String buildLogId)
Returns the flow aware index file by the provided build log id.static File
getFlowAwareIndexTmpFile(String buildLogId)
static int
getFormatVersion(String buildLogId)
Returns the messages file version: from0
(the oldest) to6
(the newest).static File
getIndexFile(File messagesFile)
Deprecated.It's preferred to use such methods that have dead with String 'buildLogId', not File.static File
getIndexFile(String buildLogId)
Returns the index file by the provided build log id.static File
getLinearToFlowAwareIndexMappingFile(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 long
getLogModifiedTime(String buildLogId)
static File
getMessagesFile(File buildArtifactsDir, String extension)
static File
getMessagesFile(String buildLogId)
static long
getMessagesFileLength(String buildLogId)
static boolean
messagesFileExists(String buildLogId)
static Long
parseBuildId(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)
-
-