/
githubmirror
/
the-algorithm
Обзор
Документация
Войти
/
githubmirror
/
the-algorithm
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/java/com/twitter/search/earlybird/partition/StatusBatchFlushVersion.java
41 строка
1 KB
twitter-team
Twitter Recommendation Algorithm
01 апр 2023, 01:36
01 апр 2023, 01:36
ef4c5eb
Код
Авторство
О чём код?
package com.twitter.search.earlybird.partition; /** * Keeps track of versioning for flushed status batch data. */ public enum StatusBatchFlushVersion { VERSION_0("Initial version of status batch flushing", true), VERSION_1("Switching to use field groups (contains changes to PartitionedBatch)", true), VERSION_2("Removing support for per-partition _SUCCESS markers", true), /* Put the semi colon on a separate line to avoid polluting git blame history */; public static final StatusBatchFlushVersion CURRENT_FLUSH_VERSION = StatusBatchFlushVersion.values()[StatusBatchFlushVersion.values().length - 1]; public static final String DELIMITER = "_v_"; private final String description; private final boolean isOfficial; private StatusBatchFlushVersion(String description, boolean official) { this.description = description; isOfficial = official; } public int getVersionNumber() { return this.ordinal(); } public String getVersionFileExtension() { return DELIMITER + ordinal(); } public boolean isOfficial() { return isOfficial; } public String getDescription() { return description; } }