diff --git a/cosid-core/src/test/java/me/ahoo/cosid/segment/grouped/date/YearMonthDayGroupBySupplierTest.java b/cosid-core/src/test/java/me/ahoo/cosid/segment/grouped/date/YearMonthDayGroupBySupplierTest.java index bb42eb9950..1b00277d4c 100644 --- a/cosid-core/src/test/java/me/ahoo/cosid/segment/grouped/date/YearMonthDayGroupBySupplierTest.java +++ b/cosid-core/src/test/java/me/ahoo/cosid/segment/grouped/date/YearMonthDayGroupBySupplierTest.java @@ -17,7 +17,6 @@ import org.junit.jupiter.api.Test; import java.time.LocalDate; -import java.time.YearMonth; import java.time.format.DateTimeFormatter; import static org.junit.jupiter.api.Assertions.*; @@ -34,7 +33,7 @@ void get() { @Test void getYyMm() { - String pattern = "yyMMDD"; + String pattern = "yyMMdd"; YearMonthDayGroupBySupplier supplier = new YearMonthDayGroupBySupplier(pattern); GroupedKey groupedKey = supplier.get(); assertEquals(groupedKey.getKey(), LocalDate.now().format(DateTimeFormatter.ofPattern(pattern))); diff --git a/examples/cosid-example-redis/src/main/resources/application.yaml b/examples/cosid-example-redis/src/main/resources/application.yaml index 63591c300a..ee16b78a3f 100644 --- a/examples/cosid-example-redis/src/main/resources/application.yaml +++ b/examples/cosid-example-redis/src/main/resources/application.yaml @@ -88,6 +88,31 @@ cosid: group_year_biz: group: by: year + pattern: yyyy + converter: + type: to_string + to-string: + pad-start: true + char-size: 8 + prefix: BIZ- + group-prefix: + enabled: true + group_year_month_biz: + group: + by: year_month + pattern: yyyyMM + converter: + type: to_string + to-string: + pad-start: true + char-size: 8 + prefix: BIZ- + group-prefix: + enabled: true + group_year_month_day_biz: + group: + by: year_month_day + pattern: yyyyMMdd converter: type: to_string to-string: @@ -96,7 +121,6 @@ cosid: prefix: BIZ- group-prefix: enabled: true - logging: level: me.ahoo.cosid: debug