[
https://issues.apache.org/jira/browse/IGNITE-24564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Pereslegin updated IGNITE-24564:
--------------------------------------
Description:
In order to migrate to the new serialization protocol.
1. Need to introduce annotation class
{code:java}
@Target(ElementType.TYPE)
@Retention(RUNTIME)
public @interface CatalogSerializer {
/**
* Returns serializer version.
*/
short version();
/**
* Returns the type of the object being serialized.
*/
MarshallableEntryType type();
/**
* The product version starting from which the serializer is used.
*/
String since();
}
{code}
2. Annotate all existing serializers with @CatalogSerializer(version=1,
since="3.0.0", type=<type>)
3. Move all existing serializers to separate package (this will required make
missing methods to access private fields of descriptors).
4. Implement serializer registry building.
{code:Java}
interface CatalogEntrySerializerProvider {
// New method is used to obtain serializer of specific version.
CatalogObjectSerializer<MarshallableEntry> get(int version, int typeId);
// Used to obtain the newest serializer version.
int latestSerializerVersion(int typeId);
}
{code}
During initialization registry must scan serializer folder and build registry
of available serializers.
was:
In order to migrate to the new serialization protocol.
1. Need to introduce annotation class
{code:java}
@Target(ElementType.TYPE)
@Retention(RUNTIME)
public @interface CatalogSerializer {
/**
* Returns serializer version.
*/
short version();
/**
* Returns the type of the object being serialized.
*/
MarshallableEntryType type();
/**
* The product version starting from which the serializer is used.
*/
String since();
}
{code}
2. Annotate all existing serializers with @CatalogSerializer(version=1,
since="3.0.0", type=<type>)
3. Move all existing serializers to separate package (this will required make
missing methods to access private fields of descriptors).
4. Implement serializer registry building.
{code:Java}
interface CatalogEntrySerializerProvider {
// New method is used to obtain serializer of specific version.
CatalogObjectSerializer<MarshallableEntry> get(int version, int typeId);
// Used to obtain the newest serializer version.
int activeSerializerVersion(int typeId);
}
{code}
During initialization registry must scan serializer folder and build registry
of available serializers.
> Sql. Prepare catalog serializers to move to the new protocol version
> --------------------------------------------------------------------
>
> Key: IGNITE-24564
> URL: https://issues.apache.org/jira/browse/IGNITE-24564
> Project: Ignite
> Issue Type: Improvement
> Components: sql
> Reporter: Pavel Pereslegin
> Assignee: Pavel Pereslegin
> Priority: Major
> Labels: ignite-3
> Fix For: 3.1
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> In order to migrate to the new serialization protocol.
> 1. Need to introduce annotation class
> {code:java}
> @Target(ElementType.TYPE)
> @Retention(RUNTIME)
> public @interface CatalogSerializer {
> /**
> * Returns serializer version.
> */
> short version();
> /**
> * Returns the type of the object being serialized.
> */
> MarshallableEntryType type();
> /**
> * The product version starting from which the serializer is used.
> */
> String since();
> }
> {code}
> 2. Annotate all existing serializers with @CatalogSerializer(version=1,
> since="3.0.0", type=<type>)
> 3. Move all existing serializers to separate package (this will required make
> missing methods to access private fields of descriptors).
> 4. Implement serializer registry building.
> {code:Java}
> interface CatalogEntrySerializerProvider {
> // New method is used to obtain serializer of specific version.
> CatalogObjectSerializer<MarshallableEntry> get(int version, int typeId);
> // Used to obtain the newest serializer version.
> int latestSerializerVersion(int typeId);
> }
> {code}
> During initialization registry must scan serializer folder and build registry
> of available serializers.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)