flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #3925: [FLINK-6600] Add key serializer config snapshot to...
Date Thu, 18 May 2017 14:39:50 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3925#discussion_r117266306
  
    --- Diff: flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java
---
    @@ -1116,13 +1116,27 @@ private void restoreKeyGroupsInStateHandle()
     		 * @throws ClassNotFoundException
     		 * @throws RocksDBException
     		 */
    +		@SuppressWarnings("unchecked")
     		private void restoreKVStateMetaData() throws IOException, ClassNotFoundException, RocksDBException
{
     
     			KeyedBackendSerializationProxy serializationProxy =
     					new KeyedBackendSerializationProxy(rocksDBKeyedStateBackend.userCodeClassLoader);
     
     			serializationProxy.read(currentStateHandleInView);
     
    +			// check for key serializer compatibility; this also reconfigures the
    +			// key serializer to be compatible, if it is required and is possible
    +			if (StateMigrationUtil.resolveCompatibilityResult(
    +					serializationProxy.getKeySerializer(),
    +					TypeSerializerSerializationProxy.ClassNotFoundDummyTypeSerializer.class,
    +					serializationProxy.getKeySerializerConfigSnapshot(),
    +					(TypeSerializer) rocksDBKeyedStateBackend.keySerializer)
    +				.isRequiresMigration()) {
    --- End diff --
    
    Maybe as an idea for the future: If I'm not mistaken, then is the KeySerializerConfigSnapshot
constant across all `KeyedStateHandles`. Thus, having something like a broadcast state for
state backend meta data would be cool. Then we don't have to store redundant information.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message