You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.*/packageorg.apache.wayang.api.serialization.customserializersimportcom.fasterxml.jackson.core.JsonParserimportcom.fasterxml.jackson.databind.{DeserializationContext, JsonDeserializer}
importorg.apache.wayang.core.api.exception.WayangExceptionimportorg.apache.wayang.core.platform.Platformimportorg.apache.wayang.java.Javaimportorg.apache.wayang.postgres.Postgresimportorg.apache.wayang.spark.SparkclassPlatformDeserializerextendsJsonDeserializer[Platform]{
overridedefdeserialize(p: JsonParser, ctxt: DeserializationContext):Platform= {
valclassName= p.getValueAsString
// TODO: Add all platformsif (className ==Java.platform().getClass.getName) {
Java.platform()
} elseif (className ==Spark.platform().getClass.getName) {
Spark.platform()
} elseif (className ==Postgres.platform().getClass.getName) {
Postgres.platform()
} else {
thrownewWayangException(s"Can't deserialize platform: $className")
}
}
}
2fee24565a06bebe51eb9120993bfd960800728f
The text was updated successfully, but these errors were encountered:
Add all platforms
incubator-wayang/wayang-api/wayang-api-scala-java/src/main/scala/org/apache/wayang/api/serialization/customserializers/PlatformDeserializer.scala
Line 35 in 11682e6
2fee24565a06bebe51eb9120993bfd960800728f
The text was updated successfully, but these errors were encountered: