Skip to content

Commit a4987e2

Browse files
bharath-techieDivyansh Sharma
authored andcommitted
Exposing default codec from codec service (opensearch-project#18698)
* Exposing default codec from codec service Signed-off-by: bharath-techie <[email protected]> * addressing comments Signed-off-by: bharath-techie <[email protected]> --------- Signed-off-by: bharath-techie <[email protected]>
1 parent 9cab991 commit a4987e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

server/src/main/java/org/opensearch/index/codec/CodecService.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ public CodecService(@Nullable MapperService mapperService, IndexSettings indexSe
9393
this.codecs = codecs.immutableMap();
9494
}
9595

96+
/**
97+
* Returns default codec
98+
*/
99+
public final Codec defaultCodec() {
100+
return codecs.get(DEFAULT_CODEC);
101+
}
102+
96103
public Codec codec(String name) {
97104
Codec codec = codecs.get(name);
98105
if (codec == null) {

0 commit comments

Comments
 (0)