diff --git a/.sbtopts b/.sbtopts new file mode 100644 index 00000000..d56f51e9 --- /dev/null +++ b/.sbtopts @@ -0,0 +1 @@ +-J-Xmx4g diff --git a/build.sbt b/build.sbt new file mode 100644 index 00000000..ae6ebf89 --- /dev/null +++ b/build.sbt @@ -0,0 +1,62 @@ + +import optimus.BuildTool +import optimus.Dependencies +import optimus.DHT +import optimus.GSF +import optimus.Platform +import optimus.Silverking +import optimus.Stratosphere + +ThisBuild / scalaVersion := Dependencies.scala2Version + +val buildToolApp = BuildTool.app +val buildToolRest = BuildTool.rest +val buildToolRunConf = BuildTool.runConf +val builtToolFormat = BuildTool.format +val buildToolCore = BuildTool.core + +val dhtClient3 = DHT.client3 +val dhtDigest = DHT.digest +val dhtCommon3 = DHT.common3 + +val gsfBreadcrumbs = GSF.breadcrumbs + +val platform = Platform.platform +val platformGitUtils = Platform.gitUtils +val platformBitBucketUtils = Platform.bitBucketUtils +val platformRestUtils = Platform.restUtils +val platformPriqlDalPersistence = Platform.priqlDalPersistence +val platformPriqlDal = Platform.priqlDal +val platformPriql = Platform.priql +val platformDalClient = Platform.dalClient +val platformMSNetSSL = Platform.msNetSSL +val platformVersioningRuntime = Platform.versioningRuntime +val platformTls = Platform.tls +val platformDalCore = Platform.dalCore +val platformDalEnvironment = Platform.dalEnvironment +val platformCollections = Platform.collections +val platformCore = Platform.core +val platformDebugger = Platform.debugger +val platformInstrumentation = Platform.instrumentation +val platformInputs = Platform.inputs +val platformCoreConfig = Platform.coreConfig +val platformEntityAgent = Platform.entityAgent +val platformEntityAgentExt = Platform.entityAgentExt +val platformEntityPlugin = Platform.entityPlugin +val platformEntityPluginJar = Platform.entityPluginJar +val platformBreadcrumbs = Platform.breadcrumbs +val platformMissing = Platform.missing +val platformUtils = Platform.utils +val platformScalaCompat = Platform.scalaCompat +val platformStagingPlugin = Platform.stagingPlugin +val platformStagingPluingJar = Platform.stagingPluginJar +val platformCoreMacro = Platform.coreMacro +val platformAlarms = Platform.alarms +val platformAnnotations = Platform.annotations +val platformSprayJson = Platform.sprayJson + +val silverking = Silverking.silverking +val silverkingUtils = Silverking.utils + +val stratosphereBootstrap = Stratosphere.bootstrap +val stratosphereCommon = Stratosphere.common diff --git a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/builders/postbuilders/installer/component/TestplanInstaller.scala b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/builders/postbuilders/installer/component/TestplanInstaller.scala index e05ffb67..31fcc064 100644 --- a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/builders/postbuilders/installer/component/TestplanInstaller.scala +++ b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/builders/postbuilders/installer/component/TestplanInstaller.scala @@ -33,7 +33,7 @@ import optimus.buildtool.utils.AssetUtils import optimus.scalacompat.collection._ import optimus.platform.util.Log import optimus.platform._ -import optimus.tools.testplan.model.TestplanField.TestCases +// import optimus.tools.testplan.model.TestplanField.TestCases import scala.jdk.CollectionConverters._ import scala.collection.immutable.Seq @@ -409,7 +409,7 @@ final class TestplanInstaller( testModulesFiles ++ testplanFile } - private def validateUniqueTestCaseNames(testplan: TestPlan): Unit = { + private def validateUniqueTestCaseNames(testplan: TestPlan): Unit = ??? /* { val testCaseColumn = testplan.headers.indexOf(TestCases.toString) val duplicateTestNames = testplan.values .groupBy(t => t(testCaseColumn)) @@ -424,6 +424,6 @@ final class TestplanInstaller( |Please make sure the test group names in the .testplan.json file are not the same.""".stripMargin throw new IllegalStateException(msg) } - } + } */ } diff --git a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/dht/DHTStore.scala b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/dht/DHTStore.scala index fdb4ff20..71705c9a 100644 --- a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/dht/DHTStore.scala +++ b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/dht/DHTStore.scala @@ -39,7 +39,7 @@ import optimus.buildtool.utils.CompilePathBuilder import optimus.buildtool.utils.Utils import optimus.buildtool.utils.Utils.durationStringNanos import optimus.dht.client.api.DHTClient -import optimus.dht.client.api.DHTClientBuilder +// import optimus.dht.client.api.DHTClientBuilder import optimus.dht.client.api.kv.KVClient import optimus.dht.client.api.kv.KVKey import optimus.dht.client.api.kv.KVLargeEntry @@ -94,15 +94,15 @@ object DHTStore extends Log { case _ => ClusterType.Custom } - def ZkBuilder(zkPath: String): DHTClientBuilder = - DHTClientBuilder.create + def ZkBuilder(zkPath: String): Nothing = ??? + /* DHTClientBuilder.create .zkPath(zkPath) .kerberos(true) .replicationStrategy(new SimpleReplicationStrategy(2)) .readTimeout(Duration.ofSeconds(System.getProperty("obt.dht.readTimeoutSeconds", "60").toLong)) .defaultOperationTimeout( Duration.ofSeconds(System.getProperty("obt.dht.defaultOperationTimeoutSeconds", "60").toLong)) - .ioThreads(System.getProperty("obt.dht.ioThreads", "12").toInt) + .ioThreads(System.getProperty("obt.dht.ioThreads", "12").toInt) */ private[cache] sealed trait StoredKey { val id: ScopeId @@ -154,7 +154,7 @@ class DHTStore( clusterType: ClusterType = ClusterType.QA, artifactVersion: String, val cacheMode: CacheMode, - clientBuilder: DHTClientBuilder) + /* clientBuilder: DHTClientBuilder */) extends ArtifactStoreBase with RemoteAssetStore with MultiWriteableArtifactStore @@ -162,7 +162,7 @@ class DHTStore( import DHTStore._ override protected def cacheType: String = s"DHT $clusterType" override protected def stat: ObtStats.Cache = ObtStats.DHT - private val client: DHTClient = clientBuilder.build() + private val client: DHTClient = ??? /* clientBuilder.build() */ override def toString: String = client.getServerConnectionsManager.toString private val lvClient = { diff --git a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/dht/ObtDhtCacheAdminApp.scala b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/dht/ObtDhtCacheAdminApp.scala index 7252310e..4cf9f61b 100644 --- a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/dht/ObtDhtCacheAdminApp.scala +++ b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/dht/ObtDhtCacheAdminApp.scala @@ -23,10 +23,10 @@ import optimus.buildtool.files.Directory import optimus.buildtool.files.Pathed import optimus.buildtool.utils.CompilePathBuilder import optimus.dht.client.internal.registry.ZookeeperRegistryObserver -import optimus.dht.common.util.registry.ZKUtils +/* import optimus.dht.common.util.registry.ZKUtils import optimus.dht.common.util.registry.ZkConfig import optimus.dht.server.api.registry.RegistryConsts -import optimus.dht.server.management.DHTManagementInterface +import optimus.dht.server.management.DHTManagementInterface */ import optimus.platform._ import optimus.platform.util.ArgHandlers.StringOptionOptionHandler import optimus.platform.util.Log @@ -155,7 +155,7 @@ object ObtDhtCacheAdminApp extends OptimusApp[ObtDhtCacheAdminAppCmdLine] with L DHTStore.zkClusterType(zkPath), artifactVersion, cacheMode = CacheMode.ReadWrite, // admin needs to be able to read and delete - DHTStore.ZkBuilder(zkPath) + /* DHTStore.ZkBuilder(zkPath) */ ) @entersGraph override def run(): Unit = { @@ -181,7 +181,7 @@ object ObtDhtCacheAdminApp extends OptimusApp[ObtDhtCacheAdminAppCmdLine] with L DHTStore.zkClusterType(zkPath), artifactVersion, cacheMode = CacheMode.ReadOnly, - DHTStore.ZkBuilder(zkPath)) + /* DHTStore.ZkBuilder(zkPath) */) val maybeResult = getArtifactKey match { case artifactKey: ArtifactKey => @@ -211,7 +211,7 @@ object ObtDhtCacheAdminApp extends OptimusApp[ObtDhtCacheAdminAppCmdLine] with L private def getAllKeys: Seq[StoredKey] = { - val keys: Seq[StoredKey] = jmxUrls.flatMap { jmxUrl => + val keys: Seq[StoredKey] = ??? /* jmxUrls.flatMap { jmxUrl => withDhtManagementBean(jmxUrl) { bean => bean.returnKeyspaceKeys(keyspaceName, "", false).toSeq.map { case Array(maybeKey, _, _) => Option(maybeKey).flatMap { @@ -223,7 +223,7 @@ object ObtDhtCacheAdminApp extends OptimusApp[ObtDhtCacheAdminAppCmdLine] with L } } } - }.flatten + }.flatten */ log.info(s"found ${keys.size} keys in total") if (keys.nonEmpty) { @@ -260,7 +260,7 @@ object ObtDhtCacheAdminApp extends OptimusApp[ObtDhtCacheAdminAppCmdLine] with L keys } - private def getJmxUrls: Seq[String] = { + private def getJmxUrls: Seq[String] = ??? /* { val zkConfig = ZkConfig.parse(zkPath, true) val curatorFramework = ZKUtils.getFrameworkBuilder(zkConfig).build curatorFramework.start() @@ -275,11 +275,11 @@ object ObtDhtCacheAdminApp extends OptimusApp[ObtDhtCacheAdminAppCmdLine] with L Option(zkaData.get(RegistryConsts.JMX_URL_KEY).asInstanceOf[String]) } - } + } */ private val dhtManagementObjectName = "com.dht:type=DHTManagement" - private def withDhtManagementBean[T](jmxUrlStr: String)(f: DHTManagementInterface => T): T = { + /* private def withDhtManagementBean[T](jmxUrlStr: String)(f: DHTManagementInterface => T): T = { val conn = Try { log.info(s"Connecting to DHT jmx interface with url: $jmxUrlStr") val jmxUrl = new JMXServiceURL(jmxUrlStr) @@ -302,7 +302,7 @@ object ObtDhtCacheAdminApp extends OptimusApp[ObtDhtCacheAdminAppCmdLine] with L } finally { conn.close() } - } + } */ } diff --git a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/remote/RemoteCacheProvider.scala b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/remote/RemoteCacheProvider.scala index cfe39a14..c2c352d1 100644 --- a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/remote/RemoteCacheProvider.scala +++ b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/remote/RemoteCacheProvider.scala @@ -26,7 +26,7 @@ import optimus.buildtool.cache.dht.LocalDhtServer import optimus.buildtool.cache.silverking.SilverKingConfig import optimus.buildtool.cache.silverking.SilverKingStore import optimus.buildtool.utils.CompilePathBuilder -import optimus.dht.client.api.DHTClientBuilder +// import optimus.dht.client.api.DHTClientBuilder import optimus.dht.client.api.registry.StaticRegistryObserver import optimus.platform._ import optimus.stratosphere.config.StratoWorkspace @@ -91,7 +91,7 @@ import optimus.stratosphere.config.StratoWorkspace val forcedReadThroughStores: Set[DHTStore] = cmdLine.crossRegionReadThroughDHTLocations.apar .withFilter(!_.equalsIgnoreCase(NoneArg)) .map { location => - new DHTStore(pathBuilder, DHTStore.zkClusterType(location), version, cacheMode, DHTStore.ZkBuilder(location)) + new DHTStore(pathBuilder, DHTStore.zkClusterType(location), version, cacheMode/* , DHTStore.ZkBuilder(location) */) } .toSet if (forcedReadThroughStores.nonEmpty) { @@ -111,7 +111,7 @@ import optimus.stratosphere.config.StratoWorkspace version: String = defaultVersion, silverKing: String = cmdLine.silverKing, offlinePuts: Boolean = true, - ): RemoteArtifactCache = { + ): RemoteArtifactCache = ??? /* { val store = (silverKing, cmdLine.dhtRemoteStore) match { case (NoneArg, NoneArg) => @@ -161,7 +161,7 @@ import optimus.stratosphere.config.StratoWorkspace ) } getCrossRegionPopulatingCache(store, cacheMode, version) - } + } */ } diff --git a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/silverking/SilverKingConfig.scala b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/silverking/SilverKingConfig.scala index c65f16a7..b649ef0f 100644 --- a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/silverking/SilverKingConfig.scala +++ b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/cache/silverking/SilverKingConfig.scala @@ -119,8 +119,8 @@ object SilverKingConfig { s"""(${DalServicesSilverKingLookup.UriScheme}://.+)""".r // eg. skClient://obtqa/global/obtqa_obt or skClient://obtdev/global/obtdev_obt def apply(cfg: String): SilverKingConfig = cfg match { - case ZkFormat(envStr, cluster, dht, version) => ZookeeperLookup(ZkEnv.valueOf(envStr), cluster, dht, version) - case ShortZkFormat(envStr, cluster, dht) => ZookeeperLookup(ZkEnv.valueOf(envStr), cluster, dht) + case ZkFormat(envStr, cluster, dht, version) => ZookeeperLookup(??? /* ZkEnv.valueOf(envStr) */, cluster, dht, version) + case ShortZkFormat(envStr, cluster, dht) => ZookeeperLookup(??? /* ZkEnv.valueOf(envStr) */, cluster, dht) case FileFormat(serverIP, path, serverName) => FileConfig(new File(path), serverName, serverIP) case uriStr @ ExplicitFormat(_*) => Explicit.fromUri(new URI(uriStr)) case LookupWithHostFormat(uriStr, host, port) => diff --git a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/ZincProfiler.scala b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/ZincProfiler.scala index fec57a4d..29e7009a 100644 --- a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/ZincProfiler.scala +++ b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/ZincProfiler.scala @@ -28,7 +28,7 @@ import optimus.buildtool.utils.HashedContent import optimus.buildtool.utils.Utils import optimus.buildtool.utils.stats.SourceCodeStats import optimus.platform._ -import optimus.tools.scalacplugins.entity.ThresholdProfiler +// import optimus.tools.scalacplugins.entity.ThresholdProfiler import sbt.internal.inc.MiniSetupUtil import sbt.internal.prof.Zprof import sbt.internal.prof.Zprof.ZincRun @@ -316,13 +316,15 @@ class ZincProfiler(scopeId: ScopeId, traceType: MessageTrace, compilerInputs: Co * clearly see them. */ private def republishSlowCompilationWarnings(messages: Seq[CompilationMessage]): Seq[Double] = { - messages.collect { + //TODO + /* messages.collect { case CompilationMessage(pos, msg @ ThresholdProfiler.MessageString(_, durationInSecs), _, _, _, _, _) => val posStr = pos.map(p => s"${p.filepath.split("/").last}:${p.startLine}").getOrElse("?:?") val str = s"$prefix$msg ($posStr)" log.warn(s"$prefix$msg") ObtTrace.warn(str) durationInSecs - } + } */ + Seq.empty } } diff --git a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/setup/ClassAnalysisStore.scala b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/setup/ClassAnalysisStore.scala index 99b632d8..f1e667a3 100644 --- a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/setup/ClassAnalysisStore.scala +++ b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/setup/ClassAnalysisStore.scala @@ -75,7 +75,7 @@ class ClassAnalysisStore( ) ) private val store = - FileAnalysisStore.binary(analysisJar.path.toFile, mappers, tmpDir = jars.analysisJar.tempPath.parent.path.toFile) + FileAnalysisStore.binary(analysisJar.path.toFile, mappers /*, tmpDir = jars.analysisJar.tempPath.parent.path.toFile */) override def get: Optional[AnalysisContents] = store.get override def unsafeGet: AnalysisContents = store.unsafeGet diff --git a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/setup/SignatureAnalysisStore.scala b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/setup/SignatureAnalysisStore.scala index d8f249ec..f7126e64 100644 --- a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/setup/SignatureAnalysisStore.scala +++ b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/compilers/zinc/setup/SignatureAnalysisStore.scala @@ -39,7 +39,7 @@ class SignatureAnalysisStore( private val store = FileAnalysisStore.binary( signatureAnalysisJar.path.toFile, signatureMappers, - tmpDir = signatureAnalysisJar.parent.path.toFile) + /* tmpDir = signatureAnalysisJar.parent.path.toFile */) // this store is only used for writing - signature analysis for upstreams is loaded via ZincEntryLookup override def get(): Optional[AnalysisContents] = diff --git a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/utils/GitLog.scala b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/utils/GitLog.scala index 3edeb1b1..85b17fcb 100644 --- a/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/utils/GitLog.scala +++ b/optimus/buildtool/projects/app/src/main/scala/optimus/buildtool/utils/GitLog.scala @@ -267,7 +267,7 @@ object GitLog { } else log.info(s"Skipping tag request for $tagName as only forward tagging are allowed (HEAD is $currentHead)") } - @async @impure private def isMovingForward(tagName: String): Boolean = { + @async @impure private def isMovingForward(tagName: String): Boolean = ??? /* { // git ls-remote --tags val currentRemoteHash: Option[String] = utils.git .lsRemote() @@ -284,5 +284,5 @@ object GitLog { log.info(s"Tag $tagName is currently pointing to $remoteHash") utils.repo.hasObject(ObjectId.fromString(remoteHash)) } - } + } */ } diff --git a/optimus/dht/projects/client3/src/main/java/optimus/dht/client/api/DHTClientBuilder.java b/optimus/dht/projects/client3/src/main/java/optimus/dht/client/api/DHTClientBuilder.java index 6d17fde2..c1247cba 100644 --- a/optimus/dht/projects/client3/src/main/java/optimus/dht/client/api/DHTClientBuilder.java +++ b/optimus/dht/projects/client3/src/main/java/optimus/dht/client/api/DHTClientBuilder.java @@ -8,7 +8,7 @@ * 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. - */ + package optimus.dht.client.api; import java.io.FileInputStream; @@ -87,17 +87,17 @@ public class DHTClientBuilder { private static final Logger logger = LoggerFactory.getLogger(DHTClientBuilder.class); - /** Holder for settings. */ + /** Holder for settings. protected class Setting { - /** Property name */ + /** Property name final String name; - /** Property value (if set) */ + /** Property value (if set) T value; - /** Optional property default value supplier */ + /** Optional property default value supplier final Supplier defaultValueSupplier; - /** Cached default value */ + /** Cached default value T defaultValue; - /** List of properties that conflict with this setting */ + /** List of properties that conflict with this setting final List> conflictsWith; public Setting(String name, Supplier defaultValueSupplier, Setting... conflictsWith) { @@ -161,7 +161,7 @@ public boolean isSet() { * Creates a new instance of a builder. * * @return a new instance of a builder - */ + public static DHTClientBuilder create() { return new DHTClientBuilder(); } @@ -693,3 +693,4 @@ protected RegistryObserver registryObserver() { } } } +*/ diff --git a/optimus/dht/projects/common3/src/main/java/optimus/dht/common/internal/transport/KerberosAuthenticatedConnection.java b/optimus/dht/projects/common3/src/main/java/optimus/dht/common/internal/transport/KerberosAuthenticatedConnection.java index d9dd9963..d6db7a83 100644 --- a/optimus/dht/projects/common3/src/main/java/optimus/dht/common/internal/transport/KerberosAuthenticatedConnection.java +++ b/optimus/dht/projects/common3/src/main/java/optimus/dht/common/internal/transport/KerberosAuthenticatedConnection.java @@ -9,6 +9,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* package optimus.dht.common.internal.transport; import optimus.dht.common.util.StringTool; @@ -43,3 +44,4 @@ public String toString() { + "]"; } } +*/ diff --git a/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZKUtils.java b/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZKUtils.java index dee83cb7..bdf5a0de 100644 --- a/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZKUtils.java +++ b/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZKUtils.java @@ -8,7 +8,7 @@ * 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. - */ + package optimus.dht.common.util.registry; import com.ms.infra.zookeeper.utils.ConnectionInfo; @@ -45,3 +45,4 @@ public static CuratorFrameworkFactory.Builder getFrameworkBuilder(ZkConfig confi config, connectionInfo.connectString(), connectionInfo.proid())); } } +*/ \ No newline at end of file diff --git a/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZkClientUtilsZookeeperFactory.java b/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZkClientUtilsZookeeperFactory.java index c3b17c9e..98c97cfc 100644 --- a/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZkClientUtilsZookeeperFactory.java +++ b/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZkClientUtilsZookeeperFactory.java @@ -1,4 +1,4 @@ -/* +/* /* * Morgan Stanley makes this available to you under the Apache License, Version 2.0 (the "License"). * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -8,7 +8,7 @@ * 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. - */ + package optimus.dht.common.util.registry; import java.net.UnknownHostException; @@ -53,7 +53,7 @@ public ZooKeeper newZooKeeper( * servers. Sometimes, due to AFS transient failures, that file cannot be read and a YAMLException is * thrown. Since it is impossible to check whether starting the curator was successful, this case needs to be * handled explicitly. - */ + // here the connectString is intentionally a rootnode without // servers prepended @@ -88,10 +88,11 @@ public ZooKeeper newZooKeeper( * * Catching this here means that we won't detect legitimately bad hostnames either, but since those are * provided by sam/zookeeper we assume they are correct. - */ + KeeperException ex = new KeeperException.ConnectionLossException(); ex.initCause(e); throw ex; } } } + */ \ No newline at end of file diff --git a/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZkConfig.java b/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZkConfig.java index c0e8a4aa..cea098f2 100644 --- a/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZkConfig.java +++ b/optimus/dht/projects/common3/src/main/java/optimus/dht/common/util/registry/ZkConfig.java @@ -8,7 +8,7 @@ * 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. - */ + package optimus.dht.common.util.registry; import java.util.List; @@ -122,3 +122,4 @@ public String paths(String... paths) { return path; } } +*/ \ No newline at end of file diff --git a/optimus/platform/projects/alarms/src/main/scala/optimus/tools/scalacplugins/entity/PluginData.scala b/optimus/platform/projects/alarms/src/main/scala/optimus/tools/scalacplugins/entity/PluginData.scala index a0595d78..fe2674f8 100644 --- a/optimus/platform/projects/alarms/src/main/scala/optimus/tools/scalacplugins/entity/PluginData.scala +++ b/optimus/platform/projects/alarms/src/main/scala/optimus/tools/scalacplugins/entity/PluginData.scala @@ -66,10 +66,10 @@ class PluginData(private val global: Global) { def configureBasic(): Unit = { global.perRunCaches.recordCache(onCompileFinished) // always install the threshold profiler since it's lightweight and we always want to know about very slow compilation - val thresholdProfiler = + /* val thresholdProfiler = new ThresholdProfiler(global.reporter.echo(_, _), thresholdNs = slowCompilationWarningThresholdMs * 1000000) // keep the existing profiler (if any) so that we don't prevent -Yprofile from working - global.currentRun.profiler = new DelegatingProfiler(Seq(global.currentRun.profiler, thresholdProfiler)) + global.currentRun.profiler = new DelegatingProfiler(Seq(global.currentRun.profiler, thresholdProfiler)) */ } // warns if obtWarnConf is set diff --git a/optimus/platform/projects/alarms/src/main/scala/optimus/tools/scalacplugins/entity/Profiler.scala b/optimus/platform/projects/alarms/src/main/scala/optimus/tools/scalacplugins/entity/Profiler.scala index 17902837..07d35577 100644 --- a/optimus/platform/projects/alarms/src/main/scala/optimus/tools/scalacplugins/entity/Profiler.scala +++ b/optimus/platform/projects/alarms/src/main/scala/optimus/tools/scalacplugins/entity/Profiler.scala @@ -9,7 +9,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package optimus.tools.scalacplugins.entity +/* package optimus.tools.scalacplugins.entity import java.util.regex.Pattern import scala.reflect.internal.util.Position @@ -112,4 +112,4 @@ object ThresholdProfiler { } else None } } -} +} */ diff --git a/optimus/platform/projects/breadcrumbs/src/main/scala/optimus/breadcrumbs/crumbs/Crumbs.scala b/optimus/platform/projects/breadcrumbs/src/main/scala/optimus/breadcrumbs/crumbs/Crumbs.scala index e4f13e3c..5f4d8add 100644 --- a/optimus/platform/projects/breadcrumbs/src/main/scala/optimus/breadcrumbs/crumbs/Crumbs.scala +++ b/optimus/platform/projects/breadcrumbs/src/main/scala/optimus/breadcrumbs/crumbs/Crumbs.scala @@ -507,7 +507,7 @@ object Crumb { private def newLocator(): String = ChainedID.root.base + "L" + count.incrementAndGet() private val log = LoggerFactory.getLogger("Crumbs") - import net.iharder.base64.Base64 + import net.iharder.Base64 sealed trait CrumbFlag object CrumbFlag { diff --git a/optimus/platform/projects/breadcrumbs/src/main/scala/optimus/breadcrumbs/crumbs/Properties.scala b/optimus/platform/projects/breadcrumbs/src/main/scala/optimus/breadcrumbs/crumbs/Properties.scala index ed4b1534..459d5c7c 100644 --- a/optimus/platform/projects/breadcrumbs/src/main/scala/optimus/breadcrumbs/crumbs/Properties.scala +++ b/optimus/platform/projects/breadcrumbs/src/main/scala/optimus/breadcrumbs/crumbs/Properties.scala @@ -527,6 +527,7 @@ object Properties extends KnownProperties { val crumbType = prop[String] val proid = prop[String] val node = prop[String] + val nodeStack = prop[String] val logFile = prop[String] val distedTo = prop[String] val distedFrom = prop[String] @@ -547,6 +548,7 @@ object Properties extends KnownProperties { val stackTrace = prop[Seq[String]] val remoteException = prop[Throwable] val batchSize = propI + val batchId = propI val pricingDate = prop[String] val dalReqUuid = prop[String] val tStarted = prop[ZonedDateTime] @@ -557,6 +559,7 @@ object Properties extends KnownProperties { val debug = prop[String] val priority = prop[String] val tasksExecutedOnEngine = propL + val taskId = prop[String] val logLevel = prop[String] val logMsg = prop[String] diff --git a/optimus/platform/projects/core/src/main/scala/msjava/MSUuidGenerator.scala b/optimus/platform/projects/core/src/main/scala/msjava/MSUuidGenerator.scala index 83bd188a..58d020f3 100644 --- a/optimus/platform/projects/core/src/main/scala/msjava/MSUuidGenerator.scala +++ b/optimus/platform/projects/core/src/main/scala/msjava/MSUuidGenerator.scala @@ -9,6 +9,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* package msjava import java.security.MessageDigest @@ -48,3 +49,4 @@ object MSUuidGenerator { new MSUuid(raw, true) } } +*/ diff --git a/optimus/platform/projects/core/src/main/scala/optimus/graph/diagnostics/ap/JFR2Speedscope.scala b/optimus/platform/projects/core/src/main/scala/optimus/graph/diagnostics/ap/JFR2Speedscope.scala index 4496c405..90ea1562 100644 --- a/optimus/platform/projects/core/src/main/scala/optimus/graph/diagnostics/ap/JFR2Speedscope.scala +++ b/optimus/platform/projects/core/src/main/scala/optimus/graph/diagnostics/ap/JFR2Speedscope.scala @@ -36,7 +36,7 @@ package optimus.graph.diagnostics.ap import java.nio.charset.StandardCharsets import one.jfr.Dictionary import one.jfr.JfrReader -import one.jfr.event.CustomSample +// import one.jfr.event.CustomSample import one.jfr.event.Event import optimus.platform.util.Log import org.kohsuke.args4j.CmdLineException @@ -189,7 +189,7 @@ object JFR2Speedscope extends App with Log { trace({ idx -= 1; idx }) = speedscope.methodIndex(methodName + FRAME_SUFFIX(types(i))) } val eventName = event match { - case c: CustomSample => c.info + // case c: CustomSample => c.info case _ => event.getClass.getSimpleName } speedscope.addTrace(eventName, value, trace) diff --git a/optimus/platform/projects/core/src/main/scala/optimus/platform/storable/References.scala b/optimus/platform/projects/core/src/main/scala/optimus/platform/storable/References.scala index 5e7b4a53..3c0b0d51 100644 --- a/optimus/platform/projects/core/src/main/scala/optimus/platform/storable/References.scala +++ b/optimus/platform/projects/core/src/main/scala/optimus/platform/storable/References.scala @@ -18,7 +18,7 @@ import java.util.concurrent.atomic.AtomicInteger import com.eaio.uuid.UUIDGen import com.google.common.hash.Hashing import com.google.common.primitives.Longs -import net.iharder.base64.Base64 +import net.iharder.Base64 import optimus.exceptions.RTExceptionTrait import optimus.graph.DiagnosticSettings diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/AbstractEntityResolver.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/AbstractEntityResolver.scala index 69985c21..3d683f98 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/AbstractEntityResolver.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/AbstractEntityResolver.scala @@ -31,7 +31,7 @@ import scala.jdk.CollectionConverters._ object HasLastWitnessedTime { private final case class CatchupId(uuid: MSUuid) { - override def toString: String = s"CatchupId(${uuid.asDCEString})" + override def toString: String = s"CatchupId($uuid)" } private[HasLastWitnessedTime] val log = getLogger[HasLastWitnessedTime] @@ -88,7 +88,7 @@ private[optimus] trait HasLastWitnessedTime { waitForMaxCatchup: Boolean, waitingTime: Int, witnessedTimeMap: ConcurrentHashMap[Partition, Instant]): Map[Partition, Instant] = { - val lsqtCatchupId = CatchupId(new MSUuid(true)) + val lsqtCatchupId = CatchupId(new MSUuid("")) var retried = 0 val frozenLastWitnessedTime: Map[Partition, Instant] = { // This is done to keep the change backward compatible diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/DSIClient.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/DSIClient.scala index e3aa9c98..8056c2d7 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/DSIClient.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/DSIClient.scala @@ -212,15 +212,15 @@ abstract class DSIClient( } } - @tailrec - private[this] def shouldRetry(t: Throwable, requestType: DSIRequestProto.Type): Boolean = { + // @tailrec + private[this] def shouldRetry(t: Throwable, requestType: DSIRequestProto.Type): Boolean = ??? /* { val isRetryable = t.isInstanceOf[DALRetryableActionException] || (requestType == DSIRequestProto.Type.WRITE && t.isInstanceOf[NonLeaderBrokerException]) || (requestType == DSIRequestProto.Type.READ_ONLY && t.isInstanceOf[DsiSpecificTransientError]) // has to be written like this so the recursive call is in tail position if (isRetryable) true else (t ne null) && shouldRetry(t.getCause, requestType) - } + } */ private[this] def checkErrorResults(results: Seq[Result]): Unit = { import optimus.platform.dsi.bitemporal.ErrorResult @@ -238,7 +238,7 @@ abstract class DSIClient( hasRetried: Boolean, attempts: Int, backoff: Long, - separateWriteBatcher: Boolean): Seq[Result] = { + separateWriteBatcher: Boolean): Seq[Result] = ??? /* { import DSIClient._ var response: Response = null @@ -335,7 +335,7 @@ abstract class DSIClient( } } - } + } */ @async private final def executeCommands( cmds: Seq[Command], @@ -404,12 +404,12 @@ abstract class DSIClient( } @async final override def executeLeadWriterCommands(cmds: Seq[LeadWriterCommand]): Seq[Result] = - executeCommands(cmds, DSIRequestProto.Type.WRITE) + ??? // executeCommands(cmds, DSIRequestProto.Type.WRITE) @async final override def executeServiceDiscoveryCommands(sds: Seq[ServiceDiscoveryCommand]): Seq[Result] = - executeCommands(sds, DSIRequestProto.Type.SERVICE_DISCOVERY) + ??? // executeCommands(sds, DSIRequestProto.Type.SERVICE_DISCOVERY) - @async final override def executeReadOnlyCommands(cmds: Seq[ReadOnlyCommand]): Seq[Result] = { + @async final override def executeReadOnlyCommands(cmds: Seq[ReadOnlyCommand]): Seq[Result] = ??? /* { // Use wall-clock time to estimate At.now, without actually calling DAL broker. val wallClock = patch.MilliInstant.now @@ -469,7 +469,7 @@ abstract class DSIClient( } ) } - } + } */ override def executePubSubRequest(request: PubSubClientRequest): PubSubClientResponse = { require(pubSubRetryManager.isDefined, s"pubSubRetryMgr is not defined, but received: $request") diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/MessageReceiver.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/MessageReceiver.scala index 213cb028..19f8c3f8 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/MessageReceiver.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/MessageReceiver.scala @@ -177,7 +177,7 @@ private[platform] abstract class MessageReceiver[Message <: DalServiceResponseMe now: Long, elapsed: => Long, batchContext: BatchContext, - response: VersioningResponseProto): Unit = { + response: VersioningResponseProto): Unit = ??? /* { val versioningResult = response.getResult batchContext.synchronized { @@ -193,7 +193,7 @@ private[platform] abstract class MessageReceiver[Message <: DalServiceResponseMe } completeBatch(requestUuid, seqId, now, elapsed, batchContext, isPartial = false, response = None) - } + } */ private def completeBatch( requestUuid: String, @@ -202,7 +202,7 @@ private[platform] abstract class MessageReceiver[Message <: DalServiceResponseMe elapsed: => Long, batchContext: BatchContext, isPartial: Boolean, - response: Option[DalServiceResponse]): Unit = { + response: Option[DalServiceResponse]): Unit = ??? /* { // lazy to avoid deserializing if not used lazy val timings = response.flatMap(_.timings).map(_.getEntriesList.asScala.map(entry => (entry.getKey, entry.getValue)).toMap) @@ -235,7 +235,7 @@ private[platform] abstract class MessageReceiver[Message <: DalServiceResponseMe log.info(s"${logPrefix(requestUuid, seqId)} batch completed in $elapsed ms, got ${batchContext.numResults} " + s"results, on connection $connectionDescription$timingLogs, env=${dalEnv}, appId=${client.clientCtx.appId}, zoneId=${client.clientCtx.zoneId}, remaining=$nRemaining") } - } + } */ // Entry-point when a message is received def messageCallback(response: Message): Unit = { diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcAsyncOperationListener.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcAsyncOperationListener.scala index 254a77ff..b5a16fdb 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcAsyncOperationListener.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcAsyncOperationListener.scala @@ -62,10 +62,10 @@ class PrcAsyncOperationListener( def expectingFurtherResults(): Boolean = keysCompleted < cmdIndexesByKey.size def getKeysCompleted: Int = keysCompleted - protected def parseResponse(v: Array[Byte]): PrcSingleKeyResponseProto = - PrcSingleKeyResponseProto.parseFrom(ProtoBufUtils.getCodedInputStream(v)) + protected def parseResponse(v: Array[Byte]): PrcSingleKeyResponseProto = ??? + /* PrcSingleKeyResponseProto.parseFrom(ProtoBufUtils.getCodedInputStream(v)) */ - private def onKeyFinished(retrieval: AsyncRetrieval[Array[Byte], Array[Byte]]): Unit = synchronized { + private def onKeyFinished(retrieval: AsyncRetrieval[Array[Byte], Array[Byte]]): Unit = ??? /* synchronized { val storedValues = retrieval.getLatestStoredValues.asScala checkUpdateExpected(storedValues.size) storedValues.foreach { case (key, storedValue) => @@ -95,7 +95,7 @@ class PrcAsyncOperationListener( PrcResponseWrapper(isPartial, res, cmdIndexesForKey) })) } - } + } */ override def asyncOperationUpdated(asyncOperation: AsyncOperation): Unit = { require( diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcMessageReceiver.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcMessageReceiver.scala index 2ded8eb3..9ceccd6d 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcMessageReceiver.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcMessageReceiver.scala @@ -40,7 +40,7 @@ final case class PrcResponseWrapper( responseProto: PrcSingleKeyResponseProto, commandIndices: Seq[Int]) extends DalServiceResponse { - override def results: Seq[ResultProto] = responseProto.getResultsList.asScala + override def results: Seq[ResultProto] = ??? // responseProto.getResultsList.asScala override def establishSessionResult: Option[Dsi.EstablishSessionResultProto] = None override def timings: Option[Dsi.TimingsProto] = None } diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcRedirectionCache.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcRedirectionCache.scala index 17dc945c..c368581b 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcRedirectionCache.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcRedirectionCache.scala @@ -18,7 +18,7 @@ import optimus.platform.dsi.bitemporal.DalPrcRedirectionResult import optimus.platform.dsi.bitemporal.QueryTemporalityType.QueryTemporalityType import optimus.platform.dsi.bitemporal.ReadOnlyCommandWithTemporality import optimus.platform.dsi.bitemporal.proto.Dsi.ResultProto -import optimus.platform.dsi.bitemporal.proto.Dsi.ResultProto.RedirectionReasonType +// import optimus.platform.dsi.bitemporal.proto.Dsi.ResultProto.RedirectionReasonType import optimus.platform.dsi.prc.cache.NonTemporalPrcKeyUserOpts object PrcRedirectionCache { @@ -41,7 +41,7 @@ class PrcRedirectionCache { rejectedQueryTypes.isEmpty && rejectedTempTypes.isEmpty && rejectedCommandTypes.isEmpty } - def update(userOpts: NonTemporalPrcKeyUserOpts, redirection: ResultProto): Unit = { + def update(userOpts: NonTemporalPrcKeyUserOpts, redirection: ResultProto): Unit = ??? /* { Option(redirection.getRedirectionReason).foreach { case RedirectionReasonType.UNSUPPORTED_COMMAND_TYPE => rejectedCommandTypes.add(userOpts.command.getClass) case RedirectionReasonType.UNSUPPORTED_QUERY_TYPE => @@ -59,7 +59,7 @@ class PrcRedirectionCache { RedirectionReasonType.PRC_READ_THROUGH_TIMEOUT_FAILURE => () } - } + } */ def get(userOpts: NonTemporalPrcKeyUserOpts): Option[DalPrcRedirectionResult] = { // Check order now is same as server side: QueryType -> QueryTemporalityType diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcRequestSender.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcRequestSender.scala index 89a81702..25e86a2b 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcRequestSender.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/client/prc/PrcRequestSender.scala @@ -13,7 +13,7 @@ package optimus.platform.dal.client.prc import com.ms.silverking.cloud.dht.GetOptions import com.ms.silverking.cloud.dht.client.AsyncOperation -import msjava.base.spring.lifecycle.BeanState +// import msjava.base.spring.lifecycle.BeanState import msjava.slf4jutils.scalalog.getLogger import optimus.dal.silverking.client.TraceableSkConverters import optimus.dsi.trace.TraceId @@ -124,8 +124,8 @@ class PrcRequestSender( // each message carries the PrcUserOptions and the seqId of the message override type MessageType = PrcRequestSender.MessageType - private[this] val state = new BeanState() - state.initializeIfNotInitialized() + // private[this] val state = new BeanState() + // state.initializeIfNotInitialized() // NB we do not initialize this when instantiating the class as it has the side-effect of creating a connection to // an SK proxy. Rather we create the instance in start() below @@ -134,9 +134,9 @@ class PrcRequestSender( override private[optimus] def start(): Unit = { try { - state.startIfNotRunning(() => { + /* state.startIfNotRunning(() => { namespaceProvider = mkNamespaceProvider() - }) + }) */ } catch { case NonFatal(ex) => log.error("Caught exception when creating PrcNamespaceProvider", ex) @@ -149,19 +149,19 @@ class PrcRequestSender( } override private[optimus] def shutdown(): Unit = { - state.destroyIfNotDestroyed(() => { + /* state.destroyIfNotDestroyed(() => { if (namespaceProvider ne null) { namespaceProvider.shutdown() // assertConnected relies on the null check namespaceProvider = null } redirectionCache.clear() - }) + }) */ } override private[optimus] def assertConnected(): Unit = synchronized { try { - state.throwIfNotRunning() + // state.throwIfNotRunning() require(namespaceProvider ne null, "Not connected to PRC.") // Can we get any info on whether the DHTSession connection is active? } catch { @@ -214,7 +214,7 @@ class PrcRequestSender( ) } - override private[optimus] def asyncSend(message: MessageType): Unit = { + override private[optimus] def asyncSend(message: MessageType): Unit = ??? /* { val (traceId, prcUserOpts, seqId, zoneId) = message val asyncOpBatchBldr = Map.newBuilder[Int, NonTemporalPrcKeyUserOpts] val asyncOpBatchListBldr = Seq.newBuilder[NonTemporalPrcKeyUserOpts] // keeping track of these separately for order @@ -273,7 +273,7 @@ class PrcRequestSender( asyncOp.addListener(listener) notifyAsyncRetrieveStarted(asyncOp, listener) } - } + } */ // test hooks protected def notifyAsyncRetrieveStarted(asyncOp: AsyncOperation, listener: PrcAsyncOperationListener): Unit = {} diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/messages/MessagesProtoClient.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/messages/MessagesProtoClient.scala index 8cc2a1b3..3498191a 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/messages/MessagesProtoClient.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/messages/MessagesProtoClient.scala @@ -37,8 +37,8 @@ import optimus.platform.dsi.bitemporal._ import optimus.platform.dsi.bitemporal.proto.CommandProtoSerialization import optimus.platform.dsi.bitemporal.proto.Dsi.DSIRequestProto import optimus.platform.dsi.bitemporal.proto.Dsi.DalResponseProto -import optimus.platform.dsi.bitemporal.proto.Envelope.DalProtocolStatus -import optimus.platform.dsi.bitemporal.proto.Envelope.DalRequestResponseEnvelope +/* import optimus.platform.dsi.bitemporal.proto.Envelope.DalProtocolStatus +import optimus.platform.dsi.bitemporal.proto.Envelope.DalRequestResponseEnvelope */ import optimus.platform.dsi.connection.DalProtocolVersion import optimus.platform.dsi.protobufutils.BatchContext.BatchContextImpl import optimus.platform.dsi.protobufutils._ @@ -139,7 +139,7 @@ object MessagesProtoClient extends CommandProtoSerialization { Some(RequestsStallInfo(StallPlugin.DAL, requests.length, requests)) } - override def adapt(v: NodeTask, ec: OGSchedulerContext): Boolean = { + override def adapt(v: NodeTask, ec: OGSchedulerContext): Boolean = ??? /* { v match { case node: PublishCommandScheduler.syncPublishCmd$node => try { @@ -171,7 +171,7 @@ object MessagesProtoClient extends CommandProtoSerialization { log.warn("Received unsupported task type " + v) false } - } + } */ } syncPublishCmd_info.setCacheable(false) @@ -258,7 +258,7 @@ class MessagesProtoClient( StreamsACLsCommandSuccessResult(cmd.streamAppId) } - private def getMsgCtx[T <: Command](cmd: T, p: Promise[Response] = Promise()) = { + private def getMsgCtx[T <: Command](cmd: T, p: Promise[Response] = Promise()) = ??? /* { val chainId = ChainedID.root BatchContextImpl( requestUuid = UUID.randomUUID().toString, @@ -269,7 +269,7 @@ class MessagesProtoClient( token = None, redirectionInfo = None ) - } + } */ private def sendStreamRequest(cmd: MessagesStreamCommand): Unit = { // As we are not batching these requests, seqId set is -1, seqI @@ -281,7 +281,7 @@ class MessagesProtoClient( private def sendSyncRequest[T <: Command](cmd: T): Unit = { val promise = Promise[Response]() val ctx = getMsgCtx(cmd, promise) - requestSender.sendBatch(ctx) + // requestSender.sendBatch(ctx) Await.result(promise.future, Duration(protoConfig.maxWaitingTimeDALRequest, TimeUnit.MILLISECONDS)) } @@ -326,8 +326,8 @@ class MessagesProtoClient( } } - def onMessage(message: MSNetMessage, dalProtocolOpt: Option[DalProtocolVersion]): Unit = - withRShutdownLock { + def onMessage(message: MSNetMessage, dalProtocolOpt: Option[DalProtocolVersion]): Unit = ??? + /* withRShutdownLock { if (isRunning) { val envelope = DalRequestResponseEnvelope.parseFrom(message.getBytes) val header = envelope.getHeader @@ -360,14 +360,14 @@ class MessagesProtoClient( } else handleStreamCmdResponse(response) } } - } + } */ private def handleBatchCmdResponse( response: DalResponseProto, sessEstRes: Option[EstablishSessionResult], ctx: BatchContext, seqId: Int - ): Unit = { + ): Unit = ??? /* { val dsiResponse = response.getDsiResponse val requestId = dsiResponse.getRequestUuid @@ -418,9 +418,9 @@ class MessagesProtoClient( ClientRequestTracker.markComplete(requestId) log.info(s"$requestId batch failed ") } - } + } */ - private def handleStreamCmdResponse(response: DalResponseProto): Unit = { + private def handleStreamCmdResponse(response: DalResponseProto): Unit = ??? /* { val dsiResponse = response.getDsiResponse val results: Seq[Result] = dsiResponse.getResultsList.asScala.map(fromProto) val filteredRes = results.flatMap { @@ -436,7 +436,7 @@ class MessagesProtoClient( None // ignore all other results } if (filteredRes.nonEmpty) listener.handleResults(filteredRes) - } + } */ // TODO (OPTIMUS-52127): Handle Connect Disconnect events in reactive side def onDisconnect(): Unit = { diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/pubsub/PubSubBatchContext.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/pubsub/PubSubBatchContext.scala index cb797d7a..f277bf78 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/pubsub/PubSubBatchContext.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dal/pubsub/PubSubBatchContext.scala @@ -41,7 +41,7 @@ class PubSubBatchContext( appNameTag: Option[String]) extends BatchContext { - override val requestType = DSIRequestProto.Type.PUBSUB + override val requestType: DSIRequestProto.Type = ??? // DSIRequestProto.Type.PUBSUB override val clientRequests: Vector[ClientRequest] = { val p: Promise[Response] = Promise() Vector(ClientRequest.read(CompletablePromise(p), chainedId, clientSessionContext, cmds, appNameTag = appNameTag)) diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/NamespaceSerializer.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/NamespaceSerializer.scala index 3948e052..6758a066 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/NamespaceSerializer.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/NamespaceSerializer.scala @@ -19,14 +19,14 @@ trait NamespaceSerialization extends ProtoSerialization { } object NamespaceSerializer extends ProtoSerializer[NamespaceWrapper, NamespaceProto] { - override def serialize(n: NamespaceWrapper): NamespaceProto = { + override def serialize(n: NamespaceWrapper): NamespaceProto = ??? /* { NamespaceProto.newBuilder .setFqPackageName(n.namespace) .setIncludesSubpackage(n.includesSubPackage) .build - } + } */ - override def deserialize(proto: NamespaceProto): NamespaceWrapper = { + override def deserialize(proto: NamespaceProto): NamespaceWrapper = ??? /* { NamespaceWrapper(proto.getFqPackageName, proto.getIncludesSubpackage) - } + } */ } diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalContextSerializer.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalContextSerializer.scala index 3433ef25..d8eda71a 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalContextSerializer.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalContextSerializer.scala @@ -35,7 +35,7 @@ object TemporalContextSerializer extends BasicProtoSerialization with TemporalSurfaceMatcherSerialization with ProtoSerializerTo[TemporalContext, TemporalContextProto] { - private[this] def helper(ts: TemporalSurface): TemporalContextProto = { + private[this] def helper(ts: TemporalSurface): TemporalContextProto = ??? /* { val isBranch: Boolean = !ts.isLeaf val isContext: Boolean = ts.isInstanceOf[TemporalContext] if (isBranch && ts.asInstanceOf[BranchTemporalSurface].scope != DataFreeTemporalSurfaceMatchers.allScope) @@ -62,11 +62,11 @@ object TemporalContextSerializer tcp.setTag( nonTickableTs.tag.getOrElse(throw new IllegalStateException(s"tag should be defined for $nonTickableTs"))) tcp.build - } + } */ // Use a helper function so that we can cast the TemporalContext to // TemporalSurface. - override def serialize(tc: TemporalContext): TemporalContextProto = { + override def serialize(tc: TemporalContext): TemporalContextProto = ??? /* { helper(tc.asInstanceOf[TemporalSurface]) - } + } */ } diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalSurfaceMatcherSerializer.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalSurfaceMatcherSerializer.scala index 331ec43d..0deb6642 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalSurfaceMatcherSerializer.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalSurfaceMatcherSerializer.scala @@ -29,7 +29,7 @@ object TemporalSurfaceMatcherSerializer with RelationElementSerialization with NamespaceSerialization with ProtoSerializerTo[TemporalSurfaceMatcher, TemporalSurfaceMatcherProto] { - private[this] def getTemporalSurfaceMatcherProtoForClass( + /* private[this] def getTemporalSurfaceMatcherProtoForClass( tsm: TemporalSurfaceMatcherT): TemporalSurfaceMatcherProto.Builder = { require(tsm.classes.nonEmpty, "Must have at least 1 class.") require(tsm.namespaceWrappers.isEmpty, "Must have empty namespaceWrappers.") @@ -40,9 +40,9 @@ object TemporalSurfaceMatcherSerializer .addAllFqns(tsm.classes.map { c: Class[_] => FqnProto.newBuilder.setFqClassName(c.getName).build }.asJava) - } + } */ - private[this] def getTemporalSurfaceMatcherProtoForPackage( + /* private[this] def getTemporalSurfaceMatcherProtoForPackage( tsm: TemporalSurfaceMatcherT): TemporalSurfaceMatcherProto.Builder = { require(tsm.classes.isEmpty, "Must have empty classes.") require(tsm.namespaceWrappers.nonEmpty, "Must have at least 1 package.") @@ -51,9 +51,9 @@ object TemporalSurfaceMatcherSerializer TemporalSurfaceMatcherProto.newBuilder .setType(TemporalSurfaceMatcherProto.Type.FOR_PACKAGE) .addAllNamespaces(tsm.namespaceWrappers.map(namespaceSerializer.serialize(_)).asJava) - } + } */ - private[this] def getTemporalSurfaceMatcherProtoForPriql( + /* private[this] def getTemporalSurfaceMatcherProtoForPriql( tsm: TemporalSurfaceMatcherT): TemporalSurfaceMatcherProto.Builder = { require(tsm.classes.isEmpty, "Must have empty classes.") require(tsm.namespaceWrappers.isEmpty, "Must have empty namespaceWrappers.") @@ -65,9 +65,9 @@ object TemporalSurfaceMatcherSerializer .addAllListsOfRelationElements(tsm.relationElementWrappers.map { l: Seq[RelationElementWrapper] => ListOfRelationElementProto.newBuilder.addAllRelationElements(l.map(toProto(_)).asJava).build }.asJava) - } + } */ - override def serialize(tsm: TemporalSurfaceMatcher): TemporalSurfaceMatcherProto = { + override def serialize(tsm: TemporalSurfaceMatcher): TemporalSurfaceMatcherProto = ??? /* { (tsm match { case DataFreeTemporalSurfaceMatchers.all => TemporalSurfaceMatcherProto.newBuilder.setType(TemporalSurfaceMatcherProto.Type.ALL) @@ -78,5 +78,5 @@ object TemporalSurfaceMatcherSerializer case o: TemporalSurfaceMatcherT if o.reactiveQueryProcessors.nonEmpty => getTemporalSurfaceMatcherProtoForPriql(o) case _ => throw new InvalidTemporalSurfaceMatcherException(tsm) }).build - } + } */ } diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/BatchRetryManager.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/BatchRetryManager.scala index db0a17b6..db1b6be3 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/BatchRetryManager.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/BatchRetryManager.scala @@ -43,7 +43,7 @@ trait BatchRetryManager { final def retry( client: Option[DalBrokerClient], batch: BatchContext.RetryBatchContextImpl, - exception: Throwable): Unit = { + exception: Throwable): Unit = ??? /* { exception match { case ex: Exception => { log.warn(s"DAL client got exception: ${ex.getClass.getName} - ${ex.getMessage}") @@ -77,7 +77,7 @@ trait BatchRetryManager { case t => finallyCompleteBatchWithException(client, batch, t) } - } + } */ private def finallyCompleteBatchWithException( client: Option[DalBrokerClient], diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DALProtoClient.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DALProtoClient.scala index ee0a9fe3..cee9b6aa 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DALProtoClient.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DALProtoClient.scala @@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicInteger import msjava.msnet._ import msjava.msnet.internal.MSNetProtocolConnectionConfigurationSupport -import msjava.msnet.utils.MSNetConfiguration +// import msjava.msnet.utils.MSNetConfiguration import msjava.slf4jutils.scalalog.getLogger import optimus.breadcrumbs.ChainedID import optimus.platform.dal.ClientContext @@ -151,7 +151,7 @@ object DALProtoClient { hostPort: String, kerberized: Boolean, clientName: String, - secureTransport: Boolean): MSNetProtocolConnectionConfigurationSupport = { + secureTransport: Boolean): MSNetProtocolConnectionConfigurationSupport = ??? /* { if (DalSSLConfig.enabledClientSSL) { MSNetConfiguration.setDefaultMSNetTCPSocketFactory(new MSNetSSLSocketFactory()) } @@ -174,7 +174,7 @@ object DALProtoClient { } c - } + } */ def createTcpRequestSender( client: DalBrokerClient, @@ -199,7 +199,7 @@ object DALProtoClient { // approximate value: will not start waiting for another item if exceeded (but will not interrupt a wait either) // TODO (OPTIMUS-11205): Waiting on msnet feature addition. - val maxMessageSize: Int = MSNetConfiguration.getDefaultMaxMessageSize() + val maxMessageSize: Int = ??? /* MSNetConfiguration.getDefaultMaxMessageSize() */ // enableSyncOutOfOrderReception will take effect only in sync-mode( async=false ) val enableSyncOutOfOrderReception = SupportedFeatures.enableSyncOutOfOrderReception diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DalBrokerClient.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DalBrokerClient.scala index 66982eb8..ace6bf37 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DalBrokerClient.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DalBrokerClient.scala @@ -11,7 +11,7 @@ */ package optimus.platform.dsi.protobufutils -import msjava.base.spring.lifecycle.BeanState +// import msjava.base.spring.lifecycle.BeanState import msjava.slf4jutils.scalalog.getLogger import optimus.dsi.partitioning.DefaultPartition import optimus.dsi.partitioning.Partition @@ -66,8 +66,8 @@ abstract class BatchedDalBrokerClient( private val rwShutdownLock: ReadWriteLock = new ReentrantReadWriteLock private val rShutdownLock = rwShutdownLock.readLock private val wShutdownLock = rwShutdownLock.writeLock - private val state = new BeanState() - state.initializeIfNotInitialized() + /* private val state = new BeanState() + state.initializeIfNotInitialized() */ // Needs to be lazy because creating the RequestSender might be side-effecting, for instance by spawning threads etc. // As such initialization of the requestSender should not happen until we call start() @@ -107,22 +107,22 @@ abstract class BatchedDalBrokerClient( requestBatcher.start() optionalWriteRequestBatcher.foreach(_.start()) timeoutDetector.start() - state.startIfNotRunning() + // state.startIfNotRunning() } override final private[optimus] def sendBatch(batch: BatchContext): Unit = { requestSender.assertConnected - requestSender.sendBatch(batch) + // requestSender.sendBatch(batch) } - override final def isRunning: Boolean = state.isRunning + override final def isRunning: Boolean = ??? // state.isRunning @async override def request( commands: Seq[Command], requestType: DSIRequestProto.Type, clientSessionCtx: ClientSessionContext, redirectionInfo: Option[VersioningRedirectionInfo] = None, - separateWriteBatcher: Boolean = true): Response = { + separateWriteBatcher: Boolean = true): Response = ??? /* { def lastWitnessedTxTimeOpt = EvaluationContext.entityResolver match { case hlwt: HasLastWitnessedTime => Some(hlwt.lastWitnessedTime(writeServingPartitionOpt.getOrElse(DefaultPartition))) @@ -146,7 +146,7 @@ abstract class BatchedDalBrokerClient( case DSIRequestProto.Type.MESSAGES => throw new IllegalArgumentException("Do not expect messages command type here.") } - } + } */ def shutdown(cause: Option[DalBrokerClient.ShutdownCause]): Unit = { if (isRunning) { @@ -155,7 +155,7 @@ abstract class BatchedDalBrokerClient( if (isRunning) { // to make sure we do not execute the shutdown logic multiple times // we do this stopIfRunning and have this whole method body wrapped in isRunning check - state.stopIfRunning() + // state.stopIfRunning() log.info(s"Shutting down $clientName") requestSender.shutdown() optionalWriteRequestBatcher.foreach(_.stop()) @@ -180,7 +180,7 @@ abstract class BatchedDalBrokerClient( } } finally { wShutdownLock.unlock() - state.destroyIfNotDestroyed() + // state.destroyIfNotDestroyed() } } } diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DalProtoClientMessageReceiver.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DalProtoClientMessageReceiver.scala index da33e297..0554d426 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DalProtoClientMessageReceiver.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/DalProtoClientMessageReceiver.scala @@ -13,7 +13,7 @@ package optimus.platform.dsi.protobufutils import com.google.protobuf.ByteString import msjava.msnet.MSNetMessage -import msjava.protobufutils.generated.proto.Eai.RequestResponseEnvelope +// import msjava.protobufutils.generated.proto.Eai.RequestResponseEnvelope import msjava.protobufutils.server.BackendException import msjava.slf4jutils.scalalog.getLogger import optimus.graph.DiagnosticSettings @@ -39,29 +39,29 @@ private[platform] final class DalBrokerResponseMessage( message: MSNetMessage, val protocolVersionOpt: Option[DalProtocolVersion]) extends DalServiceResponseMessage { - private lazy val envelope = RequestResponseEnvelope.parseFrom(ProtoBufUtils.getCodedInputStream(message.getBytes)) - private lazy val header = envelope.getHeader + /* private lazy val envelope = RequestResponseEnvelope.parseFrom(ProtoBufUtils.getCodedInputStream(message.getBytes)) */ + /* private lazy val header = envelope.getHeader */ - override def hasError: Boolean = header.hasError - override def hasPayload: Boolean = envelope.hasPayload - override def seqId: Int = header.getSeqId - def errorMessage: String = header.getError.getMessage - def payload: ByteString = envelope.getPayload - def getDalResponseProto: DalResponseProto = DalResponseProto.parseFrom(ProtoBufUtils.getCodedInputStream(payload)) + override def hasError: Boolean = ??? // header.hasError + override def hasPayload: Boolean = ??? // envelope.hasPayload + override def seqId: Int = ??? // header.getSeqId + def errorMessage: String = ??? // header.getError.getMessage + def payload: ByteString = ??? // envelope.getPayload + def getDalResponseProto: DalResponseProto = ??? /* DalResponseProto.parseFrom(ProtoBufUtils.getCodedInputStream(payload)) */ } private[platform] final case class DsiResponseWrapper(underlying: DSIResponseProto) extends AnyVal with DalServiceResponse { - override def isPartial: Boolean = underlying.getIsPartial - override def results: Seq[ResultProto] = underlying.getResultsList.asScala - override def commandIndices: Seq[Int] = underlying.getCommandIndicesList.asScala.map(_.intValue) - override def establishSessionResult: Option[EstablishSessionResultProto] = - if (underlying.hasEstablishSessionResult) Some(underlying.getEstablishSessionResult) - else None - override def timings: Option[TimingsProto] = - if (underlying.hasTimings) Some(underlying.getTimings) - else None + override def isPartial: Boolean = ??? // underlying.getIsPartial + override def results: Seq[ResultProto] = ??? // underlying.getResultsList.asScala + override def commandIndices: Seq[Int] = ??? // underlying.getCommandIndicesList.asScala.map(_.intValue) + override def establishSessionResult: Option[EstablishSessionResultProto] = ??? + /* if (underlying.hasEstablishSessionResult) Some(underlying.getEstablishSessionResult) + else None */ + override def timings: Option[TimingsProto] = ??? + /* if (underlying.hasTimings) Some(underlying.getTimings) + else None */ } object DalProtoClientMessageReceiver { @@ -83,7 +83,7 @@ class DalProtoClientMessageReceiver( batchContext: BatchContext, now: Long, elapsed: => Long, - message: DalBrokerResponseMessage): Unit = { + message: DalBrokerResponseMessage): Unit = ??? /* { if (message.protocolVersionOpt.exists(_.isSince(GpbWithDalRequest))) { log.trace(s"${logPrefix(requestUuid, seqId)} parsing DALResponseProto") // parse a DalResponseProto @@ -108,9 +108,9 @@ class DalProtoClientMessageReceiver( } unsafeParseResponse(requestUuid, seqId, now, elapsed, batchContext, DsiResponseWrapper(response)) } - } + } */ - override protected def unsafeParseError(response: DalBrokerResponseMessage): Unit = { + override protected def unsafeParseError(response: DalBrokerResponseMessage): Unit = ??? /* { val dalResponse = response.getDalResponseProto if (dalResponse.hasDsiResponse) { val dsiResponse = dalResponse.getDsiResponse @@ -122,5 +122,5 @@ class DalProtoClientMessageReceiver( } else { throw new BackendException(response.errorMessage) } - } + } */ } diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/MessageContexts.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/MessageContexts.scala index d6b4f456..910fc3fa 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/MessageContexts.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/MessageContexts.scala @@ -60,7 +60,7 @@ trait BatchContext { def requestUuid: String def chainedId: ChainedID def requestType: DSIRequestProto.Type - final def readOnly: Boolean = requestType == DSIRequestProto.Type.READ_ONLY + final def readOnly: Boolean = ??? /* requestType == DSIRequestProto.Type.READ_ONLY */ def clientSessionContext: ClientSessionContext def clientRequests: Vector[ClientRequest] def token: Option[InFlightRequestToken] @@ -109,7 +109,7 @@ trait BatchContext { } } - lazy val minAssignableTtOpt: Option[Instant] = { + lazy val minAssignableTtOpt: Option[Instant] = ??? /* { if (requestType == DSIRequestProto.Type.WRITE) { val mats = clientRequests.flatMap(_.commands.collect { case pae: PutApplicationEvent if pae.minAssignableTtOpt.isDefined => pae.minAssignableTtOpt.get @@ -117,14 +117,14 @@ trait BatchContext { }) if (mats.nonEmpty) Some(mats.max) else None } else None - } + } */ - val lastWitnessedTxTimeOpt: Option[Instant] = { + val lastWitnessedTxTimeOpt: Option[Instant] = ??? /* { if (requestType == DSIRequestProto.Type.WRITE) { val lwts = clientRequests.collect { case wr: WriteClientRequest => wr.lastWitnessedTxTimeOpt }.flatten if (lwts.nonEmpty) Some(lwts.max) else None } else None - } + } */ } object BatchContext { diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/PubSubProtoClient.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/PubSubProtoClient.scala index ca07bcb0..db710cf9 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/PubSubProtoClient.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/PubSubProtoClient.scala @@ -17,7 +17,7 @@ import java.util.concurrent.locks.ReadWriteLock import java.util.concurrent.locks.ReentrantReadWriteLock import com.google.protobuf.ByteString -import msjava.base.spring.lifecycle.BeanState +// import msjava.base.spring.lifecycle.BeanState import msjava.msnet.MSNetMessage import msjava.protobufutils.server.BackendException import msjava.slf4jutils.scalalog.getLogger @@ -33,8 +33,8 @@ import optimus.platform.dsi.Response import optimus.platform.dsi.bitemporal._ import optimus.platform.dsi.bitemporal.proto.CommandProtoSerialization import optimus.platform.dsi.bitemporal.proto.Dsi._ -import optimus.platform.dsi.bitemporal.proto.Envelope.DalProtocolStatus -import optimus.platform.dsi.bitemporal.proto.Envelope.DalRequestResponseEnvelope +/* import optimus.platform.dsi.bitemporal.proto.Envelope.DalProtocolStatus +import optimus.platform.dsi.bitemporal.proto.Envelope.DalRequestResponseEnvelope */ import optimus.platform.dsi.bitemporal.proto.NotificationEntrySerialization import optimus.platform.dsi.connection.DalProtocolVersion import optimus.platform.dsi.versioning.VersioningRedirectionInfo @@ -73,9 +73,9 @@ object PubSubProtoClient { object AuxiliaryDataProcessor extends AuxiliaryDataProcessor abstract class AuxiliaryDataProcessor extends NotificationEntrySerialization { - protected def handleNotificationEntries(entryData: Iterable[ByteString]): Seq[NotificationEntry] = { + protected def handleNotificationEntries(entryData: Iterable[ByteString]): Seq[NotificationEntry] = ??? /* { entryData.map(NotificationEntryProto.parseFrom).map(fromProto(_)).toVector - } + } */ def inline(results: Seq[Result], auxiliaryData: Iterable[ByteString]): Seq[Result] = results @@ -136,8 +136,8 @@ class PubSubProtoClient( private val rShutdownLock = rwShutdownLock.readLock private val wShutdownLock = rwShutdownLock.writeLock - private[this] val state = new BeanState() - state.initializeIfNotInitialized() + // private[this] val state = new BeanState() + // state.initializeIfNotInitialized() private[this] val configSupport = config.createConfigSupport(hostPort, kerberized, clientName, secureTransport) private[this] val msgListener = (dalProtocolOpt: Option[DalProtocolVersion]) => @@ -195,7 +195,7 @@ class PubSubProtoClient( override def start(): Unit = { tcpRequestSender.start() - state.startIfNotRunning() + // state.startIfNotRunning() } def shutdown(cause: Option[DalBrokerClient.ShutdownCause]): Unit = { @@ -205,7 +205,7 @@ class PubSubProtoClient( if (isRunning) { // to make sure we do not execute the shutdown logic multiple times // we do this stopIfRunning and have this whole method body wrapped in isRunning check - state.stopIfRunning() + // state.stopIfRunning() log.info(s"Shutting down ${outer}") tcpRequestSender.shutdown() log.info(s"${config.name} shut down") @@ -225,13 +225,13 @@ class PubSubProtoClient( } } finally { wShutdownLock.unlock - state.destroyIfNotDestroyed + // state.destroyIfNotDestroyed } } } - def isRunning: Boolean = state.isRunning + def isRunning: Boolean = ??? // state.isRunning - private def checkAndThrowHeaderError(envelope: DalRequestResponseEnvelope): Unit = { + /* private def checkAndThrowHeaderError(envelope: DalRequestResponseEnvelope): Unit = { val response = DalResponseProto.parseFrom(ProtoBufUtils.getCodedInputStream(envelope.getPayload)) if (response.hasDsiResponse) { val dsiResponse = response.getDsiResponse @@ -267,9 +267,9 @@ class PubSubProtoClient( log.error(s"${toString}::Other result received: ${otherResult}") None // ignore all other results } - } + } */ - def onMessage(message: MSNetMessage, dalProtocolOpt: Option[DalProtocolVersion]): Unit = { + def onMessage(message: MSNetMessage, dalProtocolOpt: Option[DalProtocolVersion]): Unit = ??? /* { rShutdownLock.lock try { if (isRunning) { @@ -302,7 +302,7 @@ class PubSubProtoClient( } finally { rShutdownLock.unlock } - } + } */ def onDisconnect(): Unit = { log.error(s"${toString} Received disconnect") diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/RequestBatcher.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/RequestBatcher.scala index 6d1cb741..dac5368a 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/RequestBatcher.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/RequestBatcher.scala @@ -130,10 +130,10 @@ object ClientRequestBatcher extends Log { def requests: Vector[ClientRequest] } final case class ReadBatch(requests: Vector[ClientRequest]) extends Batch { - override def requestType: DSIRequestProto.Type = DSIRequestProto.Type.READ_ONLY + override def requestType: DSIRequestProto.Type = ??? /* DSIRequestProto.Type.READ_ONLY */ } final case class WriteBatch(requests: Vector[ClientRequest]) extends Batch { - override def requestType: DSIRequestProto.Type = DSIRequestProto.Type.WRITE + override def requestType: DSIRequestProto.Type = ??? /* DSIRequestProto.Type.WRITE */ } def splitIntoBatchesConsideringEntitlements(requests: Seq[ClientRequest]): Seq[Batch] = { diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/RequestSender.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/RequestSender.scala index 64c9afad..26e044ad 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/RequestSender.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/RequestSender.scala @@ -13,14 +13,14 @@ package optimus.platform.dsi.protobufutils import com.google.protobuf.ByteString import com.google.protobuf.MessageLite -import msjava.base.spring.lifecycle.BeanState +// import msjava.base.spring.lifecycle.BeanState import msjava.msnet._ import msjava.msnet.internal.MSNetProtocolConnectionConfigurationSupport -import msjava.msnet.ssl.SSLEstablisherFactory -import msjava.protobufutils.generated.proto.Eai.RequestResponseEnvelope -import msjava.protobufutils.generated.proto.Eai.RequestResponseHeader +// import msjava.msnet.ssl.SSLEstablisherFactory +/* import msjava.protobufutils.generated.proto.Eai.RequestResponseEnvelope +import msjava.protobufutils.generated.proto.Eai.RequestResponseHeader */ import msjava.slf4jutils.scalalog.getLogger -import net.iharder.base64.Base64 +import net.iharder.Base64 import optimus.breadcrumbs.Breadcrumbs import optimus.breadcrumbs.BreadcrumbsSendLimit.OnceByCrumbEquality import optimus.breadcrumbs.ChainedID @@ -131,7 +131,7 @@ final class RequestSender( requestType: DSIRequestProto.Type, token: Option[InFlightRequestToken] = None, redirectionInfo: Option[VersioningRedirectionInfo] = None - ): Unit = { + ): Unit = ??? /* { val requestUuid = UUID.randomUUID val requestId = requestUuid.toString @@ -179,9 +179,9 @@ final class RequestSender( redirectionInfo, batchRetryManager) sendBatch(requestContext) - } + } */ - private[optimus] def sendBatch(rc: BatchContext): Unit = { + /* private[optimus] def sendBatch(rc: BatchContext): Unit = { val commandLocations = CommandLocations.extract(rc.clientRequests) val commandTags = CommandAppNameTags.extract(rc.clientRequests) @@ -355,7 +355,7 @@ final class RequestSender( } saveToFile(encodedCmds, file) } - } + } */ } object TcpRequestSender { @@ -390,10 +390,10 @@ private[optimus] class TcpRequestSender( private[this] var connection: MSNetTCPConnection = null private[this] var remoteProtocolVersion: Option[DalProtocolVersion] = null - private[this] val state = new BeanState() - private[optimus] def hostPort = configSupport.getHostPort + // private[this] val state = new BeanState() + private[optimus] def hostPort = ??? // configSupport.getHostPort - private[this] def createConnection() = { + private[this] def createConnection() = ??? /* { log.info(s"Creating new connection to $hostPort${if (secureTransport) " (secure)" else ""}") val connection = config.createConnection(configSupport) if (dalProtocolVersionEstablisherEnabled && !secureTransport) { @@ -423,7 +423,7 @@ private[optimus] class TcpRequestSender( // regex-ignore-line (open-sourcing) has to persist unless lib is updated connection.setMasterEstablisherMode(MasterEstablisherMode.OFF) } - state.initializeIfNotInitialized() + // state.initializeIfNotInitialized() if (!connection.syncConnect(config.defaultConnectTimeout)) { throw new DALRetryableActionException(s"Failed to connect to $hostPort", Option(client)) } @@ -433,12 +433,12 @@ private[optimus] class TcpRequestSender( connection.addListener(msgListener(remoteProtocolVersion)) connection.setImmutable(true) connection - } + } */ private[optimus] def start(): Unit = try { connection = createConnection() - state.startIfNotRunning() + // state.startIfNotRunning() } catch { case NonFatal(ex) => log.error("Exception caught in start(), about to shutdown()", ex) @@ -446,24 +446,24 @@ private[optimus] class TcpRequestSender( throw ex } - private[optimus] def shutdown(): Unit = { + private[optimus] def shutdown(): Unit = ??? /* { Option(connection) foreach (_.close()) Option(configSupport.getLoop) foreach (_.quit()) Option(configSupport.getCallbackExecutor) foreach { case e: ExecutorService => e.shutdown() case _ => } - state.destroyIfNotDestroyed() - } + // state.destroyIfNotDestroyed() + } */ - private[optimus] def asyncSend(message: MessageType): Unit = { + private[optimus] def asyncSend(message: MessageType): Unit = ??? /* { val msg = new MSNetStringMessage(message) connection.asyncSend(msg) - } + } */ - private[optimus] def assertConnected(): Unit = { + private[optimus] def assertConnected(): Unit = ??? /* { try { - state.throwIfNotRunning() + // state.throwIfNotRunning() if (!connection.isConnected && !connection.getRetryFlag) throw new MSNetException("DAL is not connected.") } catch { case e: IllegalStateException => { @@ -475,7 +475,7 @@ private[optimus] class TcpRequestSender( throw new DALRetryableActionException(e.toString, Option(client)) } } - } + } */ // necessary for tests protected[optimus] def dalRequestRemoteProtocolVersion: Boolean = @@ -496,7 +496,7 @@ private[optimus] class TcpRequestSender( commandTags: Seq[CommandAppNameTag], minAssignableTtOpt: Option[Instant], lastWitnessedTxTimeOpt: Option[Instant], - redirectionInfo: Option[VersioningRedirectionInfo] = None): MessageLite = { + redirectionInfo: Option[VersioningRedirectionInfo] = None): MessageLite = ??? /* { val cmdProtos = requests.flatMap(_.commandProtos) val commandLocationsProto = commandLocations map { CommandLocationSerializer.toProto } asJava @@ -570,7 +570,7 @@ private[optimus] class TcpRequestSender( } builder.build } - } + } */ override private[platform] def buildMessage( seqId: Int, @@ -596,7 +596,7 @@ private[optimus] class TcpRequestSender( buildMsnetMessageImpl(req.toByteString, seqId) } - private[optimus] def buildMsnetMessageImpl(payload: ByteString, seqId: Int): Array[Byte] = { + private[optimus] def buildMsnetMessageImpl(payload: ByteString, seqId: Int): Array[Byte] = ??? /* { val header = RequestResponseHeader.newBuilder .setSeqId(seqId) .build @@ -607,7 +607,7 @@ private[optimus] class TcpRequestSender( val bytes = envelope.toByteArray assertMessageSizeUnderLimit(bytes.length) bytes - } + } */ private[this] def assertMessageSizeUnderLimit(size: Int): Unit = { val maxSize = config.maxMessageSize @@ -616,15 +616,15 @@ private[optimus] class TcpRequestSender( } } - private[optimus] def enableReading(): Unit = { + private[optimus] def enableReading(): Unit = ??? /* { Option(connection).foreach(_.enableReading) - } + } */ - private[optimus] def disableReading(): Unit = { + private[optimus] def disableReading(): Unit = ??? /* { Option(connection).foreach(_.disableReading) - } + } */ - private[optimus] def disconnectConnection(): Unit = { + private[optimus] def disconnectConnection(): Unit = ??? /* { Option(connection).foreach(_.disconnect) - } + } */ } diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/VersioningServerManager.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/VersioningServerManager.scala index 05d4e566..215a8c23 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/VersioningServerManager.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/dsi/protobufutils/VersioningServerManager.scala @@ -30,7 +30,7 @@ import optimus.platform.dsi.protobufutils.DALProtoClient.{Configuration, Version import optimus.platform.dsi.versioning.PathHashT import optimus.platform.dsi.versioning.VersioningKey import optimus.platform.dsi.versioning.VersioningRedirectionInfo -import optimus.platform.runtime.OptimusVersioningZkClient +// import optimus.platform.runtime.OptimusVersioningZkClient import scala.annotation.tailrec import scala.util.Random @@ -80,7 +80,7 @@ class VersioningServerManager( .concurrencyLevel(1) .removalListener(RemovalListener) .build(new CacheLoader[(ClientSessionContext, PathHashT), DalBrokerClient] { - override def load(key: (ClientSessionContext, PathHashT)) = { + override def load(key: (ClientSessionContext, PathHashT)) = ??? /* { val (sessionCtx, classpathHash) = key val zkClient = OptimusVersioningZkClient.getClient(brokerContext.broker) // TODO (OPTIMUS-14722): support server-side versioning for non-default DAL contexts @@ -98,7 +98,7 @@ class VersioningServerManager( SharedRequestLimiter.write) protoClient.start() protoClient - } + } */ }) } @@ -159,7 +159,7 @@ class VersioningServerManager( attempts -= 1 DALEventMulticaster.dalVersioningRetryCallback(DALVersioningRetryEvent(ex)) closeProtoClients(sessionCtx, redirectionInfo) - OptimusVersioningZkClient.reset() + // OptimusVersioningZkClient.reset() delay(backoff) backoff *= 2 hasRetried = true @@ -196,7 +196,7 @@ class VersioningServerManager( protected def createDALRecoveryEvent(client: Option[DalBrokerClient]): DALVersioningRecoveryEvent = DALVersioningRecoveryEvent(s"Connected to ${client.map(_.connectionString).getOrElse("")}") - @tailrec private[this] def shouldRetry(t: Throwable, requestType: DSIRequestProto.Type): Boolean = { + /* @tailrec */ private[this] def shouldRetry(t: Throwable, requestType: DSIRequestProto.Type): Boolean = ??? /* { val isRetryable = (requestType == DSIRequestProto.Type.WRITE && t.isInstanceOf[NoVersioningServersException]) // has to be written like this so the recursive call is in tail position if (isRetryable) @@ -204,7 +204,7 @@ class VersioningServerManager( else (t ne null) && shouldRetry(t.getCause, requestType) - } + } */ private class VersioningDsiClientBatchRetryManager( override val maxRetryAttempts: Int, @@ -223,7 +223,7 @@ class VersioningServerManager( DALEventMulticaster.dalVersioningRecoveryCallback(outer.createDALRecoveryEvent(client)) override protected def close(client: Option[DalBrokerClient], batch: BatchContext): Unit = { outer.closeProtoClients(batch.clientSessionContext, batch.redirectionInfo.get) - OptimusVersioningZkClient.reset() + // OptimusVersioningZkClient.reset() } } } diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/pickling/EmbeddablePicklers.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/pickling/EmbeddablePicklers.scala index 3bc9fb14..fc31a101 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/pickling/EmbeddablePicklers.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/pickling/EmbeddablePicklers.scala @@ -222,7 +222,7 @@ object EmbeddablePicklers extends StorableSerializer { } } - override def onChildCompleted(eq: EvaluationQueue, child: NodeTask): Unit = { + override def onChildCompleted(eq: EvaluationQueue, child: NodeTask): Unit = ??? /* { try { if (child eq versionResolver) { val versionedPropMap = versionResolver.get @@ -258,7 +258,7 @@ object EmbeddablePicklers extends StorableSerializer { if (i == unpicklers.length) completeWithResult(ecb.fromArray(arr), eq) } catch { case e: Throwable => completeWithException(e, eq) } - } + } */ } } } diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/relational/serialization/ClassEntityInfoSerializer.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/relational/serialization/ClassEntityInfoSerializer.scala index 94cbcf70..cfcf2944 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/relational/serialization/ClassEntityInfoSerializer.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/relational/serialization/ClassEntityInfoSerializer.scala @@ -22,13 +22,13 @@ trait ClassEntityInfoSerialization extends ProtoSerialization { } object ClassEntityInfoSerializer extends ProtoSerializer[ClassEntityInfo, ClassEntityInfoProto] { - override def serialize(cei: ClassEntityInfo): ClassEntityInfoProto = { + override def serialize(cei: ClassEntityInfo): ClassEntityInfoProto = ??? /* { ClassEntityInfoProto.newBuilder .setFqn(FqnProto.newBuilder.setFqClassName(cei.runtimeClass.getName)) .build - } + } */ - override def deserialize(proto: ClassEntityInfoProto): ClassEntityInfo = { + override def deserialize(proto: ClassEntityInfoProto): ClassEntityInfo = ??? /* { EntityInfoRegistry.getClassInfo(proto.getFqn.getFqClassName) - } + } */ } diff --git a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/relational/serialization/RelationElementSerializer.scala b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/relational/serialization/RelationElementSerializer.scala index f8894246..d94dc815 100644 --- a/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/relational/serialization/RelationElementSerializer.scala +++ b/optimus/platform/projects/dal_client/src/main/scala/optimus/platform/relational/serialization/RelationElementSerializer.scala @@ -22,13 +22,13 @@ trait RelationElementSerialization extends ProtoSerialization { } object RelationElementSerializer extends ProtoSerializer[RelationElementWrapper, RelationElementProto] { - override def serialize(re: RelationElementWrapper): RelationElementProto = { + override def serialize(re: RelationElementWrapper): RelationElementProto = ??? /* { RelationElementProto.newBuilder .setRelationTreeMessageBytes(ByteString.copyFrom(re.a)) .build - } + } */ - override def deserialize(proto: RelationElementProto): RelationElementWrapper = { + override def deserialize(proto: RelationElementProto): RelationElementWrapper = ??? /* { RelationElementWrapper(proto.getRelationTreeMessageBytes.toByteArray) - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/java/optimus/dal/net/AlwaysResolveMSNetInetAddressImpl.java b/optimus/platform/projects/dal_core/src/main/java/optimus/dal/net/AlwaysResolveMSNetInetAddressImpl.java index f3f0054e..a307b5e7 100644 --- a/optimus/platform/projects/dal_core/src/main/java/optimus/dal/net/AlwaysResolveMSNetInetAddressImpl.java +++ b/optimus/platform/projects/dal_core/src/main/java/optimus/dal/net/AlwaysResolveMSNetInetAddressImpl.java @@ -35,7 +35,7 @@ public AlwaysResolveMSNetInetAddressImpl(InetSocketAddress unresolvedIsa) { this.host = unresolvedIsa.getHostName(); } - @Override + public synchronized InetSocketAddress getInetSocketAddress() { ensureResolveAttempted(); return lastMaybeResolvedIsa; @@ -46,13 +46,13 @@ public synchronized InetSocketAddress getInetSocketAddress() { * * @return true if the address and port are valid. */ - @Override + public synchronized boolean isValid() { ensureResolveAttempted(); return !lastMaybeResolvedIsa.isUnresolved(); } - @Override + public int getPort() { return unresolvedIsa.getPort(); } @@ -63,7 +63,7 @@ public int getPort() { * * @return the hostname, or "any" for all local addresses. */ - @Override + public String getHost() { return host; } @@ -73,18 +73,18 @@ public String getHost() { * * @return the InetAddress */ - @Override + public synchronized InetAddress getInetAddress() { ensureResolveAttempted(); return lastMaybeResolvedIsa.getAddress(); } - @Override + public int hashCode() { return Objects.hash(host, getPort()); } - @Override + public synchronized String toString() { if (lastMaybeResolvedIsa == null) { return host + ":" + getPort(); @@ -95,12 +95,12 @@ public synchronized String toString() { } } - @Override + public String getAddressString() { return host + ":" + getPort(); } - @Override + public boolean equals(Object o) { if (this == o) return true; if (o == null) return false; @@ -126,7 +126,7 @@ private void ensureResolveAttempted() { } // resolve is called by MSNet before each retry, from MSNetTCPConnection.retryHandler - @Override + public synchronized void resolve() { lastMaybeResolvedIsa = new InetSocketAddress(unresolvedIsa.getHostName(), unresolvedIsa.getPort()); diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/dal/silverking/SkTraceIdSerializer.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/dal/silverking/SkTraceIdSerializer.scala index 57ea195b..3a0e723a 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/dal/silverking/SkTraceIdSerializer.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/dal/silverking/SkTraceIdSerializer.scala @@ -16,13 +16,11 @@ import com.ms.silverking.cloud.dht.trace.SkTraceId import optimus.dsi.trace.TraceId import optimus.platform.dsi.bitemporal.proto.ChainedIdSerializer import optimus.platform.dsi.bitemporal.proto.Prc.SilverKingTraceIdProto -import optimus.platform.dsi.bitemporal.proto.Prc.SilverKingTraceIdProto.ForwardState -import optimus.platform.dsi.bitemporal.proto.Prc.SilverKingTraceIdProto.Type import optimus.platform.dsi.bitemporal.proto.ProtoSerializer // Serializer for SilverKing's TraceId private[optimus] object SkTraceIdSerializer extends ProtoSerializer[SkTraceId, SilverKingTraceIdProto] { - private def fromProto(gpbState: ForwardState): SkForwardState = gpbState match { + /* private def fromProto(gpbState: ForwardState): SkForwardState = gpbState match { case ForwardState.NOT_FORWARDED => SkForwardState.NotForwarded case ForwardState.LOCAL_FORWARDED => SkForwardState.LocalForwarded case ForwardState.REMOTE_FORWARDED => SkForwardState.RemoteForwarded @@ -32,9 +30,9 @@ private[optimus] object SkTraceIdSerializer extends ProtoSerializer[SkTraceId, S case SkForwardState.NotForwarded => ForwardState.NOT_FORWARDED case SkForwardState.LocalForwarded => ForwardState.LOCAL_FORWARDED case SkForwardState.RemoteForwarded => ForwardState.REMOTE_FORWARDED - } + } */ - override def serialize(skTraceId: SkTraceId): SilverKingTraceIdProto = { + override def serialize(skTraceId: SkTraceId): SilverKingTraceIdProto = ??? /* { SilverKingTraceIdProto .newBuilder() .setType(Type.TRACE_ID) @@ -42,9 +40,9 @@ private[optimus] object SkTraceIdSerializer extends ProtoSerializer[SkTraceId, S .setRequestUuid(skTraceId.getTraceId.requestId) .setChainedId(ChainedIdSerializer.serialize(skTraceId.getTraceId.chainedId)) .build() - } + } */ - override def deserialize(proto: SilverKingTraceIdProto): SkTraceId = proto.getType match { + override def deserialize(proto: SilverKingTraceIdProto): SkTraceId = ??? /* proto.getType match { case Type.TRACE_ID => new SkTraceId( TraceId( @@ -53,9 +51,9 @@ private[optimus] object SkTraceIdSerializer extends ProtoSerializer[SkTraceId, S ), fromProto(proto.getForwardState) ) - } + } */ - def traceIdToBytes(skTraceId: SkTraceId): Array[Byte] = serialize(skTraceId).toByteArray + def traceIdToBytes(skTraceId: SkTraceId): Array[Byte] = ??? // serialize(skTraceId).toByteArray - def bytesToTraceId(bytes: Array[Byte]): SkTraceId = deserialize(SilverKingTraceIdProto.parseFrom(bytes)) + def bytesToTraceId(bytes: Array[Byte]): SkTraceId = ??? // deserialize(SilverKingTraceIdProto.parseFrom(bytes)) } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/base/StorablePayloadKey.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/base/StorablePayloadKey.scala index 4221d466..45b2c92a 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/base/StorablePayloadKey.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/base/StorablePayloadKey.scala @@ -40,14 +40,14 @@ object StorablePayloadKey { EventStorablePayloadKey(sbe.id, sbe.slot, sbe.versionId, className, sbe.tt, cmdTt) } - def apply(pe: PersistentEntityProto, cmdTt: Instant): StorablePayloadKey = { + def apply(pe: PersistentEntityProto, cmdTt: Instant): StorablePayloadKey = ??? /* { val se = pe.getSerializedEntity val vref = SlottedVersionedReference(VersionedReferenceSerializer.deserialize(pe.getVersionedReference), se.getSlot) val className = se.getClassName EntityStorablePayloadKey(vref, className, cmdTt) - } + } */ - def apply(sbe: SerializedBusinessEventProto, cmdTt: Instant): StorablePayloadKey = { + def apply(sbe: SerializedBusinessEventProto, cmdTt: Instant): StorablePayloadKey = ??? /* { val bref = BusinessEventReferenceSerializer.deserialize(sbe.getEventRef) val slot = if (sbe.hasSlot) sbe.getSlot else 0 val className = sbe.getClassName @@ -58,14 +58,14 @@ object StorablePayloadKey { className, InstantSerializer.deserialize(sbe.getTxTime), cmdTt) - } + } */ - def apply(sbett: SerializedBusinessEventWithTTToProto, cmdTt: Instant): StorablePayloadKey = { + def apply(sbett: SerializedBusinessEventWithTTToProto, cmdTt: Instant): StorablePayloadKey = ??? /* { val sbe = sbett.getBusinessEvent StorablePayloadKey(sbe, cmdTt) - } + } */ - def extract(combo: EntityBusinessEventComboProto, cmdTt: Instant): Seq[StorablePayloadKey] = { + def extract(combo: EntityBusinessEventComboProto, cmdTt: Instant): Seq[StorablePayloadKey] = ??? /* { if (combo.hasPersistentEntity) { val sbe = combo.getBusinessEvent val pe = combo.getPersistentEntity @@ -74,9 +74,9 @@ object StorablePayloadKey { val sbe = combo.getBusinessEvent Seq(StorablePayloadKey(sbe, cmdTt)) } - } + } */ - def extract(combott: EntityBusinessEventWithTTToComboProto, cmdTt: Instant): Seq[StorablePayloadKey] = { + def extract(combott: EntityBusinessEventWithTTToComboProto, cmdTt: Instant): Seq[StorablePayloadKey] = ??? /* { val peSeq = if (combott.hasPersistentEntity) { val pe = combott.getPersistentEntity Seq(StorablePayloadKey(pe, cmdTt)) @@ -86,9 +86,9 @@ object StorablePayloadKey { Seq(StorablePayloadKey(sbett, cmdTt)) } else Seq.empty peSeq ++ sbettSeq - } + } */ - def extract(gie: GetInitiatingEventResultProto, cmdTt: Instant): Seq[StorablePayloadKey] = { + def extract(gie: GetInitiatingEventResultProto, cmdTt: Instant): Seq[StorablePayloadKey] = ??? /* { val peSeq = if (gie.hasPersistentEntity) { val pe = gie.getPersistentEntity Seq(StorablePayloadKey(pe, cmdTt)) @@ -98,7 +98,7 @@ object StorablePayloadKey { Seq(StorablePayloadKey(sbe, cmdTt)) } else Seq.empty peSeq ++ sbeSeq - } + } */ } sealed trait StorablePayloadKey { diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/base/actions/DBRawOperation.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/base/actions/DBRawOperation.scala index 12058959..1ff1d606 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/base/actions/DBRawOperation.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/base/actions/DBRawOperation.scala @@ -13,7 +13,7 @@ package optimus.dsi.base.actions import java.util.Arrays -import net.iharder.base64.Base64 +import net.iharder.Base64 import optimus.platform.dsi.bitemporal._ import optimus.platform.storable.{EntityTimeSliceReference, SerializedAppEvent, SerializedKey, StorableReference} import DBRawObjectTypename._ diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/cli/HdomHelper.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/cli/HdomHelper.scala index c71ba941..bf1c31fd 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/cli/HdomHelper.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/cli/HdomHelper.scala @@ -14,7 +14,7 @@ package optimus.dsi.cli import msjava.hdom.Document import msjava.hdom.Element import msjava.hdom.output.XMLOutputter -import msjava.hdom.xpath.HDOMXPathUtils +// import msjava.hdom.xpath.HDOMXPathUtils import msjava.msxml.xpath.MSXPathExpression import scala.jdk.CollectionConverters._ @@ -23,7 +23,7 @@ trait HdomHelper { def findElements( hdom: Document, compiledxPath: MSXPathExpression, - targetValue: Option[String] = None): List[Element] = { + targetValue: Option[String] = None): List[Element] = ??? /* { val results = HDOMXPathUtils.getAllNodes(compiledxPath, hdom).asScala.asInstanceOf[Iterable[Element]] if (targetValue.isDefined) { @@ -31,19 +31,19 @@ trait HdomHelper { } else { results.toList } - } + } */ - def elementToString(element: Element): String = { + def elementToString(element: Element): String = ??? /* { val outputter = getXmlOutputter() outputter.outputString(element) - } + } */ - def documentToString(doc: Document): String = { + def documentToString(doc: Document): String = ??? /* { val outputter = getXmlOutputter() outputter.outputString(doc) - } + } */ - private def getXmlOutputter(): XMLOutputter = { + private def getXmlOutputter(): XMLOutputter = ??? /* { val outputter = new XMLOutputter() outputter.setIndent(" ") outputter.setNewlines(true) @@ -52,5 +52,5 @@ trait HdomHelper { outputter.setOmitEncoding(true) outputter.setOmitDeclaration(true) outputter - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/cli/ZkStoreUtils.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/cli/ZkStoreUtils.scala index 3d7363ae..3c14aba3 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/cli/ZkStoreUtils.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/cli/ZkStoreUtils.scala @@ -15,10 +15,10 @@ import java.io.ByteArrayInputStream import msjava.hdom.Document import msjava.hdom.Element -import msjava.hdom.Node +// import msjava.hdom.Node import msjava.hdom.input.SAXBuilder -import msjava.hdom.xpath.HDOMXPathUtils -import msjava.msxml.xpath.MSXPathUtils +/* import msjava.hdom.xpath.HDOMXPathUtils +import msjava.msxml.xpath.MSXPathUtils */ import optimus.platform.dsi.bitemporal.DSISpecificError import optimus.platform.runtime.ZkUtils import org.apache.curator.framework.CuratorFramework @@ -45,25 +45,25 @@ class ZkStoreUtils(private val curator: CuratorFramework, printFunc: String => U printFunc(documentToString(hdom.get)) } - def printZkConfig(zkPath: String, xPath: String): Unit = { + def printZkConfig(zkPath: String, xPath: String): Unit = ??? /* { val hdom = readFromZooKeeper(zkPath) val compiledxPath = MSXPathUtils.compile(xPath) if (hdom.isSuccess) { val elements = findElements(hdom.get, compiledxPath) elements.foreach(e => printFunc(elementToString(e))) } - } + } */ // // FIND NODE(s) // - def findNode(zkPath: String, xPath: String, nodeName: String): Try[List[String]] = { + def findNode(zkPath: String, xPath: String, nodeName: String): Try[List[String]] = ??? /* { readFromZooKeeper(zkPath) map { hdom => (findElements(hdom, MSXPathUtils.compile(s"$xPath/$nodeName"), None), hdom) } map { case (s, _) => s.map(_.getNodeValue) } - } + } */ // // ADD NEW NODE @@ -73,7 +73,7 @@ class ZkStoreUtils(private val curator: CuratorFramework, printFunc: String => U xPath: String, nodeName: String, nodeData: String, - skipWriteIfPresent: Boolean = false): Try[Unit] = { + skipWriteIfPresent: Boolean = false): Try[Unit] = ??? /* { readFromZooKeeper(zkPath) map { hdom => (findElements(hdom, MSXPathUtils.compile(xPath + "/" + nodeName), Some(nodeData)), hdom) } map { @@ -89,9 +89,9 @@ class ZkStoreUtils(private val curator: CuratorFramework, printFunc: String => U writeToZooKeeper(zkPath, hdom).get printFunc(s"Node <${nodeName}>${nodeData} successfully added.") } - } + } */ - def addNodes(zkPath: String, xPath: String, nodeData: List[Element]): Try[Unit] = { + def addNodes(zkPath: String, xPath: String, nodeData: List[Element]): Try[Unit] = ??? /* { val nodeName = xPath.split("/").last readFromZooKeeper(zkPath) map { hdom => (findElements(hdom, MSXPathUtils.compile(xPath), None), hdom) @@ -116,12 +116,12 @@ class ZkStoreUtils(private val curator: CuratorFramework, printFunc: String => U printFunc(s"Node <${nodeName}>${nodeData} successfully added.") } } - } + } */ // // DELETE NODE // - def deleteNode(zkPath: String, xPath: String, targetValue: Option[String] = None): Try[Unit] = { + def deleteNode(zkPath: String, xPath: String, targetValue: Option[String] = None): Try[Unit] = ??? /* { readFromZooKeeper(zkPath) map { hdom => (findElements(hdom, MSXPathUtils.compile(xPath), targetValue), hdom) } map { @@ -133,7 +133,7 @@ class ZkStoreUtils(private val curator: CuratorFramework, printFunc: String => U writeToZooKeeper(zkPath, hdom).get printFunc(s"${s.size} node(s) successfully deleted.") } - } + } */ // // CHANGE NODE VALUE @@ -143,7 +143,7 @@ class ZkStoreUtils(private val curator: CuratorFramework, printFunc: String => U xPath: String, newValue: String, targetValue: Option[String] = None, - createNew: Boolean = false): Try[Unit] = { + createNew: Boolean = false): Try[Unit] = ??? /* { readFromZooKeeper(zkPath) map { hdom => (findElements(hdom, MSXPathUtils.compile(xPath), targetValue), hdom) } map { @@ -174,7 +174,7 @@ class ZkStoreUtils(private val curator: CuratorFramework, printFunc: String => U throw new DSISpecificError( s"The xpath ${xPath} with value ${targetValue} refers to more than one element. Please check xpath and try again.") } - } + } */ // // PRIVATE HELPERS @@ -205,7 +205,7 @@ class ZkStoreUtils(private val curator: CuratorFramework, printFunc: String => U } } - def copyXPath(srcEnv: String, dstEnv: String, zkRootPath: String, xPath: String) = { + def copyXPath(srcEnv: String, dstEnv: String, zkRootPath: String, xPath: String) = ??? /* { val zkPath = zkRootPath + "/" + srcEnv val doc = readFromZooKeeper(zkPath) if (doc.isSuccess) { @@ -236,5 +236,5 @@ class ZkStoreUtils(private val curator: CuratorFramework, printFunc: String => U changeNodeValue(zkDstPath, xPath, elem.getText, None, true) } else printFunc(s"The source environment [${srcEnv}] is not valid. Please try again.") - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/serialization/json/StringTypeTransformer.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/serialization/json/StringTypeTransformer.scala index 2f37bfd5..72932355 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/serialization/json/StringTypeTransformer.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/dsi/serialization/json/StringTypeTransformer.scala @@ -13,7 +13,7 @@ package optimus.dsi.serialization.json import java.{util => ju} -import net.iharder.base64.Base64 +import net.iharder.Base64 import optimus.dsi.serialization.AbstractTypeTransformerOps import optimus.dsi.serialization.JavaCollectionUtils import optimus.dsi.serialization.TypeTransformException diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dal/DALCache.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dal/DALCache.scala index 1731379b..07eefaa9 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dal/DALCache.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dal/DALCache.scala @@ -368,7 +368,7 @@ class DALCacheImpl( } } - private def decodeResults(file: File): Seq[Result] = { + private def decodeResults(file: File): Seq[Result] = ??? /* { val dis = new DataInputStream(new BufferedInputStream(new FileInputStream(file))) val tryResult = Try { val size = dis.readInt() @@ -403,7 +403,7 @@ class DALCacheImpl( } dis.close() tryResult.get - } + } */ private def encodePersistentEntity(pe: PersistentEntity): (String, Map[String, Any]) = { val se = pe.serialized diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dal/config/DalKafkaConfig.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dal/config/DalKafkaConfig.scala index f67147eb..f3fac8c7 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dal/config/DalKafkaConfig.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dal/config/DalKafkaConfig.scala @@ -60,7 +60,7 @@ abstract class DalKafkaConfig(lookup: DalFeatureKafkaLookup) extends KerberosAut protected def validate(xmlString: String): Boolean - private def getServersUri(kafkaXmlConfig: XmlBasedConfiguration): String = { + private def getServersUri(kafkaXmlConfig: XmlBasedConfiguration): String = ??? /* { val rootNode = kafkaXmlConfig.configs.head.getRootElement val childrenList = rootNode.getChildren(kafkaPropXml).get(0).getChildren().asScala.toList val servers = getServersFromConfig(childrenList) @@ -68,15 +68,15 @@ abstract class DalKafkaConfig(lookup: DalFeatureKafkaLookup) extends KerberosAut throw new IllegalArgumentException("Could not find servers Uri for instance for kafka ") } servers.head.getValueAsString - } + } */ - private def getServersFromConfig(childrenList: List[Element]): List[Element] = { + private def getServersFromConfig(childrenList: List[Element]): List[Element] = ??? /* { val servers = childrenList.filter(child => child.getName == kafkaPropToXml(BOOTSTRAP_SERVERS_CONFIG)) lookup.instance match { case Some(instance) => servers.filter(child => child.getAttributeValue("instance") == instance) case None => servers } - } + } */ private def getProperty(config: XmlBasedConfiguration, path: String, default: => Option[String]): String = config.getString(path).orElse(default).getOrElse(throw new IllegalArgumentException(s"Missing property $path")) @@ -102,7 +102,7 @@ abstract class DalKafkaConfig(lookup: DalFeatureKafkaLookup) extends KerberosAut try { val xmlOutputter: XMLOutputter = new XMLOutputter() val stringWriter: StringWriter = new StringWriter() - xmlOutputter.output(configXmlDocument, stringWriter) + // xmlOutputter.output(configXmlDocument, stringWriter) stringWriter.toString } catch { case ex: Exception => throw new Exception("Could not parse kafka Config xml", ex) diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/AdminCommandProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/AdminCommandProtoSerialization.scala index 58dccc0d..e6e927cf 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/AdminCommandProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/AdminCommandProtoSerialization.scala @@ -28,28 +28,28 @@ object SystemCommandResultSerializer extends AdminCommandProtoSerialization with ProtoSerializer[SystemCommandResult, SystemResultProto] { - override def deserialize(proto: SystemResultProto): SystemCommandResult = { + override def deserialize(proto: SystemResultProto): SystemCommandResult = ??? /* { new SystemCommandResult(proto.getReply) - } + } */ - override def serialize(system: SystemCommandResult): SystemResultProto = { + override def serialize(system: SystemCommandResult): SystemResultProto = ??? /* { SystemResultProto.newBuilder .setReply(system.reply) .build - } + } */ } object SystemCommandSerializer extends AdminCommandProtoSerialization with ProtoSerializer[SystemCommand, SystemProto] { - override def deserialize(proto: SystemProto): SystemCommand = { + override def deserialize(proto: SystemProto): SystemCommand = ??? /* { new SystemCommand(proto.getCommand) - } + } */ - override def serialize(system: SystemCommand): SystemProto = { + override def serialize(system: SystemCommand): SystemProto = ??? /* { SystemProto.newBuilder .setCommand(system.cmd) .build - } + } */ } object ObliterateSerializer @@ -57,7 +57,7 @@ object ObliterateSerializer with ProtoSerializer[Obliterate, ObliterateProto] with Log { - override def deserialize(proto: ObliterateProto): Obliterate = { + override def deserialize(proto: ObliterateProto): Obliterate = ??? /* { val ttBefore = if (proto.hasTtBefore) Some(fromProto(proto.getTtBefore)) else None if (ttBefore.isDefined && ttBefore.get.isBefore(TimeInterval.Infinity)) @@ -78,9 +78,9 @@ object ObliterateSerializer new Obliterate(fromProto(proto.getEventKeyQuery)) else throw new UnsupportedOperationException - } + } */ - override def serialize(command: Obliterate): ObliterateProto = { + override def serialize(command: Obliterate): ObliterateProto = ??? /* { val builder = ObliterateProto.newBuilder require(command.queries.nonEmpty, "Serialization of Obliterate with empty queries is not supported") @@ -94,5 +94,5 @@ object ObliterateSerializer case q: EventSerializedKeyQuery => builder.setEventKeyQuery(toProto(q)).build case o => throw new UnsupportedOperationException(s"Obliteration with query ${o} is not supported") } - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/BasicProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/BasicProtoSerialization.scala index eda6916f..ae0c68eb 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/BasicProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/BasicProtoSerialization.scala @@ -15,7 +15,7 @@ import java.time.Instant import com.google.protobuf.ByteString import msjava.slf4jutils.scalalog.getLogger -import net.iharder.base64.Base64 +import net.iharder.Base64 import optimus.dsi.session.SlotMap import optimus.entity.EntityLinkageProperty import optimus.platform._ @@ -24,7 +24,6 @@ import optimus.platform.dal.config.DalZoneId import optimus.platform.dal.config.HostPort import optimus.platform.dsi.bitemporal._ import optimus.platform.dsi.bitemporal.proto.Dsi._ -import optimus.platform.dsi.bitemporal.proto.Peer.EntityTimeSliceReferenceProto import optimus.platform.storable._ import scala.jdk.CollectionConverters._ @@ -65,7 +64,7 @@ object SerializedAppEventSerializer extends BasicProtoSerialization with ProtoSerializer[SerializedAppEvent, SerializedAppEventProto] { - override def serialize(in: SerializedAppEvent): SerializedAppEventProto = { + override def serialize(in: SerializedAppEvent): SerializedAppEventProto = ??? /* { val bld = SerializedAppEventProto.newBuilder .setEventRef(toProto(in.id)) .setTxTime(toProto(in.tt)) @@ -81,9 +80,9 @@ object SerializedAppEventSerializer .setAppId(in.appId.underlying) .setZoneId(in.zoneId.underlying) .build - } + } */ - override def deserialize(proto: SerializedAppEventProto): SerializedAppEvent = { + override def deserialize(proto: SerializedAppEventProto): SerializedAppEvent = ??? /* { val user = if (proto.hasUser) proto.getUser else null val hp = if (proto.hasReqHostPort) HostPort(proto.getReqHostPort) else HostPort.NoHostPort val appId = if (proto.hasAppId) DalAppId(proto.getAppId) else DalAppId.unknown @@ -107,12 +106,12 @@ object SerializedAppEventSerializer elevatedForUser, receivedAt ) - } + } */ } object SerializedKeySerializer extends BasicProtoSerialization with ProtoSerializer[SerializedKey, SerializedKeyProto] { - override def serialize(key: SerializedKey): SerializedKeyProto = { + override def serialize(key: SerializedKey): SerializedKeyProto = ??? /* { val propertiesProto = ProtoPickleSerializer.propertiesToProto(key.properties.toSeq) SerializedKeyProto.newBuilder .setTypeName(key.typeName) @@ -121,9 +120,9 @@ object SerializedKeySerializer extends BasicProtoSerialization with ProtoSeriali .setRefFilter(key.refFilter) .setProperties(propertiesProto) .build - } + } */ - override def deserialize(proto: SerializedKeyProto): SerializedKey = { + override def deserialize(proto: SerializedKeyProto): SerializedKey = ??? /* { val properties = ProtoPickleSerializer.protoToProperties(proto.getProperties).asInstanceOf[Seq[(String, Any)]] val serializedSizeOpt = Option(proto.getSerializedSize) SerializedKey( @@ -133,7 +132,7 @@ object SerializedKeySerializer extends BasicProtoSerialization with ProtoSeriali proto.getIndexed, proto.getRefFilter, serializedSizeOpt) - } + } */ } object InstantSerializer extends BasicProtoSerialization with ProtoSerializer[Instant, InstantProto] { @@ -153,23 +152,23 @@ object InstantSerializer extends BasicProtoSerialization with ProtoSerializer[In } } - override def deserialize(proto: InstantProto): Instant = { + override def deserialize(proto: InstantProto): Instant = ??? /* { ofEpochSecond(proto.getSeconds, proto.getNano) - } + } */ - override def serialize(instant: Instant): InstantProto = { + override def serialize(instant: Instant): InstantProto = ??? /* { InstantProto.newBuilder .setNano(instant.getNano) .setSeconds(instant.getEpochSecond) .build - } + } */ } object ContextSerializer extends BasicProtoSerialization with ProtoSerializer[Context, ContextProto] { val log = getLogger(this) - override def serialize(context: Context): ContextProto = { + override def serialize(context: Context): ContextProto = ??? /* { val builder = ContextProto.newBuilder (context match { case NamedContext(name) => builder.setName(name).setType(ContextProto.Type.NAMED) @@ -178,9 +177,9 @@ object ContextSerializer extends BasicProtoSerialization with ProtoSerializer[Co case DefaultContext => builder.setType(ContextProto.Type.DEFAULT) case _ => throw new IllegalArgumentException("Invalid context") }).build - } + } */ - override def deserialize(proto: ContextProto): Context = { + override def deserialize(proto: ContextProto): Context = ??? /* { if (proto.hasSharedName()) { SharedContext(proto.getSharedName()) } else if (proto.hasName()) { @@ -190,27 +189,27 @@ object ContextSerializer extends BasicProtoSerialization with ProtoSerializer[Co } else { DefaultContext } - } + } */ } object ChildToParentLinkageSerializer extends BasicProtoSerialization with ProtoSerializer[SerializedEntity.EntityLinkage, SinglePropertyLinkageProto] { - override def serialize(linkage: SerializedEntity.EntityLinkage): SinglePropertyLinkageProto = { + override def serialize(linkage: SerializedEntity.EntityLinkage): SinglePropertyLinkageProto = ??? /* { SinglePropertyLinkageProto.newBuilder.setEntityReference((toProto(linkage.permRef))).build() - } + } */ - override def deserialize(proto: SinglePropertyLinkageProto): SerializedEntity.EntityLinkage = { + override def deserialize(proto: SinglePropertyLinkageProto): SerializedEntity.EntityLinkage = ??? /* { SerializedEntity.EntityLinkage(fromProto(proto.getEntityReference)) - } + } */ } object SerializedEntitySerializer extends BasicProtoSerialization with ProtoSerializer[SerializedEntity, SerializedEntityProto] { - override def serialize(entity: SerializedEntity): SerializedEntityProto = { + override def serialize(entity: SerializedEntity): SerializedEntityProto = ??? /* { val propertiesProto = ProtoPickleSerializer.propertiesToProto(entity.properties) val builder = SerializedEntityProto.newBuilder .setProperties(propertiesProto) @@ -237,9 +236,9 @@ object SerializedEntitySerializer } else builder.setHasLinkages(false) entity.cmid.foreach(ref => builder.setCmRef(toProto(ref))) builder.build - } + } */ - override def deserialize(proto: SerializedEntityProto): SerializedEntity = { + override def deserialize(proto: SerializedEntityProto): SerializedEntity = ??? /* { val properties = ProtoPickleSerializer.protoToProperties(proto.getProperties).asInstanceOf[Map[String, Any]] val keyIterator = proto.getKeysList.asScala.iterator map { fromProto(_) } val keys = ProtoSerialization @@ -269,31 +268,31 @@ object SerializedEntitySerializer inlinedEntites.toSeq, linkages = linkages, slot = slot) - } + } */ } object SerializedBusinessEventWithTTToSerializer extends BasicProtoSerialization with ProtoSerializer[SerializedBusinessEventWithTTTo, SerializedBusinessEventWithTTToProto] { - override def deserialize(proto: SerializedBusinessEventWithTTToProto): SerializedBusinessEventWithTTTo = { + override def deserialize(proto: SerializedBusinessEventWithTTToProto): SerializedBusinessEventWithTTTo = ??? /* { SerializedBusinessEventWithTTTo(fromProto(proto.getBusinessEvent()), fromProto(proto.getTxTime())) - } + } */ - override def serialize(event: SerializedBusinessEventWithTTTo): SerializedBusinessEventWithTTToProto = { + override def serialize(event: SerializedBusinessEventWithTTTo): SerializedBusinessEventWithTTToProto = ??? /* { SerializedBusinessEventWithTTToProto.newBuilder .setBusinessEvent(toProto(event.sbe)) .setTxTime(toProto(event.ttTo)) .build - } + } */ } object PersistentEntitySerializer extends BasicProtoSerialization with ProtoSerializer[PersistentEntity, PersistentEntityProto] { - override def serialize(entity: PersistentEntity): PersistentEntityProto = { + override def serialize(entity: PersistentEntity): PersistentEntityProto = ??? /* { PersistentEntityProto.newBuilder .setSerializedEntity(toProto(entity.serialized)) .setVersionedReference(toProto(entity.versionedRef)) @@ -301,91 +300,91 @@ object PersistentEntitySerializer .setTimeInterval(toProto(entity.txInterval)) .setLockToken(entity.lockToken) .build() - } + } */ - override def deserialize(proto: PersistentEntityProto): PersistentEntity = { + override def deserialize(proto: PersistentEntityProto): PersistentEntity = ??? /* { fromProto(proto.getSerializedEntity).toPersistentEntity( fromProto(proto.getVersionedReference), proto.getLockToken, fromProto(proto.getValidTimeInternal), fromProto(proto.getTimeInterval), None) - } + } */ } object ValidTimeIntervalSerializer extends BasicProtoSerialization with ProtoSerializer[ValidTimeInterval, ValidTimeIntervalProto] { - override def serialize(vti: ValidTimeInterval): ValidTimeIntervalProto = { + override def serialize(vti: ValidTimeInterval): ValidTimeIntervalProto = ??? /* { ValidTimeIntervalProto.newBuilder .setFrom(toProto(vti.from)) .setTo(toProto(vti.to)) .setFixed(false) .build - } + } */ - override def deserialize(proto: ValidTimeIntervalProto): ValidTimeInterval = { + override def deserialize(proto: ValidTimeIntervalProto): ValidTimeInterval = ??? /* { new ValidTimeInterval(fromProto(proto.getFrom), fromProto(proto.getTo)) - } + } */ } object VersionedReferenceSerializer extends BasicProtoSerialization with ProtoSerializer[VersionedReference, VersionedReferenceProto] { - override def serialize(ref: VersionedReference): VersionedReferenceProto = { + override def serialize(ref: VersionedReference): VersionedReferenceProto = ??? /* { VersionedReferenceProto.newBuilder .setData(ByteString.copyFrom(ref.data)) .build - } + } */ - override def deserialize(proto: VersionedReferenceProto): VersionedReference = { + override def deserialize(proto: VersionedReferenceProto): VersionedReference = ??? /* { new VersionedReference(proto.getData.toByteArray) - } + } */ } object StorableReferenceSerializer extends BasicProtoSerialization with ProtoSerializer[StorableReference, StorableReferenceProto] { - override def serialize(ref: StorableReference): StorableReferenceProto = { + override def serialize(ref: StorableReference): StorableReferenceProto = ??? /* { StorableReferenceProto.newBuilder .setData(ByteString.copyFrom(ref.data)) .build - } + } */ - override def deserialize(proto: StorableReferenceProto): StorableReference = { + override def deserialize(proto: StorableReferenceProto): StorableReference = ??? /* { val bytes = proto.getData.toByteArray new StorableReference(bytes) - } + } */ } object EntityTimeSliceReferenceSerializer extends BasicProtoSerialization with ProtoSerializer[EntityTimeSliceReference, EntityTimeSliceReferenceProto] { - override def serialize(ts: EntityTimeSliceReference): EntityTimeSliceReferenceProto = { + override def serialize(ts: EntityTimeSliceReference): EntityTimeSliceReferenceProto = ??? /* { EntityTimeSliceReferenceProto.newBuilder .setEntityRef(toProto(ts.entityRef)) .setTimeSliceNumber(ts.timeSliceNumber) .setIsInfiniteTxtoAtCreation(ts.isInfiniteTxtoAtCreation) .build - } + } */ - override def deserialize(proto: EntityTimeSliceReferenceProto): EntityTimeSliceReference = { + override def deserialize(proto: EntityTimeSliceReferenceProto): EntityTimeSliceReference = ??? /* { new EntityTimeSliceReference( EntityReferenceSerializer.deserialize(proto.getEntityRef), proto.getTimeSliceNumber, proto.getIsInfiniteTxtoAtCreation) - } + } */ } object EntityReferenceSerializer extends BasicProtoSerialization with ProtoSerializer[EntityReference, EntityReferenceProto] { - override def serialize(ref: EntityReference): EntityReferenceProto = { + override def serialize(ref: EntityReference): EntityReferenceProto = ??? /* { val builder = EntityReferenceProto.newBuilder .setData(ByteString.copyFrom(ref.data)) .setTemporary(ref.isTemporary) @@ -395,21 +394,21 @@ object EntityReferenceSerializer } builder.build - } + } */ - override def deserialize(proto: EntityReferenceProto): EntityReference = { + override def deserialize(proto: EntityReferenceProto): EntityReference = ??? /* { val bytes = proto.getData.toByteArray if (proto.hasTemporary && proto.getTemporary) EntityReference.temporary(bytes) else if (proto.hasTypeId) EntityReference.finalTypedRef(bytes, proto.getTypeId) else EntityReference.finalRef(bytes) - } + } */ } object BusinessEventReferenceSerializer extends BasicProtoSerialization with ProtoSerializer[BusinessEventReference, BusinessEventReferenceProto] { - override def serialize(ref: BusinessEventReference): BusinessEventReferenceProto = { + override def serialize(ref: BusinessEventReference): BusinessEventReferenceProto = ??? /* { val builder = BusinessEventReferenceProto.newBuilder .setData(ByteString.copyFrom(ref.data)) @@ -418,56 +417,56 @@ object BusinessEventReferenceSerializer } builder.build - } + } */ - override def deserialize(proto: BusinessEventReferenceProto): BusinessEventReference = { + override def deserialize(proto: BusinessEventReferenceProto): BusinessEventReference = ??? /* { val bytes = proto.getData.toByteArray if (proto.hasTypeId) BusinessEventReference.typedRef(bytes, proto.getTypeId) else new BusinessEventReference(bytes) - } + } */ } object AppEventReferenceSerializer extends BasicProtoSerialization with ProtoSerializer[AppEventReference, AppEventReferenceProto] { - override def serialize(ref: AppEventReference): AppEventReferenceProto = { + override def serialize(ref: AppEventReference): AppEventReferenceProto = ??? /* { AppEventReferenceProto.newBuilder .setData(ByteString.copyFrom(ref.data)) .build - } + } */ - override def deserialize(proto: AppEventReferenceProto): AppEventReference = { + override def deserialize(proto: AppEventReferenceProto): AppEventReference = ??? /* { new AppEventReference(proto.getData.toByteArray) - } + } */ } object CmReferenceSerializer extends BasicProtoSerialization with ProtoSerializer[CmReference, CmReferenceProto] { - override def serialize(ref: CmReference): CmReferenceProto = { + override def serialize(ref: CmReference): CmReferenceProto = ??? /* { CmReferenceProto.newBuilder .setData(ByteString.copyFrom(ref.data)) .build - } + } */ - override def deserialize(proto: CmReferenceProto): CmReference = { + override def deserialize(proto: CmReferenceProto): CmReference = ??? /* { val bytes = proto.getData.toByteArray CmReference(bytes) - } + } */ } object TimeIntervalSerializer extends BasicProtoSerialization with ProtoSerializer[TimeInterval, TimeIntervalProto] { - override def serialize(ti: TimeInterval): TimeIntervalProto = { + override def serialize(ti: TimeInterval): TimeIntervalProto = ??? /* { TimeIntervalProto.newBuilder .setFrom(toProto(ti.from)) .setTo(toProto(ti.to)) .build() - } + } */ - override def deserialize(proto: TimeIntervalProto): TimeInterval = { + override def deserialize(proto: TimeIntervalProto): TimeInterval = ??? /* { new TimeInterval(fromProto(proto.getFrom), fromProto(proto.getTo)) - } + } */ } object PersistentEntitiesWithTemporalContextImplSerializer @@ -478,16 +477,16 @@ object PersistentEntitiesWithTemporalContextImplSerializer // issues and to send entities via GPB from one client side application to another; they are *not* used in the optimus // code for client-server communication! override def deserialize( - proto: PersistentEntityWithTemporalContextProto): PersistentEntitiesWithTemporalContextImpl = { + proto: PersistentEntityWithTemporalContextProto): PersistentEntitiesWithTemporalContextImpl = ??? /* { val entities = proto.getPersistentEntitiesList.asScala.iterator.map { fromProto(_) }.toIndexedSeq val cascaded = proto.getCascadedEntitiesList.asScala.iterator.map { fromProto(_) }.toIndexedSeq val validTime = fromProto(proto.getValidTime) val txTime = fromProto(proto.getTxTime) val clsName = proto.getEntityClassName new PersistentEntitiesWithTemporalContextImpl(entities, validTime, txTime, cascaded, Some(clsName)) - } + } */ - override def serialize(data: PersistentEntitiesWithTemporalContextImpl): PersistentEntityWithTemporalContextProto = { + override def serialize(data: PersistentEntitiesWithTemporalContextImpl): PersistentEntityWithTemporalContextProto = ??? /* { val entitiesProto = data.entities.iterator.map { toProto(_) }.toIndexedSeq val cascadedProto = data.cascadedEntities.iterator.map { toProto(_) }.toIndexedSeq PersistentEntityWithTemporalContextProto.newBuilder @@ -497,14 +496,14 @@ object PersistentEntitiesWithTemporalContextImplSerializer .addAllCascadedEntities(cascadedProto.asJava) .setEntityClassName(data.className) .build - } + } */ } object SerializedBusinessEventSerializer extends BasicProtoSerialization with ProtoSerializer[SerializedBusinessEvent, SerializedBusinessEventProto] { - override def serialize(event: SerializedBusinessEvent): SerializedBusinessEventProto = { + override def serialize(event: SerializedBusinessEvent): SerializedBusinessEventProto = ??? /* { val propertiesProto = ProtoPickleSerializer.propertiesToProto(event.properties) val builder = SerializedBusinessEventProto.newBuilder .setEventRef(toProto(event.id)) @@ -524,9 +523,9 @@ object SerializedBusinessEventSerializer if (event.tt != null) builder.setTxTime(toProto(event.tt)) builder.build - } + } */ - override def deserialize(proto: SerializedBusinessEventProto): SerializedBusinessEvent = { + override def deserialize(proto: SerializedBusinessEventProto): SerializedBusinessEvent = ??? /* { val properties = ProtoPickleSerializer.protoToProperties(proto.getProperties).asInstanceOf[Map[String, Any]] val keys = proto.getKeysList.asScala map { fromProto(_) } val types = proto.getTypesList.asScala @@ -555,38 +554,38 @@ object SerializedBusinessEventSerializer slot = slot, vrefOpt = vref ) - } + } */ } object SlotMapSerializer extends BasicProtoSerialization with ProtoSerializer[SlotMap, SlotMapProto] { - override def serialize(sm: SlotMap): SlotMapProto = { + override def serialize(sm: SlotMap): SlotMapProto = ??? /* { val builder = SlotMapProto.newBuilder val (classNames, slots) = sm.map.unzip builder.addAllFqcns(classNames.asJava) builder.addAllSlots(slots.map(Integer.valueOf(_)).asJava) builder.build - } + } */ - override def deserialize(proto: SlotMapProto): SlotMap = { + override def deserialize(proto: SlotMapProto): SlotMap = ??? /* { val classNames: Iterable[SerializedEntity.TypeRef] = proto.getFqcnsList.asScala val slots: Iterable[Int] = proto.getSlotsList.asScala.map(_.toInt) val map: Map[SerializedEntity.TypeRef, Int] = (classNames.iterator zip slots.iterator).toMap SlotMap(map) - } + } */ } object ClientAppIdentifierSerializer extends GetCommandProtoSerialization with ProtoSerializer[ClientAppIdentifier, ClientAppIdentifierProto] { - override def deserialize(proto: ClientAppIdentifierProto): ClientAppIdentifier = { + override def deserialize(proto: ClientAppIdentifierProto): ClientAppIdentifier = ??? /* { ClientAppIdentifier(DalZoneId(proto.getZoneId()), DalAppId(proto.getAppId())) - } + } */ - override def serialize(appIdentifier: ClientAppIdentifier): ClientAppIdentifierProto = { + override def serialize(appIdentifier: ClientAppIdentifier): ClientAppIdentifierProto = ??? /* { ClientAppIdentifierProto.newBuilder .setZoneId(appIdentifier.zoneId.underlying) .setAppId(appIdentifier.appId.underlying) .build() - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/ChainedIdSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/ChainedIdSerialization.scala index 8d7cfea7..cac49ad1 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/ChainedIdSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/ChainedIdSerialization.scala @@ -24,13 +24,13 @@ trait ChainedIdSerialization extends ProtoSerialization { } object ChainedIdSerializer extends ProtoSerializer[ChainedID, ChainedIdProto] { - final def serialize(chainedId: ChainedID): ChainedIdProto = { + final def serialize(chainedId: ChainedID): ChainedIdProto = ??? /* { ChainedIdProto.newBuilder .addAllData(chainedId.asList) .build - } + } */ - final def deserialize(chainedIdProto: ChainedIdProto): ChainedID = { + final def deserialize(chainedIdProto: ChainedIdProto): ChainedID = ??? /* { ChainedID.fromList(chainedIdProto.getDataList) - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandAppNameTag.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandAppNameTag.scala index bc9d4da5..728feac0 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandAppNameTag.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandAppNameTag.scala @@ -17,15 +17,15 @@ import scala.jdk.CollectionConverters._ final case class CommandAppNameTag(appNameTag: String, commandIndices: Seq[Int]) object CommandAppNameTagSerialization { - final def toProto(commandAppNameTag: CommandAppNameTag): CommandAppNameTagProto = { + final def toProto(commandAppNameTag: CommandAppNameTag): CommandAppNameTagProto = ??? /* { CommandAppNameTagProto.newBuilder .setTag(commandAppNameTag.appNameTag) .addAllCommandIndices(commandAppNameTag.commandIndices map (_.asInstanceOf[Integer]) asJava) .build - } - final def fromProto(commandAppNameTagProto: CommandAppNameTagProto): CommandAppNameTag = { + } */ + final def fromProto(commandAppNameTagProto: CommandAppNameTagProto): CommandAppNameTag = ??? /* { val tag = commandAppNameTagProto.getTag() val indices = commandAppNameTagProto.getCommandIndicesList.asScala.map(_.asInstanceOf[Int]) CommandAppNameTag(tag, indices) - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandLocation.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandLocation.scala index c3e8a911..addf070a 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandLocation.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandLocation.scala @@ -17,15 +17,15 @@ import scala.jdk.CollectionConverters._ final case class CommandLocation(location: String, commandIndices: Seq[Int]) object CommandLocationSerializer { - final def toProto(commandLocation: CommandLocation): CommandLocationProto = { + final def toProto(commandLocation: CommandLocation): CommandLocationProto = ??? /* { CommandLocationProto.newBuilder .setLocation(commandLocation.location) .addAllCommandIndices(commandLocation.commandIndices map (_.asInstanceOf[Integer]) asJava) .build - } - final def fromProto(commandLocationProto: CommandLocationProto): CommandLocation = { + } */ + final def fromProto(commandLocationProto: CommandLocationProto): CommandLocation = ??? /* { val location = commandLocationProto.getLocation() val indices = commandLocationProto.getCommandIndicesList.asScala.map(_.asInstanceOf[Int]) CommandLocation(location, indices) - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandProtoSerialization.scala index 7f40164f..06fae40e 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/CommandProtoSerialization.scala @@ -51,7 +51,7 @@ object ErrorResultSerializer with VersioningProtoSerialization with Log { - override def deserialize(proto: ErrorResultProto): ErrorResult = { + override def deserialize(proto: ErrorResultProto): ErrorResult = ??? /* { val readAfter = if (proto.hasReadAfter) fromProto(proto.getReadAfter) else null val eref = if (proto.hasEntityReference) fromProto(proto.getEntityReference) else null val existingEref = if (proto.hasExistingEntityReference) Some(fromProto(proto.getExistingEntityReference)) else None @@ -120,9 +120,9 @@ object ErrorResultSerializer case _ => new DSISpecificError(proto.getMessage) } ErrorResult(throwable, readAfter) - } + } */ - override def serialize(result: ErrorResult): ErrorResultProto = { + override def serialize(result: ErrorResult): ErrorResultProto = ??? /* { val builder = ErrorResultProto.newBuilder val errorType = result.error match { // case _: DuplicateVersionException => ErrorResultProto.Type.DUPLICATE_VERSION @@ -200,11 +200,11 @@ object ErrorResultSerializer if (message != null) builder.setMessage(message) if (result.readAfter ne null) builder.setReadAfter(toProto(result.readAfter)) builder.build - } + } */ } object CommandSerializer extends CommandProtoSerializationBase with ProtoSerializer[Command, CommandProto] { - def isWriteCommand(c: CommandProto): Boolean = { + def isWriteCommand(c: CommandProto): Boolean = ??? /* { c.getType match { case CommandProto.Type.PUT => true case CommandProto.Type.INVALIDATE_AFTER => true @@ -220,9 +220,9 @@ object CommandSerializer extends CommandProtoSerializationBase with ProtoSeriali case CommandProto.Type.SYSTEM => true case _ => false } - } + } */ - override def serialize(command: Command): CommandProto = { + override def serialize(command: Command): CommandProto = ??? /* { command match { case s: Select => CommandProto.newBuilder.setSelect(toProto(s)).setType(CommandProto.Type.SELECT).build case p: Put => CommandProto.newBuilder.setPut(toProto(p)).setType(CommandProto.Type.PUT).build @@ -402,9 +402,9 @@ object CommandSerializer extends CommandProtoSerializationBase with ProtoSeriali case _ => throw new UnsupportedOperationException(s"Unsupported command in CommandProto serialization: $command.") } - } + } */ - override def deserialize(proto: CommandProto): Command = { + override def deserialize(proto: CommandProto): Command = ??? /* { proto.getType() match { case CommandProto.Type.SELECT => fromProto(proto.getSelect()) case CommandProto.Type.PUT => fromProto(proto.getPut) @@ -463,12 +463,12 @@ object CommandSerializer extends CommandProtoSerializationBase with ProtoSeriali case CommandProto.Type.PUBLISH_TRANSACTION => fromProto(proto.getPublishTransaction) case CommandProto.Type.STREAMS_ACLS_COMMAND => fromProto(proto.getStreamsAclsCommand) } - } + } */ } object ResultSerializer extends CommandProtoSerializationBase with ProtoSerializer[Result, ResultProto] { - override def serialize(result: Result): ResultProto = { + override def serialize(result: Result): ResultProto = ??? /* { val resultBuilder = result match { case s: SelectResult => ResultProto.newBuilder.setSelectResult(toProto(s)).setType(ResultProto.Type.SELECT) case p: PartialSelectResult => @@ -669,9 +669,9 @@ object ResultSerializer extends CommandProtoSerializationBase with ProtoSerializ case _ => } resultBuilder.build - } + } */ - override def deserialize(proto: ResultProto): Result = { + override def deserialize(proto: ResultProto): Result = ??? /* { var result = proto.getType match { case ResultProto.Type.SELECT => fromProto(proto.getSelectResult) case ResultProto.Type.SELECT_PARTIAL => fromProto(proto.getPartialSelectResult) @@ -754,9 +754,9 @@ object ResultSerializer extends CommandProtoSerializationBase with ProtoSerializ } } result - } + } */ - private def reasonFromProto(proto: ResultProto.RedirectionReasonType): RedirectionReason = proto match { + /* private def reasonFromProto(proto: ResultProto.RedirectionReasonType): RedirectionReason = proto match { case ResultProto.RedirectionReasonType.UNKNOWN_REDIRECTION_REASON => RedirectionReason.Unknown case ResultProto.RedirectionReasonType.UNSUPPORTED_QUERY_TYPE => RedirectionReason.QueryTypeNotSupported case ResultProto.RedirectionReasonType.NO_READ_THROUGH => RedirectionReason.PrcReadThroughNotEnabled @@ -791,5 +791,5 @@ object ResultSerializer extends CommandProtoSerializationBase with ProtoSerializ case RedirectionReason.PrcNoBrokersFailure => ResultProto.RedirectionReasonType.PRC_NO_BROKERS_FAILURE case RedirectionReason.PrcReadThroughTimeoutFailure => ResultProto.RedirectionReasonType.PRC_READ_THROUGH_TIMEOUT_FAILURE - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/Dsi.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/Dsi.scala new file mode 100644 index 00000000..dc9b5158 --- /dev/null +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/Dsi.scala @@ -0,0 +1,263 @@ +package optimus.platform.dsi.bitemporal.proto + +object Dsi { + trait MessageLiteImpl extends com.google.protobuf.MessageLite { + def getParserForType(): com.google.protobuf.Parser[_ <: com.google.protobuf.MessageLite] = ??? + def getSerializedSize(): Int = ??? + def newBuilderForType(): com.google.protobuf.MessageLite.Builder = ??? + def toBuilder(): com.google.protobuf.MessageLite.Builder = ??? + def toByteArray(): Array[Byte] = ??? + def toByteString(): com.google.protobuf.ByteString = ??? + def writeDelimitedTo(output: java.io.OutputStream): Unit = ??? + def writeTo(output: java.io.OutputStream): Unit = ??? + def writeTo(output: com.google.protobuf.CodedOutputStream): Unit = ??? + def getDefaultInstanceForType(): com.google.protobuf.MessageLite = ??? + def isInitialized(): Boolean = ??? + } + + class TemporalityProto extends MessageLiteImpl + class PrcClientSessionInfoProto extends MessageLiteImpl + class ContextProto extends MessageLiteImpl + class PrcUserOptionsProto extends MessageLiteImpl + class NonTemporalPrcKeyProto extends MessageLiteImpl + class NormalizedCacheableQueryProto extends MessageLiteImpl + class ChainedIdProto extends MessageLiteImpl + class QueryEntityMetadataProto extends MessageLiteImpl + class QueryEntityMetadataResultProto extends MessageLiteImpl + class EntityMetadataProto extends MessageLiteImpl + class SelectBusinessEventTimelineResultProto extends MessageLiteImpl + class PartialSelectBusinessEventTimelineResultProto extends MessageLiteImpl + class SelectBusinessEventValidTimelineResultProto extends MessageLiteImpl + class SelectBusinessEventValidTimelineLazyLoadResultProto extends MessageLiteImpl + class SerializedAppEventProto extends MessageLiteImpl + class SerializedKeyProto extends MessageLiteImpl + class InstantProto extends MessageLiteImpl + class SinglePropertyLinkageProto extends MessageLiteImpl + class SerializedEntityProto extends MessageLiteImpl + class SerializedBusinessEventWithTTToProto extends MessageLiteImpl + class PersistentEntityProto extends MessageLiteImpl + class ValidTimeIntervalProto extends MessageLiteImpl + class VersionedReferenceProto extends MessageLiteImpl + class StorableReferenceProto extends MessageLiteImpl + class EntityTimeSliceReferenceProto extends MessageLiteImpl + class EntityReferenceProto extends MessageLiteImpl + class BusinessEventReferenceProto extends MessageLiteImpl + class AppEventReferenceProto extends MessageLiteImpl + class CmReferenceProto extends MessageLiteImpl + class TimeIntervalProto extends MessageLiteImpl + class PersistentEntityWithTemporalContextProto extends MessageLiteImpl + class SerializedBusinessEventProto extends MessageLiteImpl + class SlotMapProto extends MessageLiteImpl + class ClientAppIdentifierProto extends MessageLiteImpl + class CommandProto extends MessageLiteImpl + class ResultProto extends MessageLiteImpl + class VersioningResultProto extends MessageLiteImpl + class ErrorResultProto extends MessageLiteImpl + class CountGroupingsProto extends MessageLiteImpl + class CountProto extends MessageLiteImpl + class SelectProto extends MessageLiteImpl + class SelectSpaceProto extends MessageLiteImpl + class SelectSpaceResultRectangleProto extends MessageLiteImpl + class SelectSpaceResultProto extends MessageLiteImpl + class PartialSelectSpaceResultProto extends MessageLiteImpl + class GetAuditInfoProto extends MessageLiteImpl + class EntityAuditInfoProto extends MessageLiteImpl + class SelectBusinesEventByKeyProto extends MessageLiteImpl + class SelectBusinesEventByEventClassProto extends MessageLiteImpl + class SelectBusinesEventByEventRefProto extends MessageLiteImpl + class GetInitiatingEventProto extends MessageLiteImpl + class SelectBusinesEventByEntityRefProto extends MessageLiteImpl + class SelectEntityEventValidTimelineProto extends MessageLiteImpl + class SelectEventTimelineProto extends MessageLiteImpl + class GetEventTransactionsProto extends MessageLiteImpl + class SelectBusinessEventAssociatedEntitiesProto extends MessageLiteImpl + class JarPathProto extends MessageLiteImpl + class ClientMachineIdentifierProto extends MessageLiteImpl + class EstablishSessionProto extends MessageLiteImpl + class TokenProto extends MessageLiteImpl + class EstablishSessionResultProto extends MessageLiteImpl + class TypeProto extends MessageLiteImpl + class SessionTokenRequestProto extends MessageLiteImpl + class CreateNewSessionProto extends MessageLiteImpl + class CreateNewSessionResultProto extends MessageLiteImpl + class DiscoverServicesProto extends MessageLiteImpl + class DiscoverServicesResultProto extends MessageLiteImpl + class ServiceDiscoveryElementProto extends MessageLiteImpl + class ProviderProto extends MessageLiteImpl + class LookupTypeProto extends MessageLiteImpl + class SessionTokenResultProto extends MessageLiteImpl + class HeartbeatProto extends MessageLiteImpl + class HeartbeatResultProto extends MessageLiteImpl + class GetProtoFilePropertiesProto extends MessageLiteImpl + class GetProtoFilePropertiesResultProto extends MessageLiteImpl + class SelectResultProto extends MessageLiteImpl + class ResultStatsProto extends MessageLiteImpl + class GetAuditInfoResultProto extends MessageLiteImpl + class PartialGetAuditInfoResultProto extends MessageLiteImpl + class SelectBusinessEventResultProto extends MessageLiteImpl + class PartialSelectBusinessEventResultProto extends MessageLiteImpl + class SelectBusinessEventWithTTToResultProto extends MessageLiteImpl + class GetInitiatingEventResultProto extends MessageLiteImpl + class PartialSelectResultProto extends MessageLiteImpl + class PrcPartialSelectResultProto extends MessageLiteImpl + class CountResultProto extends MessageLiteImpl + class FeatureInfoProto extends MessageLiteImpl + class GetInfoResultProto extends MessageLiteImpl + class LsqtProto extends MessageLiteImpl + class RoleMembershipQueryProto extends MessageLiteImpl + class CanPerformActionProto extends MessageLiteImpl + class BooleanResultProto extends MessageLiteImpl + class RoleMembershipResultProto extends MessageLiteImpl + class TemporalityQueryCommandProto extends MessageLiteImpl + class TimesFromProto extends MessageLiteImpl + class FromProto extends MessageLiteImpl + class QueryReferenceResultProto extends MessageLiteImpl + class PartialQueryReferenceResultProto extends MessageLiteImpl + class GetRefsNotAtSlotProto extends MessageLiteImpl + class GetRefsNotAtSlotResultProto extends MessageLiteImpl + class GetSlotsProto extends MessageLiteImpl + class GetSlotsResultProto extends MessageLiteImpl + class ExpressionQueryCommandProto extends MessageLiteImpl + class ReferenceQueryProto extends MessageLiteImpl + class EventReferenceQueryProto extends MessageLiteImpl + class SerializedKeyQueryProto extends MessageLiteImpl + class EventSerializedKeyQueryProto extends MessageLiteImpl + class LinkageQueryProto extends MessageLiteImpl + class EntityClassQueryProto extends MessageLiteImpl + class EventClassQueryProto extends MessageLiteImpl + class EntityCmReferenceQueryProto extends MessageLiteImpl + class EventCmReferenceQueryProto extends MessageLiteImpl + class SystemResultProto extends MessageLiteImpl + class SystemProto extends MessageLiteImpl + class ObliterateProto extends MessageLiteImpl + class RolesetModeProto extends MessageLiteImpl + class RolesetProto extends MessageLiteImpl + class NotificationMessageProto extends MessageLiteImpl + class NotifyHeartBeatProto extends MessageLiteImpl + class ResetStateProto extends MessageLiteImpl + class BeginTransactionProto extends MessageLiteImpl + class EndTransactionProto extends MessageLiteImpl + class NotificationEntryProto extends MessageLiteImpl + class ObliterateMessageProto extends MessageLiteImpl + class CreatePubSubStreamProto extends MessageLiteImpl + class ChangeSubscriptionProto extends MessageLiteImpl + class ClosePubSubStreamProto extends MessageLiteImpl + class SubscriptionProto extends MessageLiteImpl + class QueryHolderProto extends MessageLiteImpl + class CreatePubSubStreamSuccessProto extends MessageLiteImpl + class ChangeSubscriptionSuccessProto extends MessageLiteImpl + class ClosePubSubStreamSuccessProto extends MessageLiteImpl + class PubSubSowResultProto extends MessageLiteImpl + class PubSubNotificationProto extends MessageLiteImpl + class PubSubNotificationPartialResultProto extends MessageLiteImpl + class PubSubHeartbeatProto extends MessageLiteImpl + class PartitionToSubIdsMapProto extends MessageLiteImpl + class PubSubStreamEventProto extends MessageLiteImpl + class PubSubGlobalEventProto extends MessageLiteImpl + class EnumerateKeysProto extends MessageLiteImpl + class EnumerateKeysResultProto extends MessageLiteImpl + class EnumerateIndicesProto extends MessageLiteImpl + class EnumerateIndicesResultProto extends MessageLiteImpl + class PartialEnumerateIndicesResultProto extends MessageLiteImpl + class PartialEnumerateKeysResultProto extends MessageLiteImpl + class PublishMessagesProto extends MessageLiteImpl + class PublishTransactionProto extends MessageLiteImpl + class CreateMessagesStreamProto extends MessageLiteImpl + class ChangeMessagesSubscriptionProto extends MessageLiteImpl + class CloseMessagesStreamProto extends MessageLiteImpl + class CommitMessagesStreamProto extends MessageLiteImpl + class PublishMessagesSuccessProto extends MessageLiteImpl + class CreateMessagesStreamSuccessProto extends MessageLiteImpl + class ChangeMessagesSubscriptionSuccessProto extends MessageLiteImpl + class CloseMessagesStreamSuccessProto extends MessageLiteImpl + class MessagesNotificationProto extends MessageLiteImpl + class MessagesNotificationEntryProto extends MessageLiteImpl + class MessagesTransactionNotificationEntryProto extends MessageLiteImpl + class SerializedMessageProto extends MessageLiteImpl + class EntityReferenceToContainedEntityProto extends MessageLiteImpl + class ContainedEntityProto extends MessageLiteImpl + class MessagesSubscriptionProto extends MessageLiteImpl + class SerializedTransactionProto extends MessageLiteImpl + class StreamsACLsCommandProto extends MessageLiteImpl + class StreamsACLsProto extends MessageLiteImpl + class HierarchicalEntitiesProto extends MessageLiteImpl + class StreamsACLsCommandSuccessProto extends MessageLiteImpl + class CommandAppNameTagProto extends MessageLiteImpl + class FieldProto extends MessageLiteImpl + class CommandLocationProto extends MessageLiteImpl + class PartialQueryResultProto extends MessageLiteImpl + class QueryResultProto extends MessageLiteImpl + class ValuesProto extends MessageLiteImpl + class ValueProto extends MessageLiteImpl + class QueryResultMetaDataProto extends MessageLiteImpl + class QueryFieldProto extends MessageLiteImpl + class UOWNotificationProto extends MessageLiteImpl + class PartitionedUOWNotificationProto extends MessageLiteImpl + class PartitionedUOWNotificationKeyProto extends MessageLiteImpl + class UOWApplicationEventProto extends MessageLiteImpl + class AssertValidProto extends MessageLiteImpl + class AssertValidResultProto extends MessageLiteImpl + class PutProto extends MessageLiteImpl + class PutResultProto extends MessageLiteImpl + class AccMetadataCommandProto extends MessageLiteImpl + class AccTableResultProto extends MessageLiteImpl + class ResolveKeysProto extends MessageLiteImpl + class ResolveKeysResultProto extends MessageLiteImpl + class WriteBusinessEventProto extends MessageLiteImpl + class SerializedEntityTupleProto extends MessageLiteImpl + class PutSlotsProto extends MessageLiteImpl + class EntityReferenceTupleProto extends MessageLiteImpl + class WriteBusinessEventResultProto extends MessageLiteImpl + class PutApplicationEventResultProto extends MessageLiteImpl + class PutApplicationEventProto extends MessageLiteImpl + class InvalidateAfterProto extends MessageLiteImpl + class InvalidateAfterResultProto extends MessageLiteImpl + class InvalidateAllCurrentProto extends MessageLiteImpl + class InvalidateAllCurrentResultProto extends MessageLiteImpl + class InvalidateAllCurrentByRefsProto extends MessageLiteImpl + class CreateSlotsProto extends MessageLiteImpl + class CreateSlotsResultProto extends MessageLiteImpl + class FillSlotProto extends MessageLiteImpl + class PathElementProto extends MessageLiteImpl + class SlotRedirectionInfoProto extends MessageLiteImpl + class VersioningRedirectionInfoProto extends MessageLiteImpl + class IsEntitledProto extends MessageLiteImpl + class IsEntitledResultProto extends MessageLiteImpl + class ExpressionProto extends MessageLiteImpl + class EntityBitempSpaceProto extends MessageLiteImpl + class EntityProto extends MessageLiteImpl + class EventProto extends MessageLiteImpl + class LinkageProto extends MessageLiteImpl + class EmbeddableProto extends MessageLiteImpl + class PropertyProto extends MessageLiteImpl + class ConstantProto extends MessageLiteImpl + class BinaryProto extends MessageLiteImpl + class InProto extends MessageLiteImpl + class JoinProto extends MessageLiteImpl + class MemberProto extends MessageLiteImpl + class FunctionProto extends MessageLiteImpl + class UnaryProto extends MessageLiteImpl + class ConditionProto extends MessageLiteImpl + class AggregateProto extends MessageLiteImpl + class ScalarProto extends MessageLiteImpl + class ExistsProto extends MessageLiteImpl + class TypeCodeProto extends MessageLiteImpl + class PropertyDefProto extends MessageLiteImpl + class SortByDefProto extends MessageLiteImpl + class SilverKingTraceIdProto extends MessageLiteImpl + class BitempRangeProto extends MessageLiteImpl + class EntityBusinessEventWithTTToComboProto extends MessageLiteImpl + class EntityBusinessEventComboProto extends MessageLiteImpl + class VersioningResponseProto extends MessageLiteImpl + class TimingsProto extends MessageLiteImpl + object DSIRequestProto { + class Type + } + class DalResponseProto extends MessageLiteImpl + class NamespaceProto extends MessageLiteImpl + class TemporalContextProto extends MessageLiteImpl + class TemporalSurfaceMatcherProto extends MessageLiteImpl + class DSIResponseProto extends MessageLiteImpl + class RelationElementProto extends MessageLiteImpl + class ClassEntityInfoProto extends MessageLiteImpl +} \ No newline at end of file diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/EnumerateCommandProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/EnumerateCommandProtoSerialization.scala index 0c66525a..8677ae64 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/EnumerateCommandProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/EnumerateCommandProtoSerialization.scala @@ -34,7 +34,7 @@ object EnumerateKeysSerializer with ProtoSerializer[EnumerateKeys, EnumerateKeysProto] with Log { - override def deserialize(proto: EnumerateKeysProto): EnumerateKeys = { + override def deserialize(proto: EnumerateKeysProto): EnumerateKeys = ??? /* { // TODO (OPTIMUS-13040): This code is copy-pasted other places :( val temporality = if (proto.hasValidTime && proto.hasTxTime) @@ -62,9 +62,9 @@ object EnumerateKeysSerializer } new EnumerateKeys(proto.getTypeName, proto.getPropertyNameList.asScala.toSeq, temporality) - } + } */ - override def serialize(req: EnumerateKeys): EnumerateKeysProto = { + override def serialize(req: EnumerateKeys): EnumerateKeysProto = ??? /* { import DSIQueryTemporality._ val bld = EnumerateKeysProto.newBuilder @@ -85,7 +85,7 @@ object EnumerateKeysSerializer } builder.build - } + } */ } object EnumerateKeysResultSerializer @@ -93,16 +93,15 @@ object EnumerateKeysResultSerializer with ProtoSerializer[EnumerateKeysResult, EnumerateKeysResultProto] with Log { - override def deserialize(proto: EnumerateKeysResultProto): EnumerateKeysResult = { + override def deserialize(proto: EnumerateKeysResultProto): EnumerateKeysResult = ??? /* { new EnumerateKeysResult(proto.getSerializedKeyList.asScala.iterator.map(fromProto(_)).toIndexedSeq) - } - - override def serialize(res: EnumerateKeysResult): EnumerateKeysResultProto = { + } */ + override def serialize(res: EnumerateKeysResult): EnumerateKeysResultProto = ??? /* { val builder = EnumerateKeysResultProto.newBuilder .addAllSerializedKey((res.keys map { toProto(_) }).asJava) builder.build - } + } */ } object EnumerateIndicesSerializer @@ -110,7 +109,7 @@ object EnumerateIndicesSerializer with ProtoSerializer[EnumerateIndices, EnumerateIndicesProto] with Log { - override def deserialize(proto: EnumerateIndicesProto): EnumerateIndices = { + override def deserialize(proto: EnumerateIndicesProto): EnumerateIndices = ??? /* { // TODO (OPTIMUS-13040): duplicate from fromProto(proto: EnumerateIndicesProto) val temporality = if (proto.hasValidTime && proto.hasTxTime) @@ -138,9 +137,9 @@ object EnumerateIndicesSerializer } new EnumerateIndices(proto.getTypeName, proto.getPropertyNameList.asScala.toSeq, temporality) - } + } */ - override def serialize(req: EnumerateIndices): EnumerateIndicesProto = { + override def serialize(req: EnumerateIndices): EnumerateIndicesProto = ??? /* { // TODO (OPTIMUS-13040): duplicate from toProto(req: EnumerateKeys) import DSIQueryTemporality._ @@ -162,56 +161,56 @@ object EnumerateIndicesSerializer } builder.build - } + } */ } object EnumerateIndicesResultSerializer extends EnumerateCommandProtoSerialization with ProtoSerializer[EnumerateIndicesResult, EnumerateIndicesResultProto] { - override def deserialize(proto: EnumerateIndicesResultProto): EnumerateIndicesResult = { + override def deserialize(proto: EnumerateIndicesResultProto): EnumerateIndicesResult = ??? /* { // TODO (OPTIMUS-13040): duplicate from fromProto(proto: EnumerateKeysResultProto) new EnumerateIndicesResult(proto.getSerializedKeyList.asScala.iterator.map(fromProto(_)).toIndexedSeq) - } + } */ - override def serialize(res: EnumerateIndicesResult): EnumerateIndicesResultProto = { + override def serialize(res: EnumerateIndicesResult): EnumerateIndicesResultProto = ??? /* { // TODO (OPTIMUS-13040): duplicate from toProto(res: EnumerateKeysResult) val builder = EnumerateIndicesResultProto.newBuilder .addAllSerializedKey((res.keys map { toProto(_) }).asJava) builder.build - } + } */ } object PartialEnumerateIndicesResultSerializer extends EnumerateCommandProtoSerialization with ProtoSerializer[PartialEnumerateIndicesResult, PartialEnumerateIndicesResultProto] { - override def deserialize(proto: PartialEnumerateIndicesResultProto): PartialEnumerateIndicesResult = { + override def deserialize(proto: PartialEnumerateIndicesResultProto): PartialEnumerateIndicesResult = ??? /* { val serializedResults = proto.getSerializedKeyList.asScala PartialEnumerateIndicesResult(serializedResults map { fromProto(_) } toSeq, proto.getIsLast()) - } + } */ - override def serialize(result: PartialEnumerateIndicesResult): PartialEnumerateIndicesResultProto = { + override def serialize(result: PartialEnumerateIndicesResult): PartialEnumerateIndicesResultProto = ??? /* { PartialEnumerateIndicesResultProto.newBuilder .addAllSerializedKey((result.keys map { toProto(_) }).asJava) .setIsLast(result.isLast) .build - } + } */ } object PartialEnumerateKeysResultSerializer extends EnumerateCommandProtoSerialization with ProtoSerializer[PartialEnumerateKeysResult, PartialEnumerateKeysResultProto] { - override def deserialize(proto: PartialEnumerateKeysResultProto): PartialEnumerateKeysResult = { + override def deserialize(proto: PartialEnumerateKeysResultProto): PartialEnumerateKeysResult = ??? /* { val serializedResults = proto.getSerializedKeyList.asScala PartialEnumerateKeysResult(serializedResults map { fromProto(_) } toSeq, proto.getIsLast()) - } + } */ - override def serialize(result: PartialEnumerateKeysResult): PartialEnumerateKeysResultProto = { + override def serialize(result: PartialEnumerateKeysResult): PartialEnumerateKeysResultProto = ??? /* { PartialEnumerateKeysResultProto.newBuilder .addAllSerializedKey((result.keys map { toProto(_) }).asJava) .setIsLast(result.isLast) .build - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/EventCommandProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/EventCommandProtoSerialization.scala index c5d714c3..d51fdec3 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/EventCommandProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/EventCommandProtoSerialization.scala @@ -51,7 +51,7 @@ object GetEntityEventTimelineResultSerializer extends EventCommandProtoSerialization with ProtoSerializer[GetEntityEventTimelineResult, SelectBusinessEventTimelineResultProto] { - override def deserialize(proto: SelectBusinessEventTimelineResultProto): GetEntityEventTimelineResult = { + override def deserialize(proto: SelectBusinessEventTimelineResultProto): GetEntityEventTimelineResult = ??? /* { val serializedEvents = proto.getEntityBusinessEventComboList().asScala.toSeq val x = serializedEvents map { k => val be: SerializedBusinessEvent = fromProto(k.getBusinessEvent()) @@ -62,9 +62,9 @@ object GetEntityEventTimelineResultSerializer (be, pe) } GetEntityEventTimelineResult(x) - } + } */ - override def serialize(result: GetEntityEventTimelineResult): SelectBusinessEventTimelineResultProto = { + override def serialize(result: GetEntityEventTimelineResult): SelectBusinessEventTimelineResultProto = ??? /* { val combos = result.eventsEntitiesCombo.map { k => val builder = EntityBusinessEventComboProto.newBuilder.setBusinessEvent(toProto(k._1)) if (k._2.isDefined) @@ -75,7 +75,7 @@ object GetEntityEventTimelineResultSerializer .addAllEntityBusinessEventCombo(combos.asJava) .build - } + } */ } object PartialGetEntityEventTimelineResultSerializer @@ -83,7 +83,7 @@ object PartialGetEntityEventTimelineResultSerializer with ProtoSerializer[PartialGetEntityEventTimelineResult, PartialSelectBusinessEventTimelineResultProto] { override def deserialize( - proto: PartialSelectBusinessEventTimelineResultProto): PartialGetEntityEventTimelineResult = { + proto: PartialSelectBusinessEventTimelineResultProto): PartialGetEntityEventTimelineResult = ??? /* { val serializedEvents = proto.getEntityBusinessEventComboList().asScala.toSeq val x = serializedEvents map { k => val be: SerializedBusinessEvent = fromProto(k.getBusinessEvent()) @@ -94,9 +94,9 @@ object PartialGetEntityEventTimelineResultSerializer (be, pe) } PartialGetEntityEventTimelineResult(x, proto.getIsLast) - } + } */ - override def serialize(result: PartialGetEntityEventTimelineResult): PartialSelectBusinessEventTimelineResultProto = { + override def serialize(result: PartialGetEntityEventTimelineResult): PartialSelectBusinessEventTimelineResultProto = ??? /* { val combos = result.eventsEntitiesCombo.map { k => val builder = EntityBusinessEventComboProto.newBuilder.setBusinessEvent(toProto(k._1)) if (k._2.isDefined) @@ -108,14 +108,14 @@ object PartialGetEntityEventTimelineResultSerializer .setIsLast(result.isLast) .build - } + } */ } object GetEntityEventValidTimelineResultSerializer extends EventCommandProtoSerialization with ProtoSerializer[GetEntityEventValidTimelineResult, SelectBusinessEventValidTimelineResultProto] { - override def deserialize(proto: SelectBusinessEventValidTimelineResultProto): GetEntityEventValidTimelineResult = { + override def deserialize(proto: SelectBusinessEventValidTimelineResultProto): GetEntityEventValidTimelineResult = ??? /* { val serializedEvents = proto.getEntityBusinessEventComboList().asScala.toSeq val x = serializedEvents map { k => val be = @@ -129,9 +129,9 @@ object GetEntityEventValidTimelineResultSerializer (be, pe) } GetEntityEventValidTimelineResult(x) - } + } */ - override def serialize(result: GetEntityEventValidTimelineResult): SelectBusinessEventValidTimelineResultProto = { + override def serialize(result: GetEntityEventValidTimelineResult): SelectBusinessEventValidTimelineResultProto = ??? /* { val combos = result.eventsEntitiesCombo.map { k => val builder = EntityBusinessEventWithTTToComboProto.newBuilder if (k._1.isDefined) builder.setBusinessEvent(toProto(k._1.get)) @@ -142,7 +142,7 @@ object GetEntityEventValidTimelineResultSerializer .addAllEntityBusinessEventCombo(combos.asJava) .build - } + } */ } object GetEntityEventValidTimelineLazyLoadResultSerializer @@ -152,7 +152,7 @@ object GetEntityEventValidTimelineLazyLoadResultSerializer SelectBusinessEventValidTimelineLazyLoadResultProto] { override def deserialize( - proto: SelectBusinessEventValidTimelineLazyLoadResultProto): GetEntityEventValidTimelineLazyLoadResult = { + proto: SelectBusinessEventValidTimelineLazyLoadResultProto): GetEntityEventValidTimelineLazyLoadResult = ??? /* { val brefVtfs = proto.getBusinessEventValidTimeFromComboList().asScala.toSeq val x = brefVtfs map { c => val bref = @@ -163,10 +163,10 @@ object GetEntityEventValidTimelineLazyLoadResultSerializer (bref, vtf) } GetEntityEventValidTimelineLazyLoadResult(x) - } + } */ override def serialize( - result: GetEntityEventValidTimelineLazyLoadResult): SelectBusinessEventValidTimelineLazyLoadResultProto = { + result: GetEntityEventValidTimelineLazyLoadResult): SelectBusinessEventValidTimelineLazyLoadResultProto = ??? /* { val combos = result.brefVtfsCombo.map { k => val builder = BusinessEventValidTimeFromComboProto.newBuilder if (k._1.isDefined) builder.setBusinessEvent(toProto(k._1.get)) @@ -177,5 +177,5 @@ object GetEntityEventValidTimelineLazyLoadResultSerializer .addAllBusinessEventValidTimeFromCombo(combos.asJava) .build - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/GetCommandProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/GetCommandProtoSerialization.scala index 90224134..9b5d6332 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/GetCommandProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/GetCommandProtoSerialization.scala @@ -12,7 +12,7 @@ package optimus.platform.dsi.bitemporal.proto import com.google.protobuf.ByteString -import msjava.base.com.google.flatbuffers.FlatBufferBuilder.HeapByteBufferFactory +// import msjava.base.com.google.flatbuffers.FlatBufferBuilder.HeapByteBufferFactory import msjava.slf4jutils.scalalog.getLogger import net.jpountz.lz4.LZ4Factory import optimus.dsi.base.RegisteredIndexConfig @@ -111,7 +111,7 @@ private[proto] trait GetCommandProtoSerialization extends QueryProtoSerializatio implicit def dsrSerializer: ProtoSerializer[DiscoverServicesResult, DiscoverServicesResultProto] = DiscoverServicesResultSerializer - final def fromProto(proto: QueryDataType): DALDataType.DALDataType = { + /* final def fromProto(proto: QueryDataType): DALDataType.DALDataType = { val dalDataType = if (proto == QueryDataType.BUSINESS_EVENT) DALDataType.BusinessEvent @@ -122,7 +122,7 @@ private[proto] trait GetCommandProtoSerialization extends QueryProtoSerializatio final def toProto(req: DALDataType.DALDataType): QueryDataType = { val data = if (DALDataType.BusinessEvent == req) QueryDataType.BUSINESS_EVENT else QueryDataType.ENTITY data - } + } */ final def fromProto(proto: EstablishSessionResultProto) = EstablishSessionResultSerializer.deserialize(proto) final def toProto(result: EstablishSessionResult) = EstablishSessionResultSerializer.serialize(result) @@ -131,7 +131,7 @@ private[proto] trait GetCommandProtoSerialization extends QueryProtoSerializatio object CountGroupingsSerializer extends GetCommandProtoSerialization with ProtoSerializer[CountGroupings, CountGroupingsProto] { - override def serialize(count: CountGroupings): CountGroupingsProto = { + override def serialize(count: CountGroupings): CountGroupingsProto = ??? /* { val bld = CountGroupingsProto.newBuilder val builder = count.query match { case q: EntityClassQuery => bld.setEntityClassQuery(toProto(q)) @@ -140,9 +140,9 @@ object CountGroupingsSerializer throw new UnsupportedOperationException(s"CountGroupingsProto serialization for query $q not supported.") } builder.setReadTxTime(toProto(count.readTxTime)).build() - } + } */ - override def deserialize(proto: CountGroupingsProto): CountGroupings = { + override def deserialize(proto: CountGroupingsProto): CountGroupings = ??? /* { val query = if (proto.hasEntityClassQuery) fromProto(proto.getEntityClassQuery) @@ -152,7 +152,7 @@ object CountGroupingsSerializer throw new UnsupportedOperationException CountGroupings(query, fromProto(proto.getReadTxTime)) - } + } */ } object CountSerializer @@ -161,7 +161,7 @@ object CountSerializer with DSIQueryTemporalitySerialization { protected override val log = getLogger(this) - override def serialize(count: Count): CountProto = { + override def serialize(count: Count): CountProto = ??? /* { val bld = CountProto.newBuilder val builder = count.temporality match { @@ -182,9 +182,9 @@ object CountSerializer case _ => throw new UnsupportedOperationException(s"CountProto serialization for query ${count.query} not supported.") }).build - } + } */ - override def deserialize(proto: CountProto): Count = { + override def deserialize(proto: CountProto): Count = ??? /* { val query = if (proto.hasEntityClassQuery) fromProto(proto.getEntityClassQuery) @@ -198,7 +198,7 @@ object CountSerializer val temporality = getTemporality(proto) Count(query, temporality) - } + } */ } object SelectSerializer @@ -207,7 +207,7 @@ object SelectSerializer with DSIQueryTemporalitySerialization { protected override val log = getLogger(this) - override def serialize(select: Select): SelectProto = { + override def serialize(select: Select): SelectProto = ??? /* { val bld = SelectProto.newBuilder val builder = select.temporality match { @@ -238,9 +238,9 @@ object SelectSerializer case _: EventClassQuery | _: EventReferenceQuery | _: EntityClassAppIdUserIdQuery => throw new UnsupportedOperationException(s"SelectProto serialization for query ${select.query} not supported.") }).build - } + } */ - override def deserialize(proto: SelectProto): Select = { + override def deserialize(proto: SelectProto): Select = ??? /* { val query = if (proto.hasReferenceQuery) fromProto(proto.getReferenceQuery) @@ -262,7 +262,7 @@ object SelectSerializer val temporality = getTemporality(proto) Select(query, temporality) - } + } */ } object SelectSpaceSerializer @@ -271,7 +271,7 @@ object SelectSpaceSerializer with DSIQueryTemporalitySerialization { protected override val log = getLogger(this) - override def serialize(cmd: SelectSpace): SelectSpaceProto = { + override def serialize(cmd: SelectSpace): SelectSpaceProto = ??? /* { val bld = SelectSpaceProto.newBuilder val builder = cmd.temporality match { @@ -306,9 +306,9 @@ object SelectSpaceSerializer } builder.build() - } + } */ - override def deserialize(proto: SelectSpaceProto): SelectSpace = { + override def deserialize(proto: SelectSpaceProto): SelectSpace = ??? /* { val temporality = getTemporality(proto) val query = if (proto.hasReferenceQuery) fromProto(proto.getReferenceQuery) @@ -323,48 +323,48 @@ object SelectSpaceSerializer } else throw new UnsupportedOperationException(s"Cannot deserialize SelectSpace command due to unknown query type") SelectSpace(query, temporality) - } + } */ } object SelectSpaceRectangleSerializer extends GetCommandProtoSerialization with ProtoSerializer[SelectSpaceResult.Rectangle, SelectSpaceResultRectangleProto] { - override def deserialize(proto: SelectSpaceResultRectangleProto): SelectSpaceResult.Rectangle = { + override def deserialize(proto: SelectSpaceResultRectangleProto): SelectSpaceResult.Rectangle = ??? /* { SelectSpaceResult.Rectangle( txInterval = fromProto(proto.getTimeInterval), vtInterval = fromProto(proto.getValidTimeInterval), vref = fromProto(proto.getVersionedReference), eref = fromProto(proto.getEntityReference) ) - } - override def serialize(obj: SelectSpaceResult.Rectangle): SelectSpaceResultRectangleProto = { + } */ + override def serialize(obj: SelectSpaceResult.Rectangle): SelectSpaceResultRectangleProto = ??? /* { SelectSpaceResultRectangleProto.newBuilder .setTimeInterval(toProto(obj.txInterval)) .setValidTimeInterval(toProto(obj.vtInterval)) .setVersionedReference(toProto(obj.vref)) .setEntityReference(toProto(obj.eref)) .build() - } + } */ } object SelectSpaceResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[SelectSpaceResult, SelectSpaceResultProto] { - override def serialize(res: SelectSpaceResult): SelectSpaceResultProto = { + override def serialize(res: SelectSpaceResult): SelectSpaceResultProto = ??? /* { val rects = res.value.map { SelectSpaceRectangleSerializer.serialize } SelectSpaceResultProto.newBuilder.addAllRectangles(rects.asJava).build() - } + } */ - override def deserialize(proto: SelectSpaceResultProto): SelectSpaceResult = { + override def deserialize(proto: SelectSpaceResultProto): SelectSpaceResult = ??? /* { val rects = proto.getRectanglesList.asScala.map { SelectSpaceRectangleSerializer.deserialize } SelectSpaceResult(rects) - } + } */ } object PartialSelectSpaceResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[PartialSelectSpaceResult, PartialSelectSpaceResultProto] { - override def serialize(res: PartialSelectSpaceResult): PartialSelectSpaceResultProto = { + override def serialize(res: PartialSelectSpaceResult): PartialSelectSpaceResultProto = ??? /* { val rects = res.value.map { case SelectSpaceResult.Rectangle(txInterval, vtInterval, vref, eref, _) => SelectSpaceResultRectangleProto.newBuilder .setTimeInterval(toProto(txInterval)) @@ -374,9 +374,9 @@ object PartialSelectSpaceResultSerializer .build() } PartialSelectSpaceResultProto.newBuilder.addAllRectangles(rects.asJava).setIsLast(res.isLast).build() - } + } */ - override def deserialize(proto: PartialSelectSpaceResultProto): PartialSelectSpaceResult = { + override def deserialize(proto: PartialSelectSpaceResultProto): PartialSelectSpaceResult = ??? /* { val rects = proto.getRectanglesList.asScala.map { rect => SelectSpaceResult.Rectangle( txInterval = fromProto(rect.getTimeInterval), @@ -386,7 +386,7 @@ object PartialSelectSpaceResultSerializer ) } PartialSelectSpaceResult(rects, proto.getIsLast) - } + } */ } object GetAuditInfoSerializer @@ -395,7 +395,7 @@ object GetAuditInfoSerializer with DSIQueryTemporalitySerialization { protected override val log = getLogger(this) - override def serialize(getAuditInfo: GetAuditInfo): GetAuditInfoProto = { + override def serialize(getAuditInfo: GetAuditInfo): GetAuditInfoProto = ??? /* { val bld = GetAuditInfoProto.newBuilder val builder = getAuditInfo.temporality match { @@ -413,9 +413,9 @@ object GetAuditInfoSerializer val bd = builder.setEntityReference(toProto(getAuditInfo.entityRef)) (bd.setClassName(getAuditInfo.clazzName)).build() - } + } */ - override def deserialize(proto: GetAuditInfoProto): GetAuditInfo = { + override def deserialize(proto: GetAuditInfoProto): GetAuditInfo = ??? /* { val entityRef = if (proto.hasEntityReference) fromProto(proto.getEntityReference) @@ -432,13 +432,13 @@ object GetAuditInfoSerializer "" GetAuditInfo(entityRef, className, temporality) - } + } */ } object EntityAuditInfoSerializer extends GetCommandProtoSerialization with ProtoSerializer[EntityAuditInfo, EntityAuditInfoProto] { - override def serialize(auditInfo: EntityAuditInfo): EntityAuditInfoProto = { + override def serialize(auditInfo: EntityAuditInfo): EntityAuditInfoProto = ??? /* { val builder = EntityAuditInfoProto.newBuilder .setEffectiveUser(auditInfo.effectiveUser) .setRealUser(auditInfo.realUser) @@ -449,9 +449,9 @@ object EntityAuditInfoSerializer auditInfo.reqId.foreach(builder.setRequestUuid) auditInfo.zoneId.foreach(builder.setZoneId) builder.build - } + } */ - override def deserialize(proto: EntityAuditInfoProto): EntityAuditInfo = { + override def deserialize(proto: EntityAuditInfoProto): EntityAuditInfo = ??? /* { EntityAuditInfo( if (proto.hasRealUser) proto.getRealUser else proto.getEffectiveUser, if (proto.hasVersionedReference) Some(fromProto(proto.getVersionedReference)) else None, @@ -462,152 +462,152 @@ object EntityAuditInfoSerializer if (proto.hasRequestUuid) Some(proto.getRequestUuid) else None, if (proto.hasZoneId) Some(proto.getZoneId) else None ) - } + } */ } object GetBusinessEventByKeySerializer extends GetCommandProtoSerialization with ProtoSerializer[GetBusinessEventByKey, SelectBusinesEventByKeyProto] { - override def serialize(byKey: GetBusinessEventByKey): SelectBusinesEventByKeyProto = { + override def serialize(byKey: GetBusinessEventByKey): SelectBusinesEventByKeyProto = ??? /* { SelectBusinesEventByKeyProto.newBuilder .setSerializedKey(toProto(byKey.key)) .setReadTxTime(toProto(byKey.tt)) .build - } + } */ - override def deserialize(proto: SelectBusinesEventByKeyProto): GetBusinessEventByKey = { + override def deserialize(proto: SelectBusinesEventByKeyProto): GetBusinessEventByKey = ??? /* { GetBusinessEventByKey(fromProto(proto.getSerializedKey()), fromProto(proto.getReadTxTime())) - } + } */ } object GetBusinessEventsByClassSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetBusinessEventsByClass, SelectBusinesEventByEventClassProto] { - override def serialize(byClass: GetBusinessEventsByClass): SelectBusinesEventByEventClassProto = { + override def serialize(byClass: GetBusinessEventsByClass): SelectBusinesEventByEventClassProto = ??? /* { SelectBusinesEventByEventClassProto.newBuilder .setEventClassQuery(toProto(byClass.eventClassQuery)) .setReadTxTime(toProto(byClass.tt)) .build - } + } */ - override def deserialize(proto: SelectBusinesEventByEventClassProto): GetBusinessEventsByClass = { + override def deserialize(proto: SelectBusinesEventByEventClassProto): GetBusinessEventsByClass = ??? /* { GetBusinessEventsByClass(fromProto(proto.getEventClassQuery()), fromProto(proto.getReadTxTime())) - } + } */ } object GetBusinessEventSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetBusinessEvent, SelectBusinesEventByEventRefProto] { - override def serialize(byEventRef: GetBusinessEvent): SelectBusinesEventByEventRefProto = { + override def serialize(byEventRef: GetBusinessEvent): SelectBusinesEventByEventRefProto = ??? /* { SelectBusinesEventByEventRefProto.newBuilder .setEventReference(toProto(byEventRef.ref)) .setReadTxTime(toProto(byEventRef.tt)) .build - } + } */ - override def deserialize(proto: SelectBusinesEventByEventRefProto): GetBusinessEvent = { + override def deserialize(proto: SelectBusinesEventByEventRefProto): GetBusinessEvent = ??? /* { GetBusinessEvent(fromProto(proto.getEventReference()), fromProto(proto.getReadTxTime())) - } + } */ } object GetInitiatingEventSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetInitiatingEvent, GetInitiatingEventProto] { - override def serialize(gie: GetInitiatingEvent): GetInitiatingEventProto = { + override def serialize(gie: GetInitiatingEvent): GetInitiatingEventProto = ??? /* { GetInitiatingEventProto.newBuilder .setEntityReference(toProto(gie.ref)) .setReadVtTime(toProto(gie.vt)) .setReadTxTime(toProto(gie.tt)) .build - } + } */ - override def deserialize(proto: GetInitiatingEventProto): GetInitiatingEvent = { + override def deserialize(proto: GetInitiatingEventProto): GetInitiatingEvent = ??? /* { GetInitiatingEvent( fromProto(proto.getEntityReference), fromProto(proto.getReadVtTime), fromProto(proto.getReadTxTime)) - } + } */ } object GetEntityEventTimelineSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetEntityEventTimeline, SelectBusinesEventByEntityRefProto] { - override def serialize(byEntityRef: GetEntityEventTimeline): SelectBusinesEventByEntityRefProto = { + override def serialize(byEntityRef: GetEntityEventTimeline): SelectBusinesEventByEntityRefProto = ??? /* { SelectBusinesEventByEntityRefProto.newBuilder .setEntityReference(toProto(byEntityRef.ref)) .setReadTxTime(toProto(byEntityRef.tt)) .build - } + } */ - override def deserialize(proto: SelectBusinesEventByEntityRefProto): GetEntityEventTimeline = { + override def deserialize(proto: SelectBusinesEventByEntityRefProto): GetEntityEventTimeline = ??? /* { GetEntityEventTimeline(fromProto(proto.getEntityReference()), fromProto(proto.getReadTxTime())) - } + } */ } object GetEntityEventValidTimelineSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetEntityEventValidTimeline, SelectEntityEventValidTimelineProto] { - override def serialize(byEntityRef: GetEntityEventValidTimeline): SelectEntityEventValidTimelineProto = { + override def serialize(byEntityRef: GetEntityEventValidTimeline): SelectEntityEventValidTimelineProto = ??? /* { val builder = SelectEntityEventValidTimelineProto.newBuilder builder.setEntityReference(toProto(byEntityRef.ref)) builder.setReadTxTime(toProto(byEntityRef.tt)) if (byEntityRef.validTimeInterval.isDefined) builder.setValidTimeInterval(toProto(byEntityRef.validTimeInterval.get)) builder.build - } + } */ - override def deserialize(proto: SelectEntityEventValidTimelineProto): GetEntityEventValidTimeline = { + override def deserialize(proto: SelectEntityEventValidTimelineProto): GetEntityEventValidTimeline = ??? /* { GetEntityEventValidTimeline( fromProto(proto.getEntityReference()), fromProto(proto.getReadTxTime()), if (proto.hasValidTimeInterval) Some(fromProto(proto.getValidTimeInterval)) else None ) - } + } */ } object GetEventTimelineSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetEventTimeline, SelectEventTimelineProto] { - override def serialize(byEventRef: GetEventTimeline): SelectEventTimelineProto = { + override def serialize(byEventRef: GetEventTimeline): SelectEventTimelineProto = ??? /* { SelectEventTimelineProto.newBuilder .setEventReference(toProto(byEventRef.ref)) .setReadTxTime(toProto(byEventRef.tt)) .build - } + } */ - override def deserialize(proto: SelectEventTimelineProto): GetEventTimeline = { + override def deserialize(proto: SelectEventTimelineProto): GetEventTimeline = ??? /* { GetEventTimeline(fromProto(proto.getEventReference()), fromProto(proto.getReadTxTime())) - } + } */ } object GetEventTransactionsSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetEventTransactions, GetEventTransactionsProto] { - override def serialize(eventWithTt: GetEventTransactions): GetEventTransactionsProto = { + override def serialize(eventWithTt: GetEventTransactions): GetEventTransactionsProto = ??? /* { GetEventTransactionsProto.newBuilder .setEventReference(toProto(eventWithTt.ref)) .setReadTxTime(toProto(eventWithTt.tt)) .build - } + } */ - override def deserialize(proto: GetEventTransactionsProto): GetEventTransactions = { + override def deserialize(proto: GetEventTransactionsProto): GetEventTransactions = ??? /* { GetEventTransactions(fromProto(proto.getEventReference), fromProto(proto.getReadTxTime)) - } + } */ } object GetAssociatedEntitiesSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetAssociatedEntities, SelectBusinessEventAssociatedEntitiesProto] { - override def serialize(byEventRef: GetAssociatedEntities): SelectBusinessEventAssociatedEntitiesProto = { + override def serialize(byEventRef: GetAssociatedEntities): SelectBusinessEventAssociatedEntitiesProto = ??? /* { val builder = SelectBusinessEventAssociatedEntitiesProto.newBuilder builder.setEventReference(toProto(byEventRef.ref)) builder.setReadVtTime(toProto(byEventRef.vt)) @@ -616,20 +616,20 @@ object GetAssociatedEntitiesSerializer builder.setTypeName(byEventRef.typeName.get) builder.build - } + } */ - override def deserialize(proto: SelectBusinessEventAssociatedEntitiesProto): GetAssociatedEntities = { + override def deserialize(proto: SelectBusinessEventAssociatedEntitiesProto): GetAssociatedEntities = ??? /* { GetAssociatedEntities( fromProto(proto.getEventReference()), fromProto(proto.getReadVtTime()), fromProto(proto.getReadTxTime()), if (proto.hasTypeName) Some(proto.getTypeName) else None ) - } + } */ } object JarPathSerializer extends ProtoSerializer[ExistingNonStorableJarPath, JarPathProto] { - override def serialize(jp: ExistingNonStorableJarPath): JarPathProto = { + override def serialize(jp: ExistingNonStorableJarPath): JarPathProto = ??? /* { val builder = JarPathProto.newBuilder jp match { case AbsoluteJarPath(p) => @@ -643,17 +643,17 @@ object JarPathSerializer extends ProtoSerializer[ExistingNonStorableJarPath, Jar builder.setPath(rp) } builder.build() - } + } */ - override def deserialize(proto: JarPathProto): ExistingNonStorableJarPath = proto.getType() match { + override def deserialize(proto: JarPathProto): ExistingNonStorableJarPath = ??? /* proto.getType() match { case JarPathProto.Type.ABSOLUTE => AbsoluteJarPath(proto.getPath) case JarPathProto.Type.MPR => MprJarPath(proto.getMetaproject, proto.getProject, proto.getRelease, proto.getPath) - } + } */ } object ClientMachineIdentifierSerializer extends ProtoSerializer[ClientMachineIdentifier, ClientMachineIdentifierProto] { - override def serialize(clientMachineIdentifier: ClientMachineIdentifier): ClientMachineIdentifierProto = { + override def serialize(clientMachineIdentifier: ClientMachineIdentifier): ClientMachineIdentifierProto = ??? /* { val proto: ClientMachineIdentifierProto.Builder = ClientMachineIdentifierProto.newBuilder() clientMachineIdentifier match { case UnremarkableClientMachine => @@ -668,9 +668,9 @@ object ClientMachineIdentifierSerializer proto.setPort(cm.hostport.port.underlying) } proto.build - } + } */ - override def deserialize(proto: ClientMachineIdentifierProto): ClientMachineIdentifier = { + override def deserialize(proto: ClientMachineIdentifierProto): ClientMachineIdentifier = ??? /* { proto.getType match { case cm if cm.equals(ClientMachineIdentifierProto.Type.TREADMILL) => TreadmillNode(TreadmillApp(proto.getTreadmillApp), TreadmillInstanceId(proto.getTreadmillInstanceId)) @@ -679,18 +679,18 @@ object ClientMachineIdentifierSerializer } case _ => UnremarkableClientMachine } - } + } */ } object EstablishSessionSerializer extends GetCommandProtoSerialization with ProtoSerializer[(Int, EstablishSession), EstablishSessionProto] { - def deserializeTxTime(proto: EstablishSessionProto): Option[Instant] = { + def deserializeTxTime(proto: EstablishSessionProto): Option[Instant] = ??? /* { if (proto.hasEstablishmentTime) Some(fromProto(proto.getEstablishmentTime)) else None - } + } */ - override def deserialize(proto: EstablishSessionProto): (Int, EstablishSession) = { + override def deserialize(proto: EstablishSessionProto): (Int, EstablishSession) = ??? /* { val appIdentifier = fromProto(proto.getApplicationIdentifier()) val context = fromProto(proto.getContext()) val features = proto.getFeatureIdentifiersList().asScala map { Feature.fromValue(_) } @@ -738,9 +738,9 @@ object EstablishSessionSerializer clientPath, clientMachineIdentifier )) - } + } */ - override def serialize(commandAndId: (Int, EstablishSession)): EstablishSessionProto = { + override def serialize(commandAndId: (Int, EstablishSession)): EstablishSessionProto = ??? /* { val (sessionId, command) = commandAndId val builder = EstablishSessionProto.newBuilder() builder.setSessionIdentifier(sessionId) @@ -769,14 +769,14 @@ object EstablishSessionSerializer builder.setClientMachineIdentifierProto(toProto(command.sessionInfo.clientMachineIdentifier)) builder.setEstablishAllRoles(command.establishAllRoles) builder.build() - } + } */ } object EstablishSessionResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[EstablishSessionResult, EstablishSessionResultProto] { - override def deserialize(proto: EstablishSessionResultProto): EstablishSessionResult = { + override def deserialize(proto: EstablishSessionResultProto): EstablishSessionResult = ??? /* { if (proto.hasFailureType) { val failureType = proto.getFailureType match { case EstablishSessionResultProto.FailureType.GENERIC => EstablishSessionFailure.Type.Generic @@ -850,9 +850,9 @@ object EstablishSessionResultSerializer if (proto.hasProfileKeyHash) Some(ProfileKeyHash(proto.getProfileKeyHash.toByteArray)) else None ) } - } + } */ - override def serialize(result: EstablishSessionResult): EstablishSessionResultProto = { + override def serialize(result: EstablishSessionResult): EstablishSessionResultProto = ??? /* { val builder = EstablishSessionResultProto.newBuilder() result match { case EstablishSessionSuccess( @@ -942,7 +942,7 @@ object EstablishSessionResultSerializer builder.setErrorMessage(message) } builder.build() - } + } */ } // converts Array of classname strings to a single compressed bytestring and back @@ -1004,7 +1004,7 @@ object SessionTokenRequestSerializer extends GetCommandProtoSerialization with ProtoSerializer[SessionTokenRequest, SessionTokenRequestProto] { - override def deserialize(proto: SessionTokenRequestProto): SessionTokenRequest = { + override def deserialize(proto: SessionTokenRequestProto): SessionTokenRequest = ??? /* { val effectiveID = if (proto.hasEffectiveId) Some(proto.getEffectiveId) else None val appID = if (proto.hasAppId) Some(proto.getAppId) else None val realID = if (proto.hasRealId) Some(proto.getRealId) else None @@ -1014,9 +1014,9 @@ object SessionTokenRequestSerializer val token = if (proto.hasEncryptedSessionToken) Some(proto.getEncryptedSessionToken.toByteArray) else None val fi = if (proto.hasFeatureInfo) fromProto(proto.getFeatureInfo()) else ProtoFileProperties.NO_FEATURE_INFO SessionTokenRequest(roles, realID, effectiveID, appID, token, fi) - } + } */ - override def serialize(command: SessionTokenRequest): SessionTokenRequestProto = { + override def serialize(command: SessionTokenRequest): SessionTokenRequestProto = ??? /* { val builder = SessionTokenRequestProto.newBuilder() // TODO (OPTIMUS-13040): once the multiple roles change has propagated to all environments // we can remove the optional role from dsi.proto and just use the repeated roles instead. @@ -1028,59 +1028,59 @@ object SessionTokenRequestSerializer if (command.token != None) builder.setEncryptedSessionToken(ByteString.copyFrom(command.token.get)) builder.setFeatureInfo(toProto(command.featureInfo)) builder.build() - } + } */ } object CreateNewSessionSerializer extends GetCommandProtoSerialization with ProtoSerializer[CreateNewSession, CreateNewSessionProto] { - override def deserialize(proto: CreateNewSessionProto): CreateNewSession = { + override def deserialize(proto: CreateNewSessionProto): CreateNewSession = ??? /* { val es = fromProto(proto.getEstablishSession) match { case (_, es) => es } CreateNewSession(es) - } - override def serialize(command: CreateNewSession): CreateNewSessionProto = { + } */ + override def serialize(command: CreateNewSession): CreateNewSessionProto = ??? /* { // This session is not supposed to be used by client so setting -1 as session id val esProto = toProto((-1, command.es)) CreateNewSessionProto.newBuilder().setEstablishSession(esProto).build() - } + } */ } object CreateNewSessionResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[CreateNewSessionResult, CreateNewSessionResultProto] { - override def deserialize(proto: CreateNewSessionResultProto): CreateNewSessionResult = { + override def deserialize(proto: CreateNewSessionResultProto): CreateNewSessionResult = ??? /* { val esr = fromProto(proto.getEstablishSessionResult) CreateNewSessionResult(esr) - } - override def serialize(result: CreateNewSessionResult): CreateNewSessionResultProto = { + } */ + override def serialize(result: CreateNewSessionResult): CreateNewSessionResultProto = ??? /* { val esrProto = toProto(result.esr) CreateNewSessionResultProto.newBuilder().setEstablishSessionResult(esrProto).build() - } + } */ } object DiscoverServicesSerializer extends GetCommandProtoSerialization with ProtoSerializer[DiscoverServices, DiscoverServicesProto] { - override def serialize(ds: DiscoverServices): DiscoverServicesProto = { + override def serialize(ds: DiscoverServices): DiscoverServicesProto = ??? /* { val builder = DiscoverServicesProto.newBuilder() builder.setEstablishSession(toProto(-1 -> ds.establishSession)) builder.setDalEnv(ds.env.underlying) ds.sysLoc.foreach(builder.setSysLoc) builder.build() - } + } */ - override def deserialize(proto: DiscoverServicesProto): DiscoverServices = { + override def deserialize(proto: DiscoverServicesProto): DiscoverServices = ??? /* { val (_, es) = fromProto(proto.getEstablishSession) val env = DalEnv(proto.getDalEnv) val sysLocOpt = if (proto.hasSysLoc) Some(proto.getSysLoc) else None DiscoverServices(es, env, sysLocOpt) - } + } */ } object DiscoverServicesResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[DiscoverServicesResult, DiscoverServicesResultProto] { - override def serialize(dsr: DiscoverServicesResult): DiscoverServicesResultProto = { + override def serialize(dsr: DiscoverServicesResult): DiscoverServicesResultProto = ??? /* { val builder = DiscoverServicesResultProto.newBuilder dsr match { case dss: DiscoverServicesSuccess => @@ -1098,9 +1098,9 @@ object DiscoverServicesResultSerializer builder.setFailureMessage(gf.msg) } builder.build() - } + } */ - override def deserialize(proto: DiscoverServicesResultProto): DiscoverServicesResult = { + override def deserialize(proto: DiscoverServicesResultProto): DiscoverServicesResult = ??? /* { if (proto.hasFailureType) { proto.getFailureType match { case DiscoverServicesResultProto.FailureType.GENERIC => @@ -1120,12 +1120,12 @@ object DiscoverServicesResultSerializer val ess = fromProto(proto.getEstablishSessionResult).asInstanceOf[EstablishSessionSuccess] DiscoverServicesSuccess(services, ess) } - } + } */ } object ServiceDiscoveryElementSerializer extends ProtoSerializer[ServiceDiscoveryElement, ServiceDiscoveryElementProto] { - override def serialize(elem: ServiceDiscoveryElement): ServiceDiscoveryElementProto = { + override def serialize(elem: ServiceDiscoveryElement): ServiceDiscoveryElementProto = ??? /* { val builder = ServiceDiscoveryElementProto.newBuilder val serviceTypeProto = elem.serviceType match { case DalServiceType.Read => ServiceDiscoveryElementProto.ServiceType.READ @@ -1154,9 +1154,9 @@ object ServiceDiscoveryElementSerializer elem.partition.foreach(ptn => builder.setPartitionName(ptn.name)) builder.setLookup(elem.lookupStr) builder.build() - } + } */ - override def deserialize(proto: ServiceDiscoveryElementProto): ServiceDiscoveryElement = { + override def deserialize(proto: ServiceDiscoveryElementProto): ServiceDiscoveryElement = ??? /* { def unknownValue(tpe: String): Nothing = throw new IllegalArgumentException(s"Cannot deserialize service discovery element due to unknown $tpe") @@ -1188,14 +1188,14 @@ object ServiceDiscoveryElementSerializer if (proto.hasPartitionName) Some(PartitionHelper.getPartitionForString(proto.getPartitionName)) else None val lookup = proto.getLookup ServiceDiscoveryElement(serviceType, serviceProvider, lookupType, partition, lookup) - } + } */ } object SessionTokenResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[SessionTokenResult, SessionTokenResultProto] { - override def deserialize(proto: SessionTokenResultProto): SessionTokenResult = { + override def deserialize(proto: SessionTokenResultProto): SessionTokenResult = ??? /* { val realID = if (proto.hasRealId) Some(proto.getRealId) else None val roles = proto.getRolesList.asScala SessionTokenResult( @@ -1204,40 +1204,40 @@ object SessionTokenResultSerializer proto.getEncryptedSessionToken().toByteArray(), (if (proto.hasFeatureInfo) fromProto(proto.getFeatureInfo) else ProtoFileProperties.NO_FEATURE_INFO) ) - } + } */ - override def serialize(command: SessionTokenResult): SessionTokenResultProto = { + override def serialize(command: SessionTokenResult): SessionTokenResultProto = ??? /* { val builder = SessionTokenResultProto.newBuilder().setEncryptedSessionToken(ByteString.copyFrom(command.encryptedToken)) builder.addAllRoles(command.roles.asJava) if (command.realID.isDefined) builder.setRealId(command.realID.get) builder.setFeatureInfo(toProto(command.featureInfo)) builder.build() - } + } */ } object HeartbeatSerializer extends GetCommandProtoSerialization with ProtoSerializer[Heartbeat, HeartbeatProto] { - override def deserialize(proto: HeartbeatProto): Heartbeat = { + override def deserialize(proto: HeartbeatProto): Heartbeat = ??? /* { Heartbeat(proto.getUuid(), fromProto(proto.getSentTime())) - } + } */ - override def serialize(command: Heartbeat): HeartbeatProto = { + override def serialize(command: Heartbeat): HeartbeatProto = ??? /* { HeartbeatProto.newBuilder().setUuid(command.uuid).setSentTime(toProto(command.sentTime)).build() - } + } */ } object HeartbeatResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[HeartbeatResult, HeartbeatResultProto] { - override def deserialize(proto: HeartbeatResultProto): HeartbeatResult = { + override def deserialize(proto: HeartbeatResultProto): HeartbeatResult = ??? /* { HeartbeatResult(fromProto(proto.getReceiveTime())) - } + } */ - override def serialize(command: HeartbeatResult): HeartbeatResultProto = { + override def serialize(command: HeartbeatResult): HeartbeatResultProto = ??? /* { HeartbeatResultProto.newBuilder().setReceiveTime(toProto(command.receiveTime)).build() - } + } */ } object GetProtoFilePropertiesSerializer @@ -1246,13 +1246,13 @@ object GetProtoFilePropertiesSerializer val allowSendingGetProtoFileProperties = java.lang.Boolean.getBoolean("optimus.platform.dsi.allowSendingGetProtoFileProperties") - override def deserialize(proto: GetProtoFilePropertiesProto): GetProtoFileProperties = { + override def deserialize(proto: GetProtoFilePropertiesProto): GetProtoFileProperties = ??? /* { GetProtoFileProperties( proto.getLocalProtoFileVersion, (if (proto.hasClientFeature) fromProto(proto.getClientFeature) else ProtoFileProperties.NO_FEATURE_INFO)) - } + } */ - override def serialize(command: GetProtoFileProperties): GetProtoFilePropertiesProto = { + override def serialize(command: GetProtoFileProperties): GetProtoFilePropertiesProto = ??? /* { if (allowSendingGetProtoFileProperties) { GetProtoFilePropertiesProto .newBuilder() @@ -1262,47 +1262,47 @@ object GetProtoFilePropertiesSerializer } else throw new UnsupportedOperationException( "Sending a GetProtoFileProperties is no longer supported. This should not have happened.") - } + } */ } object GetProtoFilePropertiesResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetProtoFilePropertiesResult, GetProtoFilePropertiesResultProto] { - override def deserialize(proto: GetProtoFilePropertiesResultProto): GetProtoFilePropertiesResult = { + override def deserialize(proto: GetProtoFilePropertiesResultProto): GetProtoFilePropertiesResult = ??? /* { GetProtoFilePropertiesResult( proto.getRemoteProtoFileVersion(), (if (proto.hasRemoteFeature) fromProto(proto.getRemoteFeature) else ProtoFileProperties.NO_FEATURE_INFO)) - } + } */ - override def serialize(command: GetProtoFilePropertiesResult): GetProtoFilePropertiesResultProto = { + override def serialize(command: GetProtoFilePropertiesResult): GetProtoFilePropertiesResultProto = ??? /* { GetProtoFilePropertiesResultProto .newBuilder() .setRemoteProtoFileVersion(command.remoteProtoFileVersionNum) .setRemoteFeature(toProto(command.featureInfo)) .build - } + } */ } object SelectResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[SelectResult, SelectResultProto] { - override def deserialize(proto: SelectResultProto): SelectResult = { + override def deserialize(proto: SelectResultProto): SelectResult = ??? /* { val serializedResults = proto.getPersistentEntityList.asScala.toSeq SelectResult(serializedResults map { fromProto(_) }) - } + } */ - override def serialize(result: SelectResult): SelectResultProto = { + override def serialize(result: SelectResult): SelectResultProto = ??? /* { SelectResultProto.newBuilder .addAllPersistentEntity((result.value map { toProto(_) } toSeq).asJava) .build - } + } */ } object ResultStatsSerializer extends GetCommandProtoSerialization with ProtoSerializer[ResultStats, ResultStatsProto] { - override def deserialize(proto: ResultStatsProto): ResultStats = { + override def deserialize(proto: ResultStatsProto): ResultStats = ??? /* { val resultStats = if (proto.hasType) { proto.getType match { case ResultStatsProto.Type.StringStats => @@ -1320,9 +1320,9 @@ object ResultStatsSerializer extends GetCommandProtoSerialization with ProtoSeri resultStats.attachPartitions( proto.getPartitionNamesList.asScala.iterator.map(PartitionHelper.getPartitionForString).toSet) resultStats - } + } */ - override def serialize(stats: ResultStats): ResultStatsProto = { + override def serialize(stats: ResultStats): ResultStatsProto = ??? /* { val builder = ResultStatsProto.newBuilder stats match { @@ -1347,134 +1347,134 @@ object ResultStatsSerializer extends GetCommandProtoSerialization with ProtoSeri } stats.getPartitions.foreach(p => builder.addPartitionNames(p.name)) builder.build() - } + } */ } object GetAuditInfoResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetAuditInfoResult, GetAuditInfoResultProto] { - override def deserialize(proto: GetAuditInfoResultProto): GetAuditInfoResult = { + override def deserialize(proto: GetAuditInfoResultProto): GetAuditInfoResult = ??? /* { val serializedAuditInfo = proto.getAuditInfoList.asScala.toSeq GetAuditInfoResult(serializedAuditInfo map { fromProto(_) }) - } + } */ - override def serialize(result: GetAuditInfoResult): GetAuditInfoResultProto = { + override def serialize(result: GetAuditInfoResult): GetAuditInfoResultProto = ??? /* { GetAuditInfoResultProto.newBuilder .addAllAuditInfo((result.value map { toProto(_) } toSeq).asJava) .build - } + } */ } object PartialGetAuditInfoResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[PartialGetAuditInfoResult, PartialGetAuditInfoResultProto] { - override def deserialize(proto: PartialGetAuditInfoResultProto): PartialGetAuditInfoResult = { + override def deserialize(proto: PartialGetAuditInfoResultProto): PartialGetAuditInfoResult = ??? /* { val serializedAuditInfo = proto.getAuditInfoList.asScala.toSeq PartialGetAuditInfoResult(serializedAuditInfo map { fromProto(_) }, proto.getIsLast) - } + } */ - override def serialize(result: PartialGetAuditInfoResult): PartialGetAuditInfoResultProto = { + override def serialize(result: PartialGetAuditInfoResult): PartialGetAuditInfoResultProto = ??? /* { PartialGetAuditInfoResultProto.newBuilder .addAllAuditInfo((result.value map { toProto(_) } toSeq).asJava) .setIsLast(result.isLast) .build - } + } */ } object GetBusinessEventResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetBusinessEventResult, SelectBusinessEventResultProto] { - override def deserialize(proto: SelectBusinessEventResultProto): GetBusinessEventResult = { + override def deserialize(proto: SelectBusinessEventResultProto): GetBusinessEventResult = ??? /* { val serializedEvents = proto.getBusinessEventList().asScala.toSeq GetBusinessEventResult(serializedEvents map { fromProto(_) }) - } + } */ - override def serialize(result: GetBusinessEventResult): SelectBusinessEventResultProto = { + override def serialize(result: GetBusinessEventResult): SelectBusinessEventResultProto = ??? /* { SelectBusinessEventResultProto.newBuilder .addAllBusinessEvent((result.events map { toProto(_) } toSeq).asJava) .build - } + } */ } object PartialGetBusinessEventResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[PartialGetBusinessEventResult, PartialSelectBusinessEventResultProto] { - override def deserialize(proto: PartialSelectBusinessEventResultProto): PartialGetBusinessEventResult = { + override def deserialize(proto: PartialSelectBusinessEventResultProto): PartialGetBusinessEventResult = ??? /* { val serializedEvents = proto.getBusinessEventList().asScala.toSeq PartialGetBusinessEventResult(serializedEvents map { fromProto(_) }, proto.getIsLast) - } + } */ - override def serialize(result: PartialGetBusinessEventResult): PartialSelectBusinessEventResultProto = { + override def serialize(result: PartialGetBusinessEventResult): PartialSelectBusinessEventResultProto = ??? /* { PartialSelectBusinessEventResultProto.newBuilder .addAllBusinessEvent((result.events map { toProto(_) } toSeq).asJava) .setIsLast(result.isLast) .build - } + } */ } object GetBusinessEventWithTTToResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetBusinessEventWithTTToResult, SelectBusinessEventWithTTToResultProto] { - override def deserialize(proto: SelectBusinessEventWithTTToResultProto): GetBusinessEventWithTTToResult = { + override def deserialize(proto: SelectBusinessEventWithTTToResultProto): GetBusinessEventWithTTToResult = ??? /* { val serializedEvents = proto.getBusinessEventList().asScala.toSeq GetBusinessEventWithTTToResult(serializedEvents map { fromProto(_) }) - } + } */ - override def serialize(result: GetBusinessEventWithTTToResult): SelectBusinessEventWithTTToResultProto = { + override def serialize(result: GetBusinessEventWithTTToResult): SelectBusinessEventWithTTToResultProto = ??? /* { SelectBusinessEventWithTTToResultProto.newBuilder .addAllBusinessEvent((result.events map { toProto(_) } toSeq).asJava) .build - } + } */ } object GetInitiatingEventResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetInitiatingEventResult, GetInitiatingEventResultProto] { - override def deserialize(proto: GetInitiatingEventResultProto): GetInitiatingEventResult = { + override def deserialize(proto: GetInitiatingEventResultProto): GetInitiatingEventResult = ??? /* { val eventOpt = if (proto.hasBusinessEvent) Some(fromProto(proto.getBusinessEvent)) else None val entityOpt = if (proto.hasPersistentEntity) Some(fromProto(proto.getPersistentEntity)) else None GetInitiatingEventResult(eventOpt, entityOpt) - } + } */ - override def serialize(result: GetInitiatingEventResult): GetInitiatingEventResultProto = { + override def serialize(result: GetInitiatingEventResult): GetInitiatingEventResultProto = ??? /* { val GetInitiatingEventResult(eventOpt, entityOpt) = result val builder = GetInitiatingEventResultProto.newBuilder eventOpt.foreach(event => builder.setBusinessEvent(toProto(event))) entityOpt.foreach(entity => builder.setPersistentEntity(toProto(entity))) builder.build - } + } */ } object PartialSelectResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[PartialSelectResult, PartialSelectResultProto] { - override def deserialize(proto: PartialSelectResultProto): PartialSelectResult = { + override def deserialize(proto: PartialSelectResultProto): PartialSelectResult = ??? /* { val serializedResults: mutable.Seq[PersistentEntityProto] = proto.getPersistentEntityList.asScala // PersistentEntityProto - contain entityRef strings // -> ProtoSerializationFrom#fromProto -> BasicProtoSer#deserialize -> ... BPS#des:247 : SerializedEntity PartialSelectResult(serializedResults map { fromProto(_) }, proto.getLast()) - } + } */ - override def serialize(result: PartialSelectResult): PartialSelectResultProto = { + override def serialize(result: PartialSelectResult): PartialSelectResultProto = ??? /* { PartialSelectResultProto.newBuilder .addAllPersistentEntity((result.value map { toProto(_) }).asJava) .setLast(result.isLast) .build - } + } */ } object PrcPartialSelectResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[PrcPartialSelectResult, PrcPartialSelectResultProto] { - override def deserialize(proto: PrcPartialSelectResultProto): PrcPartialSelectResult = { + override def deserialize(proto: PrcPartialSelectResultProto): PrcPartialSelectResult = ??? /* { require(proto.hasUnderlying, "PrcPartialSelectResultProto should have the underlying PartialSelectResult") val pss = fromProto(proto.getUnderlying) val txInterval = fromProto(proto.getTxInterval) @@ -1490,9 +1490,9 @@ object PrcPartialSelectResultSerializer } .toMap PrcPartialSelectResult(pss, vtInterval, txInterval, lsqtMap) - } + } */ - override def serialize(result: PrcPartialSelectResult): PrcPartialSelectResultProto = { + override def serialize(result: PrcPartialSelectResult): PrcPartialSelectResultProto = ??? /* { val builder = PrcPartialSelectResultProto.newBuilder builder.setUnderlying(toProto(result.underlying)) builder.setTxInterval(toProto(result.txInterval)) @@ -1502,41 +1502,41 @@ object PrcPartialSelectResultSerializer builder.addLsqtMapValues(toProto(lsqt)) } builder.build() - } + } */ } object CountResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[CountResult, CountResultProto] { - override def deserialize(proto: CountResultProto): CountResult = { + override def deserialize(proto: CountResultProto): CountResult = ??? /* { new CountResult(proto.getNumber()) - } + } */ - override def serialize(res: CountResult): CountResultProto = { + override def serialize(res: CountResult): CountResultProto = ??? /* { CountResultProto.newBuilder .setNumber(res.number) .build - } + } */ } object FeatureInfoSerializer extends GetCommandProtoSerialization with ProtoSerializer[FeatureInfo, FeatureInfoProto] { - override def deserialize(proto: FeatureInfoProto): FeatureInfo = { + override def deserialize(proto: FeatureInfoProto): FeatureInfo = ??? /* { FeatureInfo(proto.getFeatureBuild, proto.getFeatureInfoTag) - } + } */ - override def serialize(fInfo: FeatureInfo): FeatureInfoProto = { + override def serialize(fInfo: FeatureInfo): FeatureInfoProto = ??? /* { FeatureInfoProto.newBuilder .setFeatureBuild(fInfo.build) .setFeatureInfoTag(fInfo.infoTag) .build - } + } */ } object GetInfoResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetInfoResult, GetInfoResultProto] { - override def deserialize(proto: GetInfoResultProto): GetInfoResult = { + override def deserialize(proto: GetInfoResultProto): GetInfoResult = ??? /* { import optimus.dsi.partitioning.PartitionHelper._ val fi = if (proto.hasServerFeature) fromProto(proto.getServerFeature) else ProtoFileProperties.NO_FEATURE_INFO @@ -1547,18 +1547,18 @@ object GetInfoResultSerializer (tlc.getSystemName, fromProto(tlc.getTime)) }.toMap GetInfoResult(fromProto(proto.getServerTime), fi, timeLordClocks, partitionLsqtMap) - } + } */ - override def serialize(res: GetInfoResult): GetInfoResultProto = { + override def serialize(res: GetInfoResult): GetInfoResultProto = ??? /* { GetInfoResultProto.newBuilder .setServerTime(toProto(res.serverTime)) .setServerFeature(toProto(res.featureInfo)) .addAllTimelordClocks(serializeTimeLordClocks(res.timeLordClocks)) .addAllPartitionLsqts(serializeLsqtMap(res.partitionLsqtMap)) .build - } + } */ - private def serializeTimeLordClocks(timeLordClocks: Map[String, Instant]): java.lang.Iterable[TimelordClockProto] = { + /* private def serializeTimeLordClocks(timeLordClocks: Map[String, Instant]): java.lang.Iterable[TimelordClockProto] = { val tlcProtos = timeLordClocks.map { case (systemName, time) => TimelordClockProto.newBuilder .setSystemName(systemName) @@ -1578,28 +1578,28 @@ object GetInfoResultSerializer } partitionLsqtProto.asJava - } + } */ } object RoleMembershipQuerySerializer extends GetCommandProtoSerialization with ProtoSerializer[RoleMembershipQuery, RoleMembershipQueryProto] { - override def deserialize(proto: RoleMembershipQueryProto): RoleMembershipQuery = { + override def deserialize(proto: RoleMembershipQueryProto): RoleMembershipQuery = ??? /* { new RoleMembershipQuery(proto.getRealId) - } - override def serialize(cmd: RoleMembershipQuery): RoleMembershipQueryProto = { + } */ + override def serialize(cmd: RoleMembershipQuery): RoleMembershipQueryProto = ??? /* { RoleMembershipQueryProto.newBuilder .setRealId(cmd.realId) .build - } + } */ } object CanPerformActionSerializer extends GetCommandProtoSerialization with ProtoSerializer[CanPerformAction, CanPerformActionProto] { - val protoActionMappings = Map( + /* val protoActionMappings = Map( CanPerformActionProto.ActionType.READ -> EntityAction.Read, CanPerformActionProto.ActionType.CREATE -> EntityAction.Create, CanPerformActionProto.ActionType.UPDATE -> EntityAction.Update, @@ -1608,46 +1608,46 @@ object CanPerformActionSerializer val actionProtoMappings = protoActionMappings .map { case (proto, action) => action -> proto } - .toMap[EntityAction, CanPerformActionProto.ActionType] + .toMap[EntityAction, CanPerformActionProto.ActionType] */ - override def deserialize(proto: CanPerformActionProto): CanPerformAction = { + override def deserialize(proto: CanPerformActionProto): CanPerformAction = ??? /* { new CanPerformAction(proto.getTypeRef, protoActionMappings(proto.getAction)) - } - override def serialize(cmd: CanPerformAction): CanPerformActionProto = { + } */ + override def serialize(cmd: CanPerformAction): CanPerformActionProto = ??? /* { CanPerformActionProto.newBuilder .setTypeRef(cmd.typeRef) .setAction(actionProtoMappings(cmd.action)) .build - } + } */ } object BooleanResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[BooleanResult, BooleanResultProto] { - override def deserialize(proto: BooleanResultProto): BooleanResult = { + override def deserialize(proto: BooleanResultProto): BooleanResult = ??? /* { new BooleanResult(proto.getValue) - } - override def serialize(cmd: BooleanResult): BooleanResultProto = { + } */ + override def serialize(cmd: BooleanResult): BooleanResultProto = ??? /* { BooleanResultProto.newBuilder .setValue(cmd.value) .build - } + } */ } object RoleMembershipResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[RoleMembershipResult, RoleMembershipResultProto] { - override def deserialize(proto: RoleMembershipResultProto): RoleMembershipResult = { + override def deserialize(proto: RoleMembershipResultProto): RoleMembershipResult = ??? /* { new RoleMembershipResult(proto.getRoleIdList.asScala.toSet) - } + } */ - override def serialize(res: RoleMembershipResult): RoleMembershipResultProto = { + override def serialize(res: RoleMembershipResult): RoleMembershipResultProto = ??? /* { RoleMembershipResultProto.newBuilder .addAllRoleId(res.roleIds.asJava) .build - } + } */ } object TemporalityQueryCommandSerializer @@ -1656,7 +1656,7 @@ object TemporalityQueryCommandSerializer with ProtoSerializer[TemporalityQueryCommand, TemporalityQueryCommandProto] { protected override val log = getLogger(this) - override def deserialize(proto: TemporalityQueryCommandProto): TemporalityQueryCommand = { + override def deserialize(proto: TemporalityQueryCommandProto): TemporalityQueryCommand = ??? /* { val temporality = getTemporality(proto) val queryDataType = fromProto(proto.getDataType()) @@ -1673,9 +1673,9 @@ object TemporalityQueryCommandSerializer queryResultType, proto.getTreeVersion() )() - } + } */ - override def serialize(req: TemporalityQueryCommand): TemporalityQueryCommandProto = { + override def serialize(req: TemporalityQueryCommand): TemporalityQueryCommandProto = ??? /* { // TODO (OPTIMUS-13040): duplicate from toProto(req: EnumerateKeys) val queryDataType = toProto(req.dataType) @@ -1707,7 +1707,7 @@ object TemporalityQueryCommandSerializer } builder.build - } + } */ } trait QueryReferenceResultSerialization { @@ -1733,7 +1733,7 @@ object QueryReferenceResultSerializer with ProtoSerializer[QueryReferenceResult, QueryReferenceResultProto] with QueryReferenceResultSerialization { - override def deserialize(proto: QueryReferenceResultProto): QueryReferenceResult = { + override def deserialize(proto: QueryReferenceResultProto): QueryReferenceResult = ??? /* { val dataType = fromProto(proto.getDataType) val typeIds = proto.getTypeIdList().asScala val refList = proto.getReferenceList().asScala @@ -1748,9 +1748,9 @@ object QueryReferenceResultSerializer val vrefsFromProto = proto.getVersionedRefList.asScala.map(v => Some(fromProto(v))) val refWithTxTimesAndVref = getRefWithTxTimesAndVref(refs, txTimesFromProto, vrefsFromProto) QueryReferenceResult(dataType, refWithTxTimesAndVref) - } + } */ - override def serialize(result: QueryReferenceResult): QueryReferenceResultProto = { + override def serialize(result: QueryReferenceResult): QueryReferenceResultProto = ??? /* { val (refs, optionTxTimes, vrefs) = result.refs.unzip3 require(optionTxTimes.forall(_.isDefined)) val txTimes = optionTxTimes.map(_.get) @@ -1765,7 +1765,7 @@ object QueryReferenceResultSerializer .addAllTxTime(txTimeList) .addAllVersionedRef(vrefsList) .build - } + } */ } object PartialQueryReferenceResultSerializer @@ -1773,7 +1773,7 @@ object PartialQueryReferenceResultSerializer with ProtoSerializer[PartialQueryReferenceResult, PartialQueryReferenceResultProto] with QueryReferenceResultSerialization { - override def deserialize(proto: PartialQueryReferenceResultProto): PartialQueryReferenceResult = { + override def deserialize(proto: PartialQueryReferenceResultProto): PartialQueryReferenceResult = ??? /* { val dataType = fromProto(proto.getDataType) val typeIds = proto.getTypeIdList().asScala val refList = proto.getReferenceList().asScala @@ -1788,9 +1788,9 @@ object PartialQueryReferenceResultSerializer val vrefsFromProto = proto.getVersionedRefList.asScala.map(v => Some(fromProto(v))) val refWithTxTimesAndVref = getRefWithTxTimesAndVref(refs, txTimesFromProto, vrefsFromProto) PartialQueryReferenceResult(dataType, refWithTxTimesAndVref, proto.getIsLast) - } + } */ - override def serialize(result: PartialQueryReferenceResult): PartialQueryReferenceResultProto = { + override def serialize(result: PartialQueryReferenceResult): PartialQueryReferenceResultProto = ??? /* { val (refs, optionTxTimes, vrefs) = result.refs.unzip3 require(optionTxTimes.forall(_.isDefined)) val txTimes = optionTxTimes.map(_.get) @@ -1809,7 +1809,7 @@ object PartialQueryReferenceResultSerializer .addAllTypeId(typeIdsList) .setIsLast(result.isLast) .build - } + } */ } object GetRefsNotAtSlotSerializer @@ -1818,7 +1818,7 @@ object GetRefsNotAtSlotSerializer with DSIQueryTemporalitySerialization { protected val log = getLogger(this) - override def deserialize(proto: GetRefsNotAtSlotProto): GetRefsNotAtSlot = { + override def deserialize(proto: GetRefsNotAtSlotProto): GetRefsNotAtSlot = ??? /* { val temporality = getTemporality(proto) val query = if (proto.hasReferenceQuery) fromProto(proto.getReferenceQuery) @@ -1829,9 +1829,9 @@ object GetRefsNotAtSlotSerializer val slot = proto.getSlot val fqcn = proto.getFqcn GetRefsNotAtSlot(query, fqcn, slot, temporality) - } + } */ - override def serialize(cmd: GetRefsNotAtSlot): GetRefsNotAtSlotProto = { + override def serialize(cmd: GetRefsNotAtSlot): GetRefsNotAtSlotProto = ??? /* { val builder = GetRefsNotAtSlotProto.newBuilder // TODO (OPTIMUS-13040): this needs refactoring out (copied and pasted) cmd.temporality match { @@ -1856,18 +1856,18 @@ object GetRefsNotAtSlotSerializer builder.setSlot(cmd.slot) builder.setFqcn(cmd.fqcn) builder.build - } + } */ } object GetRefsNotAtSlotResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetRefsNotAtSlotResult, GetRefsNotAtSlotResultProto] { - override def deserialize(proto: GetRefsNotAtSlotResultProto): GetRefsNotAtSlotResult = { + override def deserialize(proto: GetRefsNotAtSlotResultProto): GetRefsNotAtSlotResult = ??? /* { val refs = proto.getEntityReferencesList.asScala.map(r => EntityReference(r.getData.toByteArray)) GetRefsNotAtSlotResult(refs) - } + } */ - override def serialize(result: GetRefsNotAtSlotResult): GetRefsNotAtSlotResultProto = { + override def serialize(result: GetRefsNotAtSlotResult): GetRefsNotAtSlotResultProto = ??? /* { val entityRefs = Iterable.newBuilder[EntityReferenceProto] result.refs.foreach { case er: EntityReference => entityRefs += toProto(er) @@ -1876,44 +1876,44 @@ object GetRefsNotAtSlotResultSerializer s"Unsupported reference ${o.toString} of type ${o.getClass.getName} in GetRefsNotAtSlot result set") } GetRefsNotAtSlotResultProto.newBuilder.addAllEntityReferences(entityRefs.result().asJava).build - } + } */ } object GetSlotsSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetSlots, GetSlotsProto] { - override def serialize(cmd: GetSlots): GetSlotsProto = { + override def serialize(cmd: GetSlots): GetSlotsProto = ??? /* { val builder = GetSlotsProto.newBuilder builder.setClassName(cmd.fqcn) builder.build - } + } */ - override def deserialize(proto: GetSlotsProto): GetSlots = { + override def deserialize(proto: GetSlotsProto): GetSlots = ??? /* { val className = proto.getClassName GetSlots(className) - } + } */ } object GetSlotsResultSerializer extends GetCommandProtoSerialization with ProtoSerializer[GetSlotsResult, GetSlotsResultProto] { - override def deserialize(proto: GetSlotsResultProto): GetSlotsResult = { + override def deserialize(proto: GetSlotsResultProto): GetSlotsResult = ??? /* { val slots = proto.getSlotsList.asScala.map(_.toInt).toSet new GetSlotsResult(slots) - } + } */ - override def serialize(res: GetSlotsResult): GetSlotsResultProto = { + override def serialize(res: GetSlotsResult): GetSlotsResultProto = ??? /* { val builder = GetSlotsResultProto.newBuilder if (res.slots.nonEmpty) builder.addAllSlots((res.slots.map(Integer.valueOf(_))).asJava) builder.build() - } + } */ } object ExpressionQuerySerializer extends GetCommandProtoSerialization with ExpressionSerialization with ProtoSerializer[ExpressionQueryCommand, ExpressionQueryCommandProto] { - import ExpressionQueryCommandProto.{QueryPlan => QueryPlanProto} + // import ExpressionQueryCommandProto.{QueryPlan => QueryPlanProto} - override def serialize(command: ExpressionQueryCommand): ExpressionQueryCommandProto = { + override def serialize(command: ExpressionQueryCommand): ExpressionQueryCommandProto = ??? /* { val plan = command.plan match { case QueryPlan.Accelerated => QueryPlanProto.ACCELERATED case QueryPlan.FullTextSearch => QueryPlanProto.FULLTEXTSEARCH @@ -1925,9 +1925,9 @@ object ExpressionQuerySerializer .setPlan(plan) .setEntitledOnly(command.entitledOnly) .build - } + } */ - override def deserialize(proto: ExpressionQueryCommandProto): ExpressionQueryCommand = { + override def deserialize(proto: ExpressionQueryCommandProto): ExpressionQueryCommand = ??? /* { val plan = proto.getPlan match { case QueryPlanProto.ACCELERATED => QueryPlan.Accelerated case QueryPlanProto.FULLTEXTSEARCH => QueryPlan.FullTextSearch @@ -1935,5 +1935,5 @@ object ExpressionQuerySerializer case QueryPlanProto.SAMPLING => QueryPlan.Sampling } ExpressionQueryCommand(fromProto(proto.getQuery), plan, proto.getEntitledOnly) - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/IsEntitledProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/IsEntitledProtoSerialization.scala index 7556198d..de456026 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/IsEntitledProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/IsEntitledProtoSerialization.scala @@ -23,26 +23,26 @@ object IsEntitledProtoSerialization extends CommandProtoSerializationBase with ProtoSerializer[IsEntitled, IsEntitledProto] { - override def deserialize(proto: IsEntitledProto): IsEntitled = { + override def deserialize(proto: IsEntitledProto): IsEntitled = ??? /* { IsEntitled(fromProto(proto.getCmd)) - } + } */ - override def serialize(write: IsEntitled): IsEntitledProto = { + override def serialize(write: IsEntitled): IsEntitledProto = ??? /* { IsEntitledProto.newBuilder .setCmd(toProto(write.cmd)) .build - } + } */ } object IsEntitledResultSerializer extends ProtoSerializer[IsEntitledResult, IsEntitledResultProto] { - override def deserialize(proto: IsEntitledResultProto): IsEntitledResult = { + override def deserialize(proto: IsEntitledResultProto): IsEntitledResult = ??? /* { IsEntitledResult(proto.getValue) - } + } */ - override def serialize(entitled: IsEntitledResult): IsEntitledResultProto = { + override def serialize(entitled: IsEntitledResult): IsEntitledResultProto = ??? /* { IsEntitledResultProto.newBuilder .setValue(entitled.res) .build - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/MessagesProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/MessagesProtoSerialization.scala index ac517ab6..6fbcb3ea 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/MessagesProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/MessagesProtoSerialization.scala @@ -86,20 +86,20 @@ object PublishMessagesCommandSerializer with ProtoSerializer[MessagesPublishCommand, PublishMessagesProto] { override def serialize( cmd: MessagesPublishCommand - ): PublishMessagesProto = { + ): PublishMessagesProto = ??? /* { PublishMessagesProto.newBuilder .setMessageType(toProto(cmd.msg)) .setWaitForAck(cmd.option.waitForAck) .build() - } + } */ override def deserialize( proto: PublishMessagesProto - ): MessagesPublishCommand = { + ): MessagesPublishCommand = ??? /* { val messageType = fromProto(proto.getMessageType) val option = if (proto.getWaitForAck) Ack else IgnoreAck MessagesPublishCommand(messageType, option) - } + } */ } object PublishTransactionMessagesCommandSerializer @@ -108,22 +108,22 @@ object PublishTransactionMessagesCommandSerializer override def serialize( cmd: MessagesPublishTransactionCommand ): PublishTransactionProto = - PublishTransactionProto.newBuilder + ??? /* PublishTransactionProto.newBuilder .setTransaction(toProto(cmd.msg)) - .build() + .build() */ override def deserialize( proto: PublishTransactionProto - ): MessagesPublishTransactionCommand = { + ): MessagesPublishTransactionCommand = ??? /* { val transaction = fromProto(proto.getTransaction) MessagesPublishTransactionCommand(transaction) - } + } */ } object CreateMessagesStreamCommandSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[CreateMessagesStream, CreateMessagesStreamProto] { - override def serialize(cmd: CreateMessagesStream): CreateMessagesStreamProto = { + override def serialize(cmd: CreateMessagesStream): CreateMessagesStreamProto = ??? /* { val streamProtoBuilder = CreateMessagesStreamProto.newBuilder .setStreamId(cmd.streamId) .addAllSubscriptions(cmd.subs.map(toProto(_)).asJava) @@ -133,111 +133,111 @@ object CreateMessagesStreamCommandSerializer } cmd.startTime.foreach(st => streamProtoBuilder.setStartTime(toProto(st))) streamProtoBuilder.build() - } - override def deserialize(proto: CreateMessagesStreamProto): CreateMessagesStream = { + } */ + override def deserialize(proto: CreateMessagesStreamProto): CreateMessagesStream = ??? /* { val streamId = proto.getStreamId val subscriptions = proto.getSubscriptionsList.asScala.map(fromProto(_)).toSet val appSpecificConsumerId = Option(proto.getAppSpecificConsumerId).filter(!_.isBlank) val startTime = if (proto.hasStartTime) Some(fromProto(proto.getStartTime)) else None CreateMessagesStream(streamId, subscriptions, appSpecificConsumerId, startTime) - } + } */ } object ChangeMessagesSubscriptionCommandSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[ChangeMessagesSubscription, ChangeMessagesSubscriptionProto] { - override def serialize(cmd: ChangeMessagesSubscription): ChangeMessagesSubscriptionProto = { + override def serialize(cmd: ChangeMessagesSubscription): ChangeMessagesSubscriptionProto = ??? /* { ChangeMessagesSubscriptionProto.newBuilder .setStreamId(cmd.streamId) .setChangeRequestId(cmd.changeRequestId) .addAllAddSubscriptions(cmd.newSubs.map(toProto(_)).asJava) .addAllRemoveSubscriptionIds(cmd.removeSubs.map(Integer.valueOf).asJava) .build - } - override def deserialize(proto: ChangeMessagesSubscriptionProto): ChangeMessagesSubscription = { + } */ + override def deserialize(proto: ChangeMessagesSubscriptionProto): ChangeMessagesSubscription = ??? /* { val streamId = proto.getStreamId val changeRequestId = proto.getChangeRequestId val addSubscriptions = proto.getAddSubscriptionsList.asScala.map(fromProto(_)) val removeSubscriptions = proto.getRemoveSubscriptionIdsList.asScala.map(_.intValue) ChangeMessagesSubscription(streamId, changeRequestId, addSubscriptions.toSet, removeSubscriptions.toSet) - } + } */ } object CloseMessagesStreamCommandSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[CloseMessagesStream, CloseMessagesStreamProto] { - override def serialize(cmd: CloseMessagesStream): CloseMessagesStreamProto = { + override def serialize(cmd: CloseMessagesStream): CloseMessagesStreamProto = ??? /* { CloseMessagesStreamProto.newBuilder.setStreamId(cmd.streamId).build - } - override def deserialize(proto: CloseMessagesStreamProto): CloseMessagesStream = { + } */ + override def deserialize(proto: CloseMessagesStreamProto): CloseMessagesStream = ??? /* { CloseMessagesStream(proto.getStreamId) - } + } */ } object CommitMessagesStreamCommandSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[CommitMessagesStream, CommitMessagesStreamProto] { - override def serialize(cmd: CommitMessagesStream): CommitMessagesStreamProto = { + override def serialize(cmd: CommitMessagesStream): CommitMessagesStreamProto = ??? /* { val builder = CommitMessagesStreamProto.newBuilder.setStreamId(cmd.streamId) cmd.commitIds.foreach(builder.addCommitIds) builder.build - } - override def deserialize(proto: CommitMessagesStreamProto): CommitMessagesStream = { + } */ + override def deserialize(proto: CommitMessagesStreamProto): CommitMessagesStream = ??? /* { CommitMessagesStream(proto.getStreamId, proto.getCommitIdsList.asScala.map(_.toLong)) - } + } */ } object PublishMessagesResultSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[MessagesPublishSuccessResult, PublishMessagesSuccessProto] { - override def serialize(cmd: MessagesPublishSuccessResult): PublishMessagesSuccessProto = { + override def serialize(cmd: MessagesPublishSuccessResult): PublishMessagesSuccessProto = ??? /* { PublishMessagesSuccessProto.newBuilder.setEventClassName(cmd.eventClassName).build - } - override def deserialize(proto: PublishMessagesSuccessProto): MessagesPublishSuccessResult = { + } */ + override def deserialize(proto: PublishMessagesSuccessProto): MessagesPublishSuccessResult = ??? /* { MessagesPublishSuccessResult(proto.getEventClassName) - } + } */ } object CreateMessagesStreamResultSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[MessagesCreateStreamSuccessResult, CreateMessagesStreamSuccessProto] { - override def serialize(cmd: MessagesCreateStreamSuccessResult): CreateMessagesStreamSuccessProto = { + override def serialize(cmd: MessagesCreateStreamSuccessResult): CreateMessagesStreamSuccessProto = ??? /* { CreateMessagesStreamSuccessProto.newBuilder.setStreamId(cmd.streamId).build - } - override def deserialize(proto: CreateMessagesStreamSuccessProto): MessagesCreateStreamSuccessResult = { + } */ + override def deserialize(proto: CreateMessagesStreamSuccessProto): MessagesCreateStreamSuccessResult = ??? /* { MessagesCreateStreamSuccessResult(proto.getStreamId) - } + } */ } object ChangeMessagesSubscriptionResultSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[MessagesChangeSubscriptionSuccessResult, ChangeMessagesSubscriptionSuccessProto] { - override def serialize(cmd: MessagesChangeSubscriptionSuccessResult): ChangeMessagesSubscriptionSuccessProto = { + override def serialize(cmd: MessagesChangeSubscriptionSuccessResult): ChangeMessagesSubscriptionSuccessProto = ??? /* { ChangeMessagesSubscriptionSuccessProto.newBuilder .setStreamId(cmd.streamId) .setChangeRequestId(cmd.changeRequestId) .build - } - override def deserialize(proto: ChangeMessagesSubscriptionSuccessProto): MessagesChangeSubscriptionSuccessResult = { + } */ + override def deserialize(proto: ChangeMessagesSubscriptionSuccessProto): MessagesChangeSubscriptionSuccessResult = ??? /* { MessagesChangeSubscriptionSuccessResult(proto.getStreamId, proto.getChangeRequestId) - } + } */ } object CloseMessagesStreamResultSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[MessagesCloseStreamSuccessResult, CloseMessagesStreamSuccessProto] { - override def serialize(cmd: MessagesCloseStreamSuccessResult): CloseMessagesStreamSuccessProto = { + override def serialize(cmd: MessagesCloseStreamSuccessResult): CloseMessagesStreamSuccessProto = ??? /* { CloseMessagesStreamSuccessProto.newBuilder.setStreamId(cmd.streamId).build - } - override def deserialize(proto: CloseMessagesStreamSuccessProto): MessagesCloseStreamSuccessResult = { + } */ + override def deserialize(proto: CloseMessagesStreamSuccessProto): MessagesCloseStreamSuccessResult = ??? /* { MessagesCloseStreamSuccessResult(proto.getStreamId) - } + } */ } object MessagesNotificationResultSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[MessagesNotificationResult, MessagesNotificationProto] { - override def serialize(cmd: MessagesNotificationResult): MessagesNotificationProto = { + override def serialize(cmd: MessagesNotificationResult): MessagesNotificationProto = ??? /* { val builder = MessagesNotificationProto.newBuilder .setStreamUuid(cmd.streamId) .setPublishRequestId(cmd.publishReqId) @@ -256,32 +256,32 @@ object MessagesNotificationResultSerializer .asJava) } builder.build() - } + } */ override def deserialize( proto: MessagesNotificationProto - ): MessagesNotificationResult = { + ): MessagesNotificationResult = ??? /* { val streamId = proto.getStreamUuid val publishReqId = proto.getPublishRequestId val commitId = proto.getCommitId val entries = proto.getEntriesList.asScala.map(fromProto(_)) val transactions = proto.getTransactionsList.asScala.map(fromProto(_)) MessagesNotificationResult(streamId, publishReqId, commitId, entries ++ transactions) - } + } */ } object MessagesNotificationEntrySerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[SimpleEntry, MessagesNotificationEntryProto] { override def serialize(cmd: SimpleEntry): MessagesNotificationEntryProto = - MessagesNotificationEntryProto.newBuilder + ??? /* MessagesNotificationEntryProto.newBuilder .setSubId(cmd.subId) .setSerializedMessage(toProto(cmd.serializedMsg)) - .build + .build */ - override def deserialize(proto: MessagesNotificationEntryProto): SimpleEntry = { + override def deserialize(proto: MessagesNotificationEntryProto): SimpleEntry = ??? /* { val serializedMsg = fromProto(proto.getSerializedMessage) SimpleEntry(proto.getSubId, serializedMsg) - } + } */ } object MessagesNotificationTransactionEntrySerializer @@ -290,18 +290,18 @@ object MessagesNotificationTransactionEntrySerializer override def serialize( cmd: TransactionEntry ): MessagesTransactionNotificationEntryProto = - MessagesTransactionNotificationEntryProto.newBuilder + ??? /* MessagesTransactionNotificationEntryProto.newBuilder .setSubId(cmd.subId) .setClassName(cmd.className) .setSerializedMessage(toProto(cmd.serializedMsg)) - .build + .build */ override def deserialize( proto: MessagesTransactionNotificationEntryProto - ): TransactionEntry = { + ): TransactionEntry = ??? /* { val serializedMsg = fromProto(proto.getSerializedMessage) TransactionEntry(proto.getSubId, proto.getClassName, serializedMsg) - } + } */ } // Map[EntityReference, ContainedEntity] is equal to EntityReferenceToContainedEntity message @@ -309,40 +309,40 @@ object MessagesNotificationTransactionEntrySerializer object SerializedContainedEventSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[SerializedContainedEvent, SerializedMessageProto] { - override def serialize(cmd: SerializedContainedEvent): SerializedMessageProto = { + override def serialize(cmd: SerializedContainedEvent): SerializedMessageProto = ??? /* { SerializedMessageProto.newBuilder .setSbe(toProto(cmd.sbe)) .addAllEntityMap(cmd.entityMap.map { case (k, v) => toProto((k, v)) }.asJava) .build - } + } */ - override def deserialize(proto: SerializedMessageProto): SerializedContainedEvent = { + override def deserialize(proto: SerializedMessageProto): SerializedContainedEvent = ??? /* { val sbe = fromProto(proto.getSbe) val entityMap = proto.getEntityMapList.asScala.map(fromProto(_)).toMap SerializedContainedEvent(sbe, entityMap) - } + } */ } object EntityReferenceToContainedEntitySerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[(EntityReference, ContainedEntity), EntityReferenceToContainedEntityProto] { - override def serialize(cmd: (EntityReference, ContainedEntity)): EntityReferenceToContainedEntityProto = { + override def serialize(cmd: (EntityReference, ContainedEntity)): EntityReferenceToContainedEntityProto = ??? /* { EntityReferenceToContainedEntityProto.newBuilder .setEntityReference(toProto(cmd._1)) .setContainedEntity(toProto(cmd._2)) .build - } - override def deserialize(proto: EntityReferenceToContainedEntityProto): (EntityReference, ContainedEntity) = { + } */ + override def deserialize(proto: EntityReferenceToContainedEntityProto): (EntityReference, ContainedEntity) = ??? /* { val entityReference = fromProto(proto.getEntityReference) val containedEntity = fromProto(proto.getContainedEntity) (entityReference, containedEntity) - } + } */ } object ContainedEntitySerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[ContainedEntity, ContainedEntityProto] { - override def serialize(cmd: ContainedEntity): ContainedEntityProto = { + override def serialize(cmd: ContainedEntity): ContainedEntityProto = ??? /* { cmd match { case a: AppliedHeapEntity => ContainedEntityProto.newBuilder @@ -361,14 +361,14 @@ object ContainedEntitySerializer .setTt(toProto(s.tt)) .build } - } - override def deserialize(proto: ContainedEntityProto): ContainedEntity = { + } */ + override def deserialize(proto: ContainedEntityProto): ContainedEntity = ??? /* { proto.getType match { case ContainedEntityProto.Type.APPLIED_HEAP_ENTITY => AppliedHeapEntity(fromProto(proto.getEntity)) case ContainedEntityProto.Type.UNIQUE_HEAP_ENTITY => UniqueHeapEntity(fromProto(proto.getEntity)) case ContainedEntityProto.Type.STORED_ENTITY => StoredEntity(fromProto(proto.getVt), fromProto(proto.getTt)) } - } + } */ } object MessagesSubscriptionSerializer @@ -376,7 +376,7 @@ object MessagesSubscriptionSerializer with ProtoSerializer[MessagesSubscription, MessagesSubscriptionProto] { override def serialize( cmd: MessagesSubscription - ): MessagesSubscriptionProto = { + ): MessagesSubscriptionProto = ??? /* { val subscriptionType = cmd.subscriptionType match { case MessagesSubscriptionType.ContainedEvent => MessagesSubscriptionProto.SubscriptionType.CONTAINED_EVENT case MessagesSubscriptionType.UpsertableTransaction => @@ -389,11 +389,11 @@ object MessagesSubscriptionSerializer .setEventClassName(cmd.eventClassName) .setSubscriptionType(subscriptionType) .build - } + } */ override def deserialize( proto: MessagesSubscriptionProto - ): MessagesSubscription = { + ): MessagesSubscription = ??? /* { val subscriptionType = proto.getSubscriptionType match { case MessagesSubscriptionProto.SubscriptionType.CONTAINED_EVENT => MessagesSubscriptionType.ContainedEvent case MessagesSubscriptionProto.SubscriptionType.UPSERTABLE_TRANSACTION => @@ -405,7 +405,7 @@ object MessagesSubscriptionSerializer proto.getEventClassName, subscriptionType ) - } + } */ } object SerializedTransactionSerializer @@ -414,16 +414,16 @@ object SerializedTransactionSerializer override def serialize( cmd: SerializedUpsertableTransaction ): SerializedTransactionProto = - SerializedTransactionProto.newBuilder + ??? /* SerializedTransactionProto.newBuilder .setPutApplicationEvent(toProto(cmd.putEvent)) - .build + .build */ override def deserialize( proto: SerializedTransactionProto - ): SerializedUpsertableTransaction = { + ): SerializedUpsertableTransaction = ??? /* { val putEvent = fromProto(proto.getPutApplicationEvent) SerializedUpsertableTransaction(putEvent) - } + } */ } object StreamsACLsCommandSerializer @@ -432,50 +432,50 @@ object StreamsACLsCommandSerializer override def serialize( cmd: StreamsACLsCommand ): StreamsACLsCommandProto = - StreamsACLsCommandProto.newBuilder + ??? /* StreamsACLsCommandProto.newBuilder .setStreamAppId(cmd.streamAppId) .addAllAcls(cmd.acls.map(streamsACLsSerializer.serialize).asJava) - .build() + .build() */ override def deserialize( proto: StreamsACLsCommandProto - ): StreamsACLsCommand = { + ): StreamsACLsCommand = ??? /* { val streamAppId = proto.getStreamAppId val acls = proto.getAclsList.asScala.map(streamsACLsSerializer.deserialize) StreamsACLsCommand(streamAppId, acls) - } + } */ } object StreamsACLsSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[StreamsACLs, StreamsACLsProto] { - val protoEntitlementMapping = Map( + /* val protoEntitlementMapping = Map( StreamsACLsProto.Entitlement.Produce -> StreamsEntitlement.Produce, StreamsACLsProto.Entitlement.Consume -> StreamsEntitlement.Consume ) val entitlementPrototMapping = protoEntitlementMapping .map { case (proto, action) => action -> proto } - .toMap[StreamsEntitlement, StreamsACLsProto.Entitlement] + .toMap[StreamsEntitlement, StreamsACLsProto.Entitlement] */ override def serialize( cmd: StreamsACLs ): StreamsACLsProto = - StreamsACLsProto.newBuilder + ??? /* StreamsACLsProto.newBuilder .setEntitlement(entitlementPrototMapping(cmd.entitlement)) .addAllHierarchicalEntities(cmd.hierarchicalEntities.map(hierarchicalEntitiesSerializer.serialize).asJava) .addAllInternalTopics(cmd.internalTopics.asJava) - .build + .build */ override def deserialize( proto: StreamsACLsProto - ): StreamsACLs = { + ): StreamsACLs = ??? /* { val entitlement = protoEntitlementMapping(proto.getEntitlement) val hierarchicalEntities = proto.getHierarchicalEntitiesList.asScala.map(hierarchicalEntitiesSerializer.deserialize) val internalTopics = proto.getInternalTopicsList.asScala StreamsACLs(entitlement, hierarchicalEntities, internalTopics) - } + } */ } object HierarchicalEntitiesSerializer @@ -484,23 +484,23 @@ object HierarchicalEntitiesSerializer override def serialize( cmd: Seq[String] ): HierarchicalEntitiesProto = - HierarchicalEntitiesProto.newBuilder + ??? /* HierarchicalEntitiesProto.newBuilder .addAllEntityNames(cmd.asJava) - .build() + .build() */ override def deserialize( proto: HierarchicalEntitiesProto - ): Seq[String] = proto.getEntityNamesList.asScala + ): Seq[String] = ??? // proto.getEntityNamesList.asScala } object StreamsACLsResultSerializer extends MessagesCommandProtoSerializationBase with ProtoSerializer[StreamsACLsCommandSuccessResult, StreamsACLsCommandSuccessProto] { - override def serialize(cmd: StreamsACLsCommandSuccessResult): StreamsACLsCommandSuccessProto = { + override def serialize(cmd: StreamsACLsCommandSuccessResult): StreamsACLsCommandSuccessProto = ??? /* { StreamsACLsCommandSuccessProto.newBuilder.setAppId(cmd.appId).build - } - override def deserialize(proto: StreamsACLsCommandSuccessProto): StreamsACLsCommandSuccessResult = { + } */ + override def deserialize(proto: StreamsACLsCommandSuccessProto): StreamsACLsCommandSuccessResult = ??? /* { StreamsACLsCommandSuccessResult(proto.getAppId) - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/NotificationProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/NotificationProtoSerialization.scala index 5c252068..91e8c545 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/NotificationProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/NotificationProtoSerialization.scala @@ -12,7 +12,7 @@ package optimus.platform.dsi.bitemporal.proto import optimus.dsi.notification._ -import net.iharder.base64.Base64 +import net.iharder.Base64 import optimus.platform.dsi.bitemporal.proto.Dsi._ import optimus.platform.storable._ @@ -42,7 +42,7 @@ object NotificationMessageSerializer extends NotificationProtoSerializationBase with ProtoSerializer[NotificationMessage, NotificationMessageProto] { - override def serialize(nm: NotificationMessage): NotificationMessageProto = { + override def serialize(nm: NotificationMessage): NotificationMessageProto = ??? /* { val builder = NotificationMessageProto.newBuilder nm match { case hb: NotifyHeartBeat => @@ -58,9 +58,9 @@ object NotificationMessageSerializer case om: ObliterateMessage => builder.setType(NotificationMessageProto.Type.OBLITERATE_MESSAGE).setObliterateMessage(toProto(om)).build } - } + } */ - override def deserialize(nmp: NotificationMessageProto): NotificationMessage = { + override def deserialize(nmp: NotificationMessageProto): NotificationMessage = ??? /* { nmp.getType match { case NotificationMessageProto.Type.HEARTBEAT => fromProto(nmp.getHeartBeat) case NotificationMessageProto.Type.RESET_STATE => fromProto(nmp.getResetState) @@ -69,14 +69,14 @@ object NotificationMessageSerializer case NotificationMessageProto.Type.NOTIFICATION_ENTRY => fromProto(nmp.getNotificationEntry) case NotificationMessageProto.Type.OBLITERATE_MESSAGE => fromProto(nmp.getObliterateMessage) } - } + } */ } private[proto] object NotifyHeartbeatSerializer extends NotificationProtoSerializationBase with ProtoSerializer[NotifyHeartBeat, NotifyHeartBeatProto] { - override def serialize(hb: NotifyHeartBeat): NotifyHeartBeatProto = { + override def serialize(hb: NotifyHeartBeat): NotifyHeartBeatProto = ??? /* { val builder = NotifyHeartBeatProto.newBuilder builder .setTxTime(toProto(hb.txTime)) @@ -84,16 +84,16 @@ private[proto] object NotifyHeartbeatSerializer .setPrimarySeq(hb.primarySeq) PartitionHelper.getPartitionNameOption(hb.partition).foreach(builder.setPartitionName) builder.build - } + } */ - override def deserialize(proto: NotifyHeartBeatProto): NotifyHeartBeat = { + override def deserialize(proto: NotifyHeartBeatProto): NotifyHeartBeat = ??? /* { NotifyHeartBeat( fromProto(proto.getTxTime), if (proto.hasContext) fromProto(proto.getContext) else null, proto.getPrimarySeq, if (proto.hasPartitionName) PartitionHelper.getPartitionForString(proto.getPartitionName) else DefaultPartition ) // set to default value 0 if not found in proto - } + } */ } // NB: For ResetState, null context is for reset on all Context's from the server side. @@ -102,7 +102,7 @@ private[proto] object ResetStateSerializer extends NotificationProtoSerializationBase with ProtoSerializer[ResetState, ResetStateProto] { - override def serialize(rs: ResetState): ResetStateProto = { + override def serialize(rs: ResetState): ResetStateProto = ??? /* { val builder = ResetStateProto.newBuilder builder @@ -115,9 +115,9 @@ private[proto] object ResetStateSerializer builder.setContext(toProto(rs.context)) builder.build - } + } */ - override def deserialize(proto: ResetStateProto): ResetState = { + override def deserialize(proto: ResetStateProto): ResetState = ??? /* { ResetState.raw( fromProto(proto.getTxTime), if (proto.hasContext) fromProto(proto.getContext) else null, @@ -125,14 +125,14 @@ private[proto] object ResetStateSerializer proto.getPrimarySeq, if (proto.hasPartitionName) PartitionHelper.getPartitionForString(proto.getPartitionName) else DefaultPartition ) - } + } */ } private[proto] object BeginTransactionSerializer extends NotificationProtoSerializationBase with ProtoSerializer[BeginTransaction, BeginTransactionProto] { - override def serialize(bt: BeginTransaction): BeginTransactionProto = { + override def serialize(bt: BeginTransaction): BeginTransactionProto = ??? /* { val builder = BeginTransactionProto.newBuilder builder @@ -142,23 +142,23 @@ private[proto] object BeginTransactionSerializer PartitionHelper.getPartitionNameOption(bt.partition).foreach(builder.setPartitionName) builder.build - } + } */ - override def deserialize(proto: BeginTransactionProto): BeginTransaction = { + override def deserialize(proto: BeginTransactionProto): BeginTransaction = ??? /* { BeginTransaction( fromProto(proto.getTxTime), if (proto.hasContext) fromProto(proto.getContext) else null, proto.getPrimarySeq, if (proto.hasPartitionName) PartitionHelper.getPartitionForString(proto.getPartitionName) else DefaultPartition ) - } + } */ } private[proto] object EndTransactionSerializer extends NotificationProtoSerializationBase with ProtoSerializer[EndTransaction, EndTransactionProto] { - override def serialize(et: EndTransaction): EndTransactionProto = { + override def serialize(et: EndTransaction): EndTransactionProto = ??? /* { val builder = EndTransactionProto.newBuilder builder .setTxTime(toProto(et.txTime)) @@ -166,16 +166,16 @@ private[proto] object EndTransactionSerializer .setPrimarySeq(et.primarySeq) PartitionHelper.getPartitionNameOption(et.partition).foreach(builder.setPartitionName) builder.build - } + } */ - override def deserialize(proto: EndTransactionProto): EndTransaction = { + override def deserialize(proto: EndTransactionProto): EndTransaction = ??? /* { EndTransaction( fromProto(proto.getTxTime), if (proto.hasContext) fromProto(proto.getContext) else null, proto.getPrimarySeq, if (proto.hasPartitionName) PartitionHelper.getPartitionForString(proto.getPartitionName) else DefaultPartition ) - } + } */ } // TODO (OPTIMUS-28487): Revert commit 2208323463741454f4109e1fd72c811069389272 @@ -186,7 +186,7 @@ private[optimus /*dsi*/ ] object NotificationEntrySerializer private val segmentTtFromPresenceBit = 2 override def serialize(entry: NotificationEntry): NotificationEntryProto = - entry.proto({ + ??? /* entry.proto({ val builder = NotificationEntryProto.newBuilder builder @@ -220,9 +220,9 @@ private[optimus /*dsi*/ ] object NotificationEntrySerializer }) builder.build - }) + }) */ - override def deserialize(proto: NotificationEntryProto): NotificationEntry = { + override def deserialize(proto: NotificationEntryProto): NotificationEntry = ??? /* { val vref_ = if (proto.hasVersionedRef) fromProto(proto.getVersionedRef) else null @@ -270,14 +270,14 @@ private[optimus /*dsi*/ ] object NotificationEntrySerializer partition ) } - } + } */ } private[proto] object ObliterateMessageSerializer extends NotificationProtoSerializationBase with ProtoSerializer[ObliterateMessage, ObliterateMessageProto] { - override def serialize(om: ObliterateMessage): ObliterateMessageProto = { + override def serialize(om: ObliterateMessage): ObliterateMessageProto = ??? /* { val builder = ObliterateMessageProto.newBuilder builder .addAllEntityReferenceStrings((om.entityReferences map (c => Base64.encodeBytes(c.data))).asJava) @@ -287,9 +287,9 @@ private[proto] object ObliterateMessageSerializer .setPrimarySeq(om.primarySeq) PartitionHelper.getPartitionNameOption(om.partition).foreach(builder.setPartitionName) builder.build - } + } */ - override def deserialize(o: ObliterateMessageProto): ObliterateMessage = { + override def deserialize(o: ObliterateMessageProto): ObliterateMessage = ??? /* { ObliterateMessage( o.getEntityReferenceStringsList.asScala map (s => EntityReference.fromString(s)) toSeq, o.getTypesList.asScala toSeq, @@ -298,6 +298,6 @@ private[proto] object ObliterateMessageSerializer o.getPrimarySeq, if (o.hasPartitionName) NamedPartition(o.getPartitionName) else DefaultPartition ) - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PersistentEntitiesWithTemporalContext.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PersistentEntitiesWithTemporalContext.scala index 71a38fa6..a79d6def 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PersistentEntitiesWithTemporalContext.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PersistentEntitiesWithTemporalContext.scala @@ -14,13 +14,13 @@ package optimus.platform.dsi.bitemporal.proto import optimus.platform.storable.PersistentEntity import optimus.platform.dsi.bitemporal.proto.Dsi.PersistentEntityWithTemporalContextProto import java.time.Instant -import net.iharder.base64.Base64 +import net.iharder.Base64 object PersistentEntitiesWithTemporalContextImpl { - def apply(buf: String) = { + def apply(buf: String) = ??? /* { PersistentEntityWithTemporalContextProto.parseFrom(Base64.decode(buf, Base64.DONT_GUNZIP)) - } + } */ def unapply(buf: PersistentEntityWithTemporalContextProto): String = { Base64.encodeBytes(buf.toByteArray()) diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/Prc.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/Prc.scala new file mode 100644 index 00000000..d078fd78 --- /dev/null +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/Prc.scala @@ -0,0 +1,25 @@ +package optimus.platform.dsi.bitemporal.proto + +object Prc { + trait MessageLiteImpl extends com.google.protobuf.MessageLite { + def getParserForType(): com.google.protobuf.Parser[_ <: com.google.protobuf.MessageLite] = ??? + def getSerializedSize(): Int = ??? + def newBuilderForType(): com.google.protobuf.MessageLite.Builder = ??? + def toBuilder(): com.google.protobuf.MessageLite.Builder = ??? + def toByteArray(): Array[Byte] = ??? + def toByteString(): com.google.protobuf.ByteString = ??? + def writeDelimitedTo(output: java.io.OutputStream): Unit = ??? + def writeTo(output: java.io.OutputStream): Unit = ??? + def writeTo(output: com.google.protobuf.CodedOutputStream): Unit = ??? + def getDefaultInstanceForType(): com.google.protobuf.MessageLite = ??? + def isInitialized(): Boolean = ??? + } + + class PrcUserOptionsProto extends MessageLiteImpl + class NormalizedCacheableQueryProto extends MessageLiteImpl + class NonTemporalPrcKeyProto extends MessageLiteImpl + class PrcClientSessionInfoProto extends MessageLiteImpl + class NormalizedNonCacheableCommandProto extends MessageLiteImpl + class SilverKingTraceIdProto extends MessageLiteImpl + class PrcSingleKeyResponseProto extends MessageLiteImpl +} diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PropertyMapProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PropertyMapProtoSerialization.scala index 2be397c7..41921166 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PropertyMapProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PropertyMapProtoSerialization.scala @@ -27,12 +27,11 @@ import java.time.ZonedDateTime import optimus.utils.datetime._ import optimus.platform.pickling.ImmutableByteArray import optimus.platform.dsi.bitemporal.proto.Dsi.FieldProto -import optimus.platform.dsi.bitemporal.proto.Dsi.PeriodProto import optimus.platform.dsi.bitemporal.DateTimeSerialization import optimus.platform.storable._ import java.time.ZoneOffset -import net.iharder.base64.Base64 +import net.iharder.Base64 import optimus.core.CoreHelpers object ProtoPickleSerializer { @@ -49,7 +48,7 @@ object ProtoPickleSerializer { // arguments depending on the calling context: // serialize normal values <=> associatedKey == None // serialize Map values <=> associatedKey == the associated key of that value - def propertiesToProto(o: Any, associatedKey: Option[String] = None): FieldProto = { + def propertiesToProto(o: Any, associatedKey: Option[String] = None): FieldProto = ??? /* { val builder = FieldProto.newBuilder if (associatedKey.isDefined) { builder.setAssociatedKey(associatedKey.get) @@ -139,11 +138,11 @@ object ProtoPickleSerializer { } builder.build - } + } */ private final case class MapEntry(key: String, value: Any) - def protoToProperties(proto: FieldProto): Any = { + def protoToProperties(proto: FieldProto): Any = ??? /* { val value = proto.getType match { case FieldProto.Type.INT => proto.getIntValue case FieldProto.Type.STRING => proto.getStringValue @@ -224,5 +223,5 @@ object ProtoPickleSerializer { MapEntry(proto.getAssociatedKey, value) else value - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PubSubProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PubSubProtoSerialization.scala index 4b7b7302..4173537b 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PubSubProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/PubSubProtoSerialization.scala @@ -54,7 +54,7 @@ object CreatePubSubStreamCommandSerializer extends PubSubCommandProtoSerializationBase with ProtoSerializer[CreatePubSubStream, CreatePubSubStreamProto] { - override def serialize(cmd: CreatePubSubStream): CreatePubSubStreamProto = { + override def serialize(cmd: CreatePubSubStream): CreatePubSubStreamProto = ??? /* { val builder = CreatePubSubStreamProto.newBuilder .setStreamUuid(cmd.streamId) .addAllSubscriptions(cmd.subs.map(toProto(_)).asJava) @@ -62,82 +62,82 @@ object CreatePubSubStreamCommandSerializer cmd.endTime.foreach(et => builder.setEndTime(toProto(et))) cmd.vtFilterInterval.foreach(filter => builder.setVtFilterInterval(toProto(filter))) builder.build() - } + } */ - override def deserialize(proto: CreatePubSubStreamProto): CreatePubSubStream = { + override def deserialize(proto: CreatePubSubStreamProto): CreatePubSubStream = ??? /* { val streamId = proto.getStreamUuid val subscriptions = proto.getSubscriptionsList.asScala.map(fromProto(_)) val startTime = if (proto.hasStartTime) Some(fromProto(proto.getStartTime)) else None val endTime = if (proto.hasEndTime) Some(fromProto(proto.getEndTime)) else None val vtFilterInterval = if (proto.hasVtFilterInterval) Some(fromProto(proto.getVtFilterInterval)) else None CreatePubSubStream(streamId, subscriptions, startTime, endTime, vtFilterInterval) - } + } */ } object ChangeSubscriptionCommandSerializer extends PubSubCommandProtoSerializationBase with ProtoSerializer[ChangeSubscription, ChangeSubscriptionProto] { - override def serialize(cmd: ChangeSubscription): ChangeSubscriptionProto = { + override def serialize(cmd: ChangeSubscription): ChangeSubscriptionProto = ??? /* { ChangeSubscriptionProto.newBuilder .setStreamUuid(cmd.streamId) .setChangeRequestId(cmd.changeRequestId) .addAllAddSubscriptions(cmd.newSubs.map(toProto(_)).asJava) .addAllRemoveSubscriptionIds(cmd.removeSubs.map(Integer.valueOf).asJava) .build - } + } */ - override def deserialize(proto: ChangeSubscriptionProto): ChangeSubscription = { + override def deserialize(proto: ChangeSubscriptionProto): ChangeSubscription = ??? /* { val streamId = proto.getStreamUuid val changeReqId = proto.getChangeRequestId val addSubs = proto.getAddSubscriptionsList.asScala.map(fromProto(_)) val remSubs = proto.getRemoveSubscriptionIdsList.asScala.map(_.intValue).toSeq ChangeSubscription(streamId, changeReqId, addSubs, remSubs) - } + } */ } object ClosePubSubStreamCommandSerializer extends PubSubCommandProtoSerializationBase with ProtoSerializer[ClosePubSubStream, ClosePubSubStreamProto] { - override def serialize(cmd: ClosePubSubStream): ClosePubSubStreamProto = { + override def serialize(cmd: ClosePubSubStream): ClosePubSubStreamProto = ??? /* { ClosePubSubStreamProto.newBuilder .setStreamUuid(cmd.streamId) .build - } + } */ - override def deserialize(proto: ClosePubSubStreamProto): ClosePubSubStream = { + override def deserialize(proto: ClosePubSubStreamProto): ClosePubSubStream = ??? /* { ClosePubSubStream(proto.getStreamUuid) - } + } */ } object SubscriptionSerializer extends PubSubCommandProtoSerializationBase with ProtoSerializer[Subscription, SubscriptionProto] { - override def serialize(sub: Subscription): SubscriptionProto = { + override def serialize(sub: Subscription): SubscriptionProto = ??? /* { SubscriptionProto.newBuilder .setSubId(sub.subId) .setQuery(toProto(sub.query)) .setIncludeSow(sub.includeSow) .setEntitledOnly(sub.entitledOnly) .build - } + } */ - override def deserialize(proto: SubscriptionProto): Subscription = { + override def deserialize(proto: SubscriptionProto): Subscription = ??? /* { val subId = proto.getSubId val query: QueryHolder = fromProto(proto.getQuery) val includeSow = proto.getIncludeSow val entitledOnly = if (proto.hasEntitledOnly) proto.getEntitledOnly else false Subscription(subId, query, includeSow, entitledOnly) - } + } */ } object QueryHolderSerializer extends PubSubCommandProtoSerializationBase with ProtoSerializer[QueryHolder, QueryHolderProto] { - override def serialize(obj: QueryHolder): QueryHolderProto = { + override def serialize(obj: QueryHolder): QueryHolderProto = ??? /* { val builder = QueryHolderProto.newBuilder obj match { case ExpressionQueryHolder(query, clientFilter) => @@ -149,9 +149,9 @@ object QueryHolderSerializer builder.setHeartbeatInterval(interval) } builder.build - } + } */ - override def deserialize(proto: QueryHolderProto): QueryHolder = { + override def deserialize(proto: QueryHolderProto): QueryHolder = ??? /* { proto.getType match { case QueryHolderProto.Type.EXPRESSION_QUERY => ExpressionQueryHolder(fromProto(proto.getQuery), None) case QueryHolderProto.Type.HEARTBEAT_QUERY => @@ -161,7 +161,7 @@ object QueryHolderSerializer HeartbeatQueryHolder(partition, proto.getHeartbeatInterval) else HeartbeatQueryHolder(partition) } - } + } */ } trait NotificationEntrySerialization extends BasicProtoSerialization { @@ -177,55 +177,55 @@ object CreatePubSubStreamResultSerializer extends PubSubResultProtoSerializationBase with ProtoSerializer[CreatePubSubStreamSuccessResult, CreatePubSubStreamSuccessProto] { - override def serialize(res: CreatePubSubStreamSuccessResult): CreatePubSubStreamSuccessProto = { + override def serialize(res: CreatePubSubStreamSuccessResult): CreatePubSubStreamSuccessProto = ??? /* { CreatePubSubStreamSuccessProto.newBuilder .setStreamUuid(res.streamId) .setTxTime(toProto(res.txTime)) .build - } - override def deserialize(proto: CreatePubSubStreamSuccessProto): CreatePubSubStreamSuccessResult = { + } */ + override def deserialize(proto: CreatePubSubStreamSuccessProto): CreatePubSubStreamSuccessResult = ??? /* { CreatePubSubStreamSuccessResult(proto.getStreamUuid, fromProto(proto.getTxTime)) - } + } */ } object ChangeSubscriptionResultSerializer extends PubSubResultProtoSerializationBase with ProtoSerializer[ChangeSubscriptionSuccessResult, ChangeSubscriptionSuccessProto] { - override def serialize(res: ChangeSubscriptionSuccessResult): ChangeSubscriptionSuccessProto = { + override def serialize(res: ChangeSubscriptionSuccessResult): ChangeSubscriptionSuccessProto = ??? /* { ChangeSubscriptionSuccessProto.newBuilder .setStreamUuid(res.streamId) .setChangeRequestId(res.changeRequestId) .setTxTime(toProto(res.txTime)) .build - } + } */ - override def deserialize(proto: ChangeSubscriptionSuccessProto): ChangeSubscriptionSuccessResult = { + override def deserialize(proto: ChangeSubscriptionSuccessProto): ChangeSubscriptionSuccessResult = ??? /* { val streamId = proto.getStreamUuid val changeRequestId = proto.getChangeRequestId ChangeSubscriptionSuccessResult(streamId, changeRequestId, fromProto(proto.getTxTime)) - } + } */ } object ClosePubSubStreamResultSerializer extends PubSubResultProtoSerializationBase with ProtoSerializer[ClosePubSubStreamSuccessResult, ClosePubSubStreamSuccessProto] { - override def serialize(res: ClosePubSubStreamSuccessResult): ClosePubSubStreamSuccessProto = { + override def serialize(res: ClosePubSubStreamSuccessResult): ClosePubSubStreamSuccessProto = ??? /* { ClosePubSubStreamSuccessProto.newBuilder .setStreamUuid(res.streamId) .build - } - override def deserialize(proto: ClosePubSubStreamSuccessProto): ClosePubSubStreamSuccessResult = { + } */ + override def deserialize(proto: ClosePubSubStreamSuccessProto): ClosePubSubStreamSuccessResult = ??? /* { ClosePubSubStreamSuccessResult(proto.getStreamUuid) - } + } */ } object PubSubSowResultSerializer extends PubSubResultProtoSerializationBase with ProtoSerializer[PubSubSowResult, PubSubSowResultProto] { - override def serialize(res: PubSubSowResult): PubSubSowResultProto = { + override def serialize(res: PubSubSowResult): PubSubSowResultProto = ??? /* { val builder = PubSubSowResultProto.newBuilder .setStreamUuid(res.streamId) .setSubId(res.subId) @@ -241,9 +241,9 @@ object PubSubSowResultSerializer .setPartialQueryResult(toProto(r.parRes)) } builder.build - } + } */ - override def deserialize(proto: PubSubSowResultProto): PubSubSowResult = { + override def deserialize(proto: PubSubSowResultProto): PubSubSowResult = ??? /* { val streamId = proto.getStreamUuid val subId = proto.getSubId val txTime = fromProto(proto.getTxTime) @@ -255,14 +255,14 @@ object PubSubSowResultSerializer val parQueryResult = fromProto(proto.getPartialQueryResult) PubSubSowPartialResult(streamId, subId, txTime, parQueryResult) } - } + } */ } object PubSubNotificationResultSerializer extends PubSubResultProtoSerializationBase with ProtoSerializer[PubSubNotificationResult, PubSubNotificationProto] { - override def serialize(res: PubSubNotificationResult): PubSubNotificationProto = { + override def serialize(res: PubSubNotificationResult): PubSubNotificationProto = ??? /* { val builder = PubSubNotificationProto.newBuilder .setStreamUuid(res.streamId) .setTxTime(toProto(res.txTime)) @@ -297,9 +297,9 @@ object PubSubNotificationResultSerializer .setNumberOfOutOfLineNotificationEntries(rres.numberOfOutOfLineEntries) } builder.build - } + } */ - override def deserialize(proto: PubSubNotificationProto): PubSubNotificationResult = { + override def deserialize(proto: PubSubNotificationProto): PubSubNotificationResult = ??? /* { val streamId = proto.getStreamUuid val txTime = fromProto(proto.getTxTime) val writeReqId = if (proto.hasWriteRequestId) Some(proto.getWriteRequestId) else None @@ -323,14 +323,14 @@ object PubSubNotificationResultSerializer entries, proto.getNumberOfOutOfLineNotificationEntries) } - } + } */ } object PubSubNotificationPartialResultSerializer extends PubSubResultProtoSerializationBase with ProtoSerializer[PubSubNotificationPartialResult, PubSubNotificationPartialResultProto] { - override def serialize(res: PubSubNotificationPartialResult): PubSubNotificationPartialResultProto = { + override def serialize(res: PubSubNotificationPartialResult): PubSubNotificationPartialResultProto = ??? /* { val builder = PubSubNotificationPartialResultProto.newBuilder .setStreamUuid(res.streamId) .setTxTime(toProto(res.txTime)) @@ -366,9 +366,9 @@ object PubSubNotificationPartialResultSerializer .setNumberOfOutOfLineNotificationEntries(rres.numberOfOutOfLineEntries) } builder.build - } + } */ - override def deserialize(proto: PubSubNotificationPartialResultProto): PubSubNotificationPartialResult = { + override def deserialize(proto: PubSubNotificationPartialResultProto): PubSubNotificationPartialResult = ??? /* { val streamId = proto.getStreamUuid val isLast = proto.getIsLast val txTime = fromProto(proto.getTxTime) @@ -394,30 +394,30 @@ object PubSubNotificationPartialResultSerializer isLast, proto.getNumberOfOutOfLineNotificationEntries) } - } + } */ } object PubSubHeartbeatResultSerializer extends PubSubResultProtoSerializationBase with ProtoSerializer[PubSubHeartbeatResult, PubSubHeartbeatProto] { - override def serialize(res: PubSubHeartbeatResult): PubSubHeartbeatProto = { + override def serialize(res: PubSubHeartbeatResult): PubSubHeartbeatProto = ??? /* { val builder = PubSubHeartbeatProto.newBuilder .setStreamUuid(res.streamId) .setTxTime(toProto(res.txTime)) builder.build - } + } */ - override def deserialize(proto: PubSubHeartbeatProto): PubSubHeartbeatResult = { + override def deserialize(proto: PubSubHeartbeatProto): PubSubHeartbeatResult = ??? /* { val streamId = proto.getStreamUuid val txTime = fromProto(proto.getTxTime) PubSubHeartbeatResult(streamId, txTime) - } + } */ } object PubSubPartitionToSubIdsMapSerializer extends ProtoSerializer[Map[String, Seq[Int]], PartitionToSubIdsMapProto] { - override def serialize(partitionMap: Map[String, Seq[Int]]): PartitionToSubIdsMapProto = { + override def serialize(partitionMap: Map[String, Seq[Int]]): PartitionToSubIdsMapProto = ??? /* { val builder = PartitionToSubIdsMapProto.newBuilder val entries = partitionMap.map { case (par, subIds) => val entryBuilder = PartitionToSubIdsEntryProto.newBuilder @@ -427,21 +427,21 @@ object PubSubPartitionToSubIdsMapSerializer extends ProtoSerializer[Map[String, } entries.foreach(builder.addEntries) builder.build - } + } */ - override def deserialize(proto: PartitionToSubIdsMapProto): Map[String, Seq[Int]] = { + override def deserialize(proto: PartitionToSubIdsMapProto): Map[String, Seq[Int]] = ??? /* { proto.getEntriesList.asScala.map { entry => val partition = entry.getPartition val subIds = entry.getSubIdsList.asScala.map(_.toInt).toList partition -> subIds } toMap - } + } */ } object PubSubStreamEventSerializer extends PubSubResultProtoSerializationBase with ProtoSerializer[PubSubStreamResult, PubSubStreamEventProto] { - override def deserialize(proto: PubSubStreamEventProto): PubSubStreamResult = { + override def deserialize(proto: PubSubStreamEventProto): PubSubStreamResult = ??? /* { proto.getType match { case PubSubStreamEventProto.Type.PUBSUB_SOW_START => PubSubSowStartResult(proto.getStreamUuid, fromProto(proto.getTxTime)) @@ -452,8 +452,8 @@ object PubSubStreamEventSerializer case PubSubStreamEventProto.Type.CATCHUP_COMPLETE => PubSubCatchupCompleteResult(proto.getStreamUuid, fromProto(proto.getTxTime)) } - } - override def serialize(res: PubSubStreamResult): PubSubStreamEventProto = { + } */ + override def serialize(res: PubSubStreamResult): PubSubStreamEventProto = ??? /* { res match { case r: PubSubSowStartResult => PubSubStreamEventProto.newBuilder @@ -480,13 +480,13 @@ object PubSubStreamEventSerializer .setTxTime(toProto(r.txTime)) .build } - } + } */ } object PubSubGlobalEventSerializer extends PubSubResultProtoSerializationBase with ProtoSerializer[PubSubGlobalResult, PubSubGlobalEventProto] { - override def deserialize(proto: PubSubGlobalEventProto): PubSubGlobalResult = { + override def deserialize(proto: PubSubGlobalEventProto): PubSubGlobalResult = ??? /* { proto.getType match { case PubSubGlobalEventProto.Type.REPLAG_UNDERLIMIT_RESULT => PubSubRepLagUnderlimitResult(proto.getStreamUuid, proto.getLagTime) @@ -494,8 +494,8 @@ object PubSubGlobalEventSerializer PubSubRepLagOverlimitResult(proto.getStreamUuid, proto.getLagTime) case PubSubGlobalEventProto.Type.UPSTREAM_CHANGED_RESULT => PubSubUpstreamChangedResult(proto.getStreamUuid) } - } - override def serialize(res: PubSubGlobalResult): PubSubGlobalEventProto = { + } */ + override def serialize(res: PubSubGlobalResult): PubSubGlobalEventProto = ??? /* { res match { case r: PubSubRepLagUnderlimitResult => PubSubGlobalEventProto.newBuilder @@ -517,5 +517,5 @@ object PubSubGlobalEventSerializer case cn: PubSubBrokerConnect => throw new IllegalArgumentException(s"$cn not expected in request or response") case dn: PubSubBrokerDisconnect => throw new IllegalArgumentException(s"$dn not expected in request or response") } - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryEntityMetadataProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryEntityMetadataProtoSerialization.scala index dfc13b65..11197496 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryEntityMetadataProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryEntityMetadataProtoSerialization.scala @@ -26,39 +26,39 @@ trait QueryEntityMetadataProtoSerialization extends BasicProtoSerialization { object QueryEntityMetadataSerializer extends QueryEntityMetadataProtoSerialization with ProtoSerializer[QueryEntityMetadata, QueryEntityMetadataProto] { - override def serialize(meta: QueryEntityMetadata): QueryEntityMetadataProto = { + override def serialize(meta: QueryEntityMetadata): QueryEntityMetadataProto = ??? /* { QueryEntityMetadataProto.newBuilder.setEntityRef(toProto(meta.entityRef)).build - } + } */ - override def deserialize(proto: QueryEntityMetadataProto): QueryEntityMetadata = { + override def deserialize(proto: QueryEntityMetadataProto): QueryEntityMetadata = ??? /* { QueryEntityMetadata(fromProto(proto.getEntityRef)) - } + } */ } object QueryEntityMetadataResultSerializer extends QueryEntityMetadataProtoSerialization with ProtoSerializer[QueryEntityMetadataResult, QueryEntityMetadataResultProto] { - override def serialize(metaResult: QueryEntityMetadataResult): QueryEntityMetadataResultProto = { + override def serialize(metaResult: QueryEntityMetadataResult): QueryEntityMetadataResultProto = ??? /* { QueryEntityMetadataResultProto.newBuilder.setEntityMetadata(toProto(metaResult.entityMetadata)).build - } + } */ - override def deserialize(proto: QueryEntityMetadataResultProto): QueryEntityMetadataResult = { + override def deserialize(proto: QueryEntityMetadataResultProto): QueryEntityMetadataResult = ??? /* { QueryEntityMetadataResult(fromProto(proto.getEntityMetadata)) - } + } */ } object EntityMetadataSerializer extends QueryEntityMetadataProtoSerialization with ProtoSerializer[EntityMetadata, EntityMetadataProto] { - override def serialize(meta: EntityMetadata): EntityMetadataProto = { + override def serialize(meta: EntityMetadata): EntityMetadataProto = ??? /* { EntityMetadataProto.newBuilder .setEntityRef(toProto(meta.entityRef)) .setClassName(meta.className) .addAllTypes(meta.types.asJava) .build - } + } */ - override def deserialize(proto: EntityMetadataProto): EntityMetadata = { + override def deserialize(proto: EntityMetadataProto): EntityMetadata = ??? /* { EntityMetadata(fromProto(proto.getEntityRef), proto.getClassName, Seq(proto.getTypesList().asScala: _*)) - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryProtoSerialization.scala index 6591eb32..a3d9a727 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryProtoSerialization.scala @@ -35,134 +35,132 @@ object ReferenceQuerySerializer extends QueryProtoSerialization with ProtoSerializer[ReferenceQuery, ReferenceQueryProto] { - override def serialize(query: ReferenceQuery): ReferenceQueryProto = { + override def serialize(query: ReferenceQuery): ReferenceQueryProto = ??? /* { val builder = ReferenceQueryProto.newBuilder() builder.setEntityReference(toProto(query.ref)) builder.setEntitledOnly(query.entitledOnly) query.className.foreach(cn => builder.setClassName(cn)) builder.build() - } + } */ - override def deserialize(proto: ReferenceQueryProto): ReferenceQuery = { + override def deserialize(proto: ReferenceQueryProto): ReferenceQuery = ??? /* { val entitledOnly = if (proto.hasEntitledOnly) proto.getEntitledOnly else false val classNameOpt = if (proto.hasClassName) Option(proto.getClassName) else None ReferenceQuery(fromProto(proto.getEntityReference), entitledOnly, classNameOpt) - } + } */ } object EventReferenceQuerySerializer extends QueryProtoSerialization with ProtoSerializer[EventReferenceQuery, EventReferenceQueryProto] { - override def serialize(query: EventReferenceQuery): EventReferenceQueryProto = { + override def serialize(query: EventReferenceQuery): EventReferenceQueryProto = ??? /* { EventReferenceQueryProto.newBuilder .setEventReference(toProto(query.ref)) .build() - } + } */ - override def deserialize(proto: EventReferenceQueryProto): EventReferenceQuery = { + override def deserialize(proto: EventReferenceQueryProto): EventReferenceQuery = ??? /* { EventReferenceQuery(fromProto(proto.getEventReference)) - } + } */ } object SerializedKeyQuerySerializer extends QueryProtoSerialization with ProtoSerializer[SerializedKeyQuery, SerializedKeyQueryProto] { - override def serialize(query: SerializedKeyQuery): SerializedKeyQueryProto = { + override def serialize(query: SerializedKeyQuery): SerializedKeyQueryProto = ??? /* { SerializedKeyQueryProto.newBuilder .setSerializedKey(toProto(query.key)) .addAllRefs((query.refs.map(toProto(_))).asJava) .setEntitledOnly(query.entitledOnly) .build - } + } */ - override def deserialize(proto: SerializedKeyQueryProto): SerializedKeyQuery = { + override def deserialize(proto: SerializedKeyQueryProto): SerializedKeyQuery = ??? /* { val refs = proto.getRefsList().asScala.map(fromProto(_)).toSet val entitledOnly = proto.getEntitledOnly SerializedKeyQuery(fromProto(proto.getSerializedKey), refs, entitledOnly) - } + } */ } object EventSerializedKeyQuerySerializer extends QueryProtoSerialization with ProtoSerializer[EventSerializedKeyQuery, EventSerializedKeyQueryProto] { - override def serialize(query: EventSerializedKeyQuery): EventSerializedKeyQueryProto = { + override def serialize(query: EventSerializedKeyQuery): EventSerializedKeyQueryProto = ??? /* { EventSerializedKeyQueryProto.newBuilder .setSerializedKey(toProto(query.key)) .setEntitledOnly(query.entitledOnly) .build - } + } */ - override def deserialize(proto: EventSerializedKeyQueryProto): EventSerializedKeyQuery = { - EventSerializedKeyQuery(fromProto(proto.getSerializedKey), proto.getEntitledOnly) - } + override def deserialize(proto: EventSerializedKeyQueryProto): EventSerializedKeyQuery = ??? } object LinkageQuerySerializer extends QueryProtoSerialization with ProtoSerializer[LinkageQuery, LinkageQueryProto] { - override def serialize(query: LinkageQuery): LinkageQueryProto = { + override def serialize(query: LinkageQuery): LinkageQueryProto = ??? /* { LinkageQueryProto.newBuilder .setParentClassName(query.parentTypeStr) .setParentPropertyName(query.parentPropertyName) .setChildEntityReference(toProto(query.childEntityRef)) .build - } + } */ - override def deserialize(proto: LinkageQueryProto): LinkageQuery = { + override def deserialize(proto: LinkageQueryProto): LinkageQuery = ??? /* { LinkageQuery( parentTypeStr = proto.getParentClassName, parentPropertyName = proto.getParentPropertyName, childEntityRef = fromProto(proto.getChildEntityReference)) - } + } */ } object EntityClassQuerySerializer extends QueryProtoSerialization with ProtoSerializer[EntityClassQuery, EntityClassQueryProto] { - override def serialize(query: EntityClassQuery): EntityClassQueryProto = { + override def serialize(query: EntityClassQuery): EntityClassQueryProto = ??? /* { EntityClassQueryProto.newBuilder .setClassName(query.classNameStr) .setEntitledOnly(query.entitledOnly) .build - } + } */ - override def deserialize(proto: EntityClassQueryProto): EntityClassQuery = { + override def deserialize(proto: EntityClassQueryProto): EntityClassQuery = ??? /* { val entitledOnly = if (proto.hasEntitledOnly) proto.getEntitledOnly else false EntityClassQuery(proto.getClassName, entitledOnly) - } + } */ } object EventClassQuerySerializer extends QueryProtoSerialization with ProtoSerializer[EventClassQuery, EventClassQueryProto] { - override def serialize(query: EventClassQuery): EventClassQueryProto = { + override def serialize(query: EventClassQuery): EventClassQueryProto = ??? /* { EventClassQueryProto.newBuilder .setClassName(query.classNameStr) .setEntitledOnly(query.entitledOnly) .build - } + } */ - override def deserialize(proto: EventClassQueryProto): EventClassQuery = { + override def deserialize(proto: EventClassQueryProto): EventClassQuery = ??? /* { val entitledOnly = if (proto.hasEntitledOnly) proto.getEntitledOnly else false EventClassQuery(proto.getClassName, entitledOnly) - } + } */ } object EntityCmReferenceQuerySerializer extends QueryProtoSerialization with ProtoSerializer[EntityCmReferenceQuery, EntityCmReferenceQueryProto] { - override def serialize(query: EntityCmReferenceQuery): EntityCmReferenceQueryProto = { + override def serialize(query: EntityCmReferenceQuery): EntityCmReferenceQueryProto = ??? /* { val builder = EntityCmReferenceQueryProto.newBuilder() builder.setCmRef(toProto(query.cmid)) builder.setClassName(query.clazzName) builder.build - } + } */ - override def deserialize(proto: EntityCmReferenceQueryProto): EntityCmReferenceQuery = { + override def deserialize(proto: EntityCmReferenceQueryProto): EntityCmReferenceQuery = ??? /* { val className = if (proto.hasClassName) proto.getClassName else { @@ -172,20 +170,20 @@ object EntityCmReferenceQuerySerializer classOf[Entity].getName } EntityCmReferenceQuery(fromProto(proto.getCmRef), className) - } + } */ } object EventCmReferenceQuerySerializer extends QueryProtoSerialization with ProtoSerializer[EventCmReferenceQuery, EventCmReferenceQueryProto] { - override def serialize(query: EventCmReferenceQuery): EventCmReferenceQueryProto = { + override def serialize(query: EventCmReferenceQuery): EventCmReferenceQueryProto = ??? /* { val builder = EventCmReferenceQueryProto.newBuilder() builder.setCmRef(toProto(query.cmid)) builder.setClassName(query.clazzName) builder.build - } + } */ - override def deserialize(proto: EventCmReferenceQueryProto): EventCmReferenceQuery = { + override def deserialize(proto: EventCmReferenceQueryProto): EventCmReferenceQuery = ??? /* { val className = if (proto.hasClassName) proto.getClassName else { @@ -195,5 +193,5 @@ object EventCmReferenceQuerySerializer classOf[Entity].getName } EventCmReferenceQuery(fromProto(proto.getCmRef), className) - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryResultSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryResultSerialization.scala index 8ca0609c..6118a827 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryResultSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/QueryResultSerialization.scala @@ -30,7 +30,7 @@ class QueryResultEncoder extends ExpressionEncoder { idToInt.getOrElseUpdate(id, idToInt.size) } - def encode(result: PartialQueryResult): PartialQueryResultProto = { + def encode(result: PartialQueryResult): PartialQueryResultProto = ??? /* { val values = result.values.map(row => encode(row)) result.metaData .map(metaData => @@ -40,19 +40,19 @@ class QueryResultEncoder extends ExpressionEncoder { .setIsLast(result.isLast) .build()) .getOrElse(PartialQueryResultProto.newBuilder.addAllResult(values.asJava).setIsLast(result.isLast).build()) - } + } */ - def encode(result: QueryResult): QueryResultProto = { + def encode(result: QueryResult): QueryResultProto = ??? /* { val values = result.value.map(row => encode(row)) QueryResultProto.newBuilder.addAllResult(values.asJava).setMetadata(encode(result.metaData)).build() - } + } */ - def encode(row: Array[Any]): ValuesProto = { + def encode(row: Array[Any]): ValuesProto = ??? /* { val newRow = row.map(v => encode(v)) ValuesProto.newBuilder.addAllRow(CollectionConverters.asJavaIterable(newRow)).build() - } + } */ - def encode(row: Any): ValueProto = { + def encode(row: Any): ValueProto = ??? /* { val builder = ValueProto.newBuilder row match { case x: PersistentEntity => builder.setEntityValue(PersistentEntitySerializer.serialize(x)).build() @@ -62,16 +62,16 @@ class QueryResultEncoder extends ExpressionEncoder { builder.setRectangleValue(SelectSpaceRectangleSerializer.serialize(x)).build() case _ => builder.setFieldValue(ProtoPickleSerializer.propertiesToProto(row, None)).build() } - } + } */ - def encode(metaData: QueryResultMetaData): QueryResultMetaDataProto = { + def encode(metaData: QueryResultMetaData): QueryResultMetaDataProto = ??? /* { val fields = metaData.fields.map(f => encode(f)) QueryResultMetaDataProto.newBuilder.addAllFields(CollectionConverters.asJavaIterable(fields)).build() - } + } */ - def encode(field: Field): QueryFieldProto = { + def encode(field: Field): QueryFieldProto = ??? /* { QueryFieldProto.newBuilder.setName(field.name).setTypecode(encode(field.typeCode)).build() - } + } */ } class QueryResultDecoder extends ExpressionDecoder { @@ -81,37 +81,37 @@ class QueryResultDecoder extends ExpressionDecoder { intToId.getOrElseUpdate(id, Id()) } - def decode(result: PartialQueryResultProto): PartialQueryResult = { + def decode(result: PartialQueryResultProto): PartialQueryResult = ??? /* { if (result.getIsLast && result.hasMetadata) FinalPartialQueryResult(result.getResultList.asScala.map(decode(_)), Some(decode(result.getMetadata))) else IntermediatePartialQueryResult(result.getResultList.asScala.map(decode(_))) - } + } */ - def decode(result: QueryResultProto): QueryResult = { + def decode(result: QueryResultProto): QueryResult = ??? /* { QueryResult(result.getResultList.asScala.map(decode(_)), decode(result.getMetadata)) - } + } */ - def decode(row: ValuesProto): Array[Any] = { + def decode(row: ValuesProto): Array[Any] = ??? /* { row.getRowList.asScala.iterator.map(decode(_)).toArray - } + } */ - def decode(row: ValueProto): Any = { + def decode(row: ValueProto): Any = ??? /* { if (row.hasFieldValue) ProtoPickleSerializer.protoToProperties(row.getFieldValue) else if (row.hasEntityValue) PersistentEntitySerializer.deserialize(row.getEntityValue) else if (row.hasEventValue) SerializedBusinessEventSerializer.deserialize(row.getEventValue) else if (row.hasResultValue) ResultSerializer.deserialize(row.getResultValue) else if (row.hasRectangleValue) SelectSpaceRectangleSerializer.deserialize(row.getRectangleValue) else throw new UnsupportedOperationException(s"Unexpected row value: $row.") - } + } */ - def decode(metaData: QueryResultMetaDataProto): QueryResultMetaData = { + def decode(metaData: QueryResultMetaDataProto): QueryResultMetaData = ??? /* { QueryResultMetaData(metaData.getFieldsList.asScala.iterator.map(decode(_)).toArray) - } + } */ - def decode(field: QueryFieldProto): Field = { + def decode(field: QueryFieldProto): Field = ??? /* { Field(field.getName, decode(field.getTypecode)) - } + } */ } trait ResultSerializationBase extends ProtoSerialization { diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/RolesetSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/RolesetSerialization.scala index 31bb0e46..a7621a3d 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/RolesetSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/RolesetSerialization.scala @@ -18,7 +18,7 @@ import optimus.platform.dsi.bitemporal.proto.Dsi.RolesetProto import scala.jdk.CollectionConverters._ trait RolesetSerialization extends ProtoSerialization { - final def toProto(rolesetMode: RolesetMode): RolesetModeProto = { + final def toProto(rolesetMode: RolesetMode): RolesetModeProto = ??? /* { val builder = RolesetModeProto.newBuilder() rolesetMode match { case RolesetMode.AllRoles => builder.setType(RolesetModeProto.Type.ALL_ROLES) @@ -27,21 +27,21 @@ trait RolesetSerialization extends ProtoSerialization { builder.setType(RolesetModeProto.Type.SPECIFIC_ROLESET).setSpecificRoleset(toProto(rs)) } builder.build() - } + } */ - final def fromProto(rolesetModeProto: RolesetModeProto): RolesetMode = rolesetModeProto.getType match { + final def fromProto(rolesetModeProto: RolesetModeProto): RolesetMode = ??? /* rolesetModeProto.getType match { case RolesetModeProto.Type.ALL_ROLES => RolesetMode.AllRoles case RolesetModeProto.Type.LEGACY_ENTITLEMENTS => RolesetMode.UseLegacyEntitlements case RolesetModeProto.Type.SPECIFIC_ROLESET => val roleset: Set[String] = fromProto(rolesetModeProto.getSpecificRoleset) RolesetMode.SpecificRoleset(roleset) - } + } */ - final def fromProto(proto: RolesetProto): Set[String] = { + final def fromProto(proto: RolesetProto): Set[String] = ??? /* { proto.getRoleIdList.asScala.toSet - } + } */ - final def toProto(roleSet: Set[String]): RolesetProto = { + final def toProto(roleSet: Set[String]): RolesetProto = ??? /* { RolesetProto.newBuilder().addAllRoleId(roleSet.asJava).build() - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalitySerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalitySerialization.scala index 969d8588..ac1527c4 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalitySerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalitySerialization.scala @@ -36,7 +36,7 @@ trait DSIQueryTemporalitySerialization extends BasicProtoSerialization { def hasReadTxTime(): Boolean def getReadTxTime(): InstantProto - }): DSIQueryTemporality = { + }): DSIQueryTemporality = ??? /* { val temporality = if (proto.hasTxRange()) @@ -74,5 +74,5 @@ trait DSIQueryTemporalitySerialization extends BasicProtoSerialization { DSIQueryTemporality.All(readTT) } temporality - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/UnitOfWorkSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/UnitOfWorkSerialization.scala index 8fd613e0..ec663404 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/UnitOfWorkSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/UnitOfWorkSerialization.scala @@ -45,9 +45,9 @@ object UnitOfWorkSerialization extends UnitOfWorkSerialization { def prepareUnitOfWorkMessageB2B( actions: Seq[TxnAction], txTime: Instant, - excludePrevBusEvent: Boolean): UOWNotificationProto = { + excludePrevBusEvent: Boolean): UOWNotificationProto = ??? /* { toProto(prepareUnitOfWorkMessageB2BUOWNotification(actions, txTime, excludePrevBusEvent)) - } + } */ private[optimus] def prepareUnitOfWorkMessageB2BUOWNotification( actions: Seq[TxnAction], @@ -85,9 +85,9 @@ object UnitOfWorkSerialization extends UnitOfWorkSerialization { actions: Seq[TxnAction], txTime: Instant, excludePrevBusEvent: Boolean, - numPartitionKeys: Option[Int]): PartitionedUOWNotificationProto = { + numPartitionKeys: Option[Int]): PartitionedUOWNotificationProto = ??? /* { toProto(preparePartitionedUOWNotification(actions, txTime, excludePrevBusEvent, numPartitionKeys)) - } + } */ private[optimus] def preparePartitionedUOWNotification( actions: Seq[TxnAction], @@ -113,43 +113,43 @@ object UnitOfWorkSerialization extends UnitOfWorkSerialization { object UOWApplicationEventSerializer extends UnitOfWorkSerialization with ProtoSerializer[UOWApplicationEvent, UOWApplicationEventProto] { - override def serialize(appEvent: UOWApplicationEvent): UOWApplicationEventProto = { + override def serialize(appEvent: UOWApplicationEvent): UOWApplicationEventProto = ??? /* { UOWApplicationEventProto .newBuilder() .setEventRef(toProto(appEvent.id)) .addAllBeRefs((appEvent.beRefs.map(beRef => toProto(beRef))).asJava) .build() - } + } */ - override def deserialize(proto: UOWApplicationEventProto): UOWApplicationEvent = { + override def deserialize(proto: UOWApplicationEventProto): UOWApplicationEvent = ??? /* { val beRefs = proto.getBeRefsList().asScala.map(beproto => fromProto(beproto)).toSeq UOWApplicationEvent(fromProto(proto.getEventRef()), beRefs) - } + } */ } object UOWNotificationSerializer extends UnitOfWorkSerialization with ProtoSerializer[UOWNotification, UOWNotificationProto] { - override def serialize(uowNotification: UOWNotification): UOWNotificationProto = { + override def serialize(uowNotification: UOWNotification): UOWNotificationProto = ??? /* { UOWNotificationProto .newBuilder() .setTxTime(toProto(uowNotification.tt)) .addAllAppEvents((uowNotification.appEvents.map(ae => toProto(ae))).asJava) .build() - } + } */ - override def deserialize(proto: UOWNotificationProto): UOWNotification = { + override def deserialize(proto: UOWNotificationProto): UOWNotification = ??? /* { val appEventProtos = proto.getAppEventsList().asScala val uowAppEvents = appEventProtos.map(proto => fromProto(proto)).toSeq val tt = fromProto(proto.getTxTime()) UOWNotification(uowAppEvents, tt) - } + } */ } object PartitionedUOWNotificationSerializer extends UnitOfWorkSerialization with ProtoSerializer[PartitionedUOWNotification, PartitionedUOWNotificationProto] { - override def serialize(partitionedUowNotification: PartitionedUOWNotification): PartitionedUOWNotificationProto = { + override def serialize(partitionedUowNotification: PartitionedUOWNotification): PartitionedUOWNotificationProto = ??? /* { val builder = PartitionedUOWNotificationProto .newBuilder() .addAllBeRefs((partitionedUowNotification.beRefs.map(be => toProto(be)).asJava)) @@ -158,29 +158,29 @@ object PartitionedUOWNotificationSerializer builder.setNumPartitionKeys(key) } builder.build() - } + } */ - override def deserialize(proto: PartitionedUOWNotificationProto): PartitionedUOWNotification = { + override def deserialize(proto: PartitionedUOWNotificationProto): PartitionedUOWNotification = ??? /* { val beRefProtos = proto.getBeRefsList().asScala val beRefs = beRefProtos.map(proto => fromProto(proto)).toSeq val tt = fromProto(proto.getTxTime()) val numPartitionKeys = if (proto.hasNumPartitionKeys) Some(proto.getNumPartitionKeys) else None PartitionedUOWNotification(beRefs, tt, numPartitionKeys) - } + } */ } object PartitionedUOWNotificationKeyInfoSerializer extends ProtoSerializer[PartitionedUOWNotificationKey, PartitionedUOWNotificationKeyProto] { - override def serialize(notificationKey: PartitionedUOWNotificationKey): PartitionedUOWNotificationKeyProto = { + override def serialize(notificationKey: PartitionedUOWNotificationKey): PartitionedUOWNotificationKeyProto = ??? /* { PartitionedUOWNotificationKeyProto .newBuilder() .setClassName(notificationKey.className) .setKeyName(notificationKey.keyName) .setKeyValue(notificationKey.keyValue) .build() - } + } */ override def deserialize(proto: PartitionedUOWNotificationKeyProto): PartitionedUOWNotificationKey = - PartitionedUOWNotificationKey(proto.getClassName(), proto.getKeyName(), proto.getKeyValue()) + ??? // PartitionedUOWNotificationKey(proto.getClassName(), proto.getKeyName(), proto.getKeyValue()) } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/VersioningProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/VersioningProtoSerialization.scala index 4585d3e4..799e3e52 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/VersioningProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/VersioningProtoSerialization.scala @@ -15,7 +15,6 @@ import com.google.protobuf.ByteString import msjava.slf4jutils.scalalog._ import optimus.platform.ImmutableArray import optimus.platform.dsi.bitemporal._ -import optimus.platform.dsi.bitemporal.proto.Dsi.SlotRedirectionInfoProto.PathElementProto import optimus.platform.dsi.bitemporal.proto.Dsi._ import optimus.platform.dsi.versioning._ import optimus.platform.storable.SerializedEntity @@ -31,7 +30,7 @@ trait VersioningProtoSerialization extends BasicProtoSerialization { object SlotRedirectionInfoSerializer extends WriteCommandProtoSerialization with ProtoSerializer[SlotRedirectionInfo, SlotRedirectionInfoProto] { - private def protoToPathElement(proto: PathElementProto): (PathHashT, Int, Int) = { + /* private def protoToPathElement(proto: PathElementProto): (PathHashT, Int, Int) = { val pathHash = PathHashRepr(ImmutableArray.wrapped(proto.getClasspathHash.toByteArray)) (pathHash, proto.getSourceSlotNumber, proto.getDestinationSlotNumber) } @@ -42,9 +41,8 @@ object SlotRedirectionInfoSerializer builder.setDestinationSlotNumber(destSlotNumber) builder.setClasspathHash(ByteString.copyFrom(pathHash.hash.rawArray)) builder.build() - } - - override def deserialize(proto: SlotRedirectionInfoProto): SlotRedirectionInfo = { + } */ + override def deserialize(proto: SlotRedirectionInfoProto): SlotRedirectionInfo = ??? /* { require(proto.getVersioningPathCount > 0, "Cannot deserialize SlotRedirectionInfoProto with empty path") val className = proto.getSourceClassName @@ -62,9 +60,9 @@ object SlotRedirectionInfoSerializer } SlotRedirectionInfo(className, (lastHash, lastSource, destSlotKeys), intermediates) - } + } */ - override def serialize(sri: SlotRedirectionInfo): SlotRedirectionInfoProto = { + override def serialize(sri: SlotRedirectionInfo): SlotRedirectionInfoProto = ??? /* { val builder = SlotRedirectionInfoProto.newBuilder builder.setSourceClassName(sri.sourceSlot.className) val pathBuilder = Seq.newBuilder[PathElementProto] @@ -79,24 +77,24 @@ object SlotRedirectionInfoSerializer builder.addAllVersioningPath(path.asJava) builder.addAllAdditionalDestinationSlotNumbers((destinationSlotNumbers.tail.map(Integer.valueOf(_))).asJava) builder.build() - } + } */ } object VersioningRedirectionInfoSerializer extends VersioningProtoSerialization with ProtoSerializer[VersioningRedirectionInfo, VersioningRedirectionInfoProto] { - override def deserialize(proto: VersioningRedirectionInfoProto): VersioningRedirectionInfo = { + override def deserialize(proto: VersioningRedirectionInfoProto): VersioningRedirectionInfo = ??? /* { val slotRedirections = proto.getSlotRedirectionInfosList.asScala.map(fromProto(_)) val sriMap: Map[SerializedEntity.TypeRef, Set[SlotRedirectionInfo]] = slotRedirections.toSet.groupBy(_.className) VersioningRedirectionInfo(sriMap) - } + } */ - override def serialize(cmd: VersioningRedirectionInfo): VersioningRedirectionInfoProto = { + override def serialize(cmd: VersioningRedirectionInfo): VersioningRedirectionInfoProto = ??? /* { val builder = VersioningRedirectionInfoProto.newBuilder val sriProtos = cmd.slotRedirections.values.flatMap(_.map(toProto(_))) builder.addAllSlotRedirectionInfos(sriProtos.toSeq.asJava) builder.build() - } + } */ } object VersioningResultSerializer @@ -106,7 +104,7 @@ object VersioningResultSerializer private[this] val log = getLogger(this) - override def serialize(result: VersioningResult): VersioningResultProto = { + override def serialize(result: VersioningResult): VersioningResultProto = ??? /* { result match { case v: VersioningValidResult => val validResult = @@ -142,9 +140,9 @@ object VersioningResultSerializer throw new UnsupportedOperationException( s"Unsupported result in VersioningResultProto serialization: ${result}.") } - } + } */ - override def deserialize(proto: VersioningResultProto): VersioningResult = { + override def deserialize(proto: VersioningResultProto): VersioningResult = ??? /* { if (proto.hasValidResult) { VersioningValidResult(proto.getValidResult.getVersionedCommandsList.asScala.map(fromProto(_))) } else if (proto.hasErrorResult) { @@ -162,5 +160,5 @@ object VersioningResultSerializer } else throw new UnsupportedOperationException( s"Unsupported proto result in VersioningResult deserialization: ${proto}.") - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/WriteCommandProtoSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/WriteCommandProtoSerialization.scala index cb00173f..901705ba 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/WriteCommandProtoSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/bitemporal/proto/WriteCommandProtoSerialization.scala @@ -70,40 +70,40 @@ object AssertValidSerializer extends WriteCommandProtoSerialization with ProtoSerializer[AssertValid, AssertValidProto] { - override def serialize(av: AssertValid): AssertValidProto = { + override def serialize(av: AssertValid): AssertValidProto = ??? /* { val builder = AssertValidProto.newBuilder av.refs foreach { e => builder.addReferences(toProto(e)) } builder.setValidTime(toProto(av.validTime)) builder.build - } + } */ - override def deserialize(proto: AssertValidProto): AssertValid = { + override def deserialize(proto: AssertValidProto): AssertValid = ??? /* { val references = proto.getReferencesList.asScala.map { fromProto(_) } AssertValid(references.toSeq, fromProto(proto.getValidTime)) - } + } */ } object AssertValidResultSerializer extends WriteCommandProtoSerialization with ProtoSerializer[AssertValidResult, AssertValidResultProto] { - override def deserialize(proto: AssertValidResultProto): AssertValidResult = { + override def deserialize(proto: AssertValidResultProto): AssertValidResult = ??? /* { AssertValidResult() - } + } */ - override def serialize(result: AssertValidResult): AssertValidResultProto = { + override def serialize(result: AssertValidResult): AssertValidResultProto = ??? /* { val builder = AssertValidResultProto.newBuilder builder.build - } + } */ } object PutSerializer extends WriteCommandProtoSerialization with ProtoSerializer[Put, PutProto] { - override def serialize(put: Put): PutProto = { + override def serialize(put: Put): PutProto = ??? /* { val builder = PutProto.newBuilder .setAfterTxTime(toProto(TimeInterval.NegInfinity)) .setValidTime(toProto(put.validTime)) @@ -113,20 +113,20 @@ object PutSerializer extends WriteCommandProtoSerialization with ProtoSerializer builder.setLockToken(put.lockToken.get) builder.build - } + } */ - override def deserialize(proto: PutProto): Put = { + override def deserialize(proto: PutProto): Put = ??? /* { val lockToken = if (proto.hasLockToken) Some(proto.getLockToken) else None Put(fromProto(proto.getSerializedEntity), lockToken, fromProto(proto.getValidTime)) - } + } */ } object PutResultSerializer extends WriteCommandProtoSerialization with ProtoSerializer[PutResult, PutResultProto] { - override def deserialize(proto: PutResultProto): PutResult = { + override def deserialize(proto: PutResultProto): PutResult = ??? /* { val txTimeTo = if (proto.hasTxTimeTo) Some(fromProto(proto.getTxTimeTo)) else None PutResult( fromProto(proto.getPermReference), @@ -136,9 +136,9 @@ object PutResultSerializer extends WriteCommandProtoSerialization with ProtoSeri txTimeTo, fromProto(proto.getTxTime) ) - } + } */ - override def serialize(result: PutResult): PutResultProto = { + override def serialize(result: PutResult): PutResultProto = ??? /* { val builder = PutResultProto.newBuilder .setPermReference(toProto(result.permRef)) .setVersionedReference(toProto(result.versionedRef)) @@ -149,23 +149,23 @@ object PutResultSerializer extends WriteCommandProtoSerialization with ProtoSeri if (result.txTimeTo.isDefined) builder.setTxTimeTo(toProto(result.txTimeTo.get)) builder.build - } + } */ } object AccMetadataCommandSerializer extends WriteCommandProtoSerialization with ProtoSerializer[AccMetadataCommand, AccMetadataCommandProto] { - override def serialize(acc: AccMetadataCommand): AccMetadataCommandProto = { + override def serialize(acc: AccMetadataCommand): AccMetadataCommandProto = ??? /* { val bld = AccMetadataCommandProto.newBuilder.setClsName(acc.clsName).setSlot(acc.slot).setAction(acc.action.toString) acc.accTtOpt.foreach(accTt => bld.setAccTxTime(toProto(accTt))) acc.accInfoOpt.foreach(info => bld.setAccInfo(toProto(info))) bld.setForceCreateIndex(acc.forceCreateIndex) bld.build - } + } */ - override def deserialize(proto: AccMetadataCommandProto): AccMetadataCommand = { + override def deserialize(proto: AccMetadataCommandProto): AccMetadataCommand = ??? /* { val accTtOpt = if (proto.hasAccTxTime) Some(fromProto(proto.getAccTxTime)) else None val accInfoOpt = if (proto.hasAccInfo) Some(fromProto(proto.getAccInfo)) else None val forceCreateIndex = if (proto.hasForceCreateIndex) proto.getForceCreateIndex else false @@ -176,50 +176,50 @@ object AccMetadataCommandSerializer accTtOpt, accInfoOpt, forceCreateIndex) - } + } */ } object AccTableResultSerializer extends WriteCommandProtoSerialization with ProtoSerializer[AccTableResult, AccTableResultProto] { - override def deserialize(proto: AccTableResultProto): AccTableResult = { + override def deserialize(proto: AccTableResultProto): AccTableResult = ??? /* { AccTableResult(proto.getClsName, proto.getSlot) - } + } */ - override def serialize(result: AccTableResult): AccTableResultProto = { + override def serialize(result: AccTableResult): AccTableResultProto = ??? /* { AccTableResultProto.newBuilder .setClsName(result.clsName) .setSlot(result.slot) .build - } + } */ } object ResolveKeysSerializer extends WriteCommandProtoSerialization with ProtoSerializer[ResolveKeys, ResolveKeysProto] { - override def serialize(resolve: ResolveKeys): ResolveKeysProto = { + override def serialize(resolve: ResolveKeys): ResolveKeysProto = ??? /* { val builder = ResolveKeysProto.newBuilder .addAllSerializedKey(resolve.keys.map { toProto(_) }.asJava) builder.build - } + } */ - override def deserialize(proto: ResolveKeysProto): ResolveKeys = { + override def deserialize(proto: ResolveKeysProto): ResolveKeys = ??? /* { val keys: Seq[SerializedKey] = proto.getSerializedKeyList.asScala.iterator.map { fromProto(_) }.toIndexedSeq new ResolveKeys(keys) - } + } */ } object ResolveKeysResultSerializer extends WriteCommandProtoSerialization with ProtoSerializer[ResolveKeysResult, ResolveKeysResultProto] { - override def serialize(resolve: ResolveKeysResult): ResolveKeysResultProto = { + override def serialize(resolve: ResolveKeysResult): ResolveKeysResultProto = ??? /* { val found = resolve.refs.map { r => Boolean.valueOf(r.isDefined) } @@ -232,9 +232,9 @@ object ResolveKeysResultSerializer .addAllFound(found.asJava) .addAllEntity(entities.asJava) builder.build - } + } */ - override def deserialize(proto: ResolveKeysResultProto): ResolveKeysResult = { + override def deserialize(proto: ResolveKeysResultProto): ResolveKeysResult = ??? /* { val entities = proto.getEntityList val foundList = proto.getFoundList.asScala var x = 0 @@ -250,14 +250,14 @@ object ResolveKeysResultSerializer } } new ResolveKeysResult(temp.toSeq) - } + } */ } object WriteBusinessEventSerializer extends WriteCommandProtoSerialization with ProtoSerializer[WriteBusinessEvent, WriteBusinessEventProto] { - override def serialize(writeEvent: WriteBusinessEvent): WriteBusinessEventProto = { + override def serialize(writeEvent: WriteBusinessEvent): WriteBusinessEventProto = ??? /* { val builder = WriteBusinessEventProto.newBuilder .setSerializedEvent(toProto(writeEvent.evt)) .setState(toProto(writeEvent.state)) @@ -287,9 +287,9 @@ object WriteBusinessEventSerializer } .asJava) builder.build - } + } */ - override def deserialize(proto: WriteBusinessEventProto): WriteBusinessEvent = { + override def deserialize(proto: WriteBusinessEventProto): WriteBusinessEvent = ??? /* { val asserts = proto.getAssertsList().asScala map { fromProto(_) @@ -324,70 +324,70 @@ object WriteBusinessEventSerializer invalidates.map(i => InvalidateRevertProps(i._1, i._2, "")), reverts.map(i => InvalidateRevertProps(i._1, i._2, "")) ) - } + } */ } object WriteBusinessEventPutSerializer extends WriteCommandProtoSerialization with ProtoSerializer[WriteBusinessEvent.Put, SerializedEntityTupleProto] { - override def serialize(wbePut: WriteBusinessEvent.Put): SerializedEntityTupleProto = { + override def serialize(wbePut: WriteBusinessEvent.Put): SerializedEntityTupleProto = ??? /* { val builder = SerializedEntityTupleProto.newBuilder .setSerEntity(toProto(wbePut.ent)) if (wbePut.lockToken.isDefined) builder.setLockToken(wbePut.lockToken.get) // if (wbePut.verRef.isDefined) builder.setVref(toProto(wbePut.verRef.get)) builder.build - } + } */ - override def deserialize(proto: SerializedEntityTupleProto): WriteBusinessEvent.Put = { + override def deserialize(proto: SerializedEntityTupleProto): WriteBusinessEvent.Put = ??? /* { val lockToken: Option[Long] = if (proto.hasLockToken()) Some(proto.getLockToken()) else None val vref: Option[VersionedReference] = if (proto.hasVref) Some(fromProto(proto.getVref)) else None val ser = fromProto(proto.getSerEntity()) WriteBusinessEvent.Put(ser, lockToken) - } + } */ } object WriteBusinessEventPutSlotsSerializer extends WriteCommandProtoSerialization with ProtoSerializer[WriteBusinessEvent.PutSlots, PutSlotsProto] { - override def serialize(putSlots: WriteBusinessEvent.PutSlots): PutSlotsProto = { + override def serialize(putSlots: WriteBusinessEvent.PutSlots): PutSlotsProto = ??? /* { val builder = PutSlotsProto.newBuilder putSlots.lockToken foreach builder.setLockToken builder.setOnlyLinkagesChanged(false) builder.addAllSerializedEntities((putSlots.ents.entities: Set[SerializedEntity]).map(e => toProto(e)).asJava) builder.build - } + } */ - override def deserialize(proto: PutSlotsProto): WriteBusinessEvent.PutSlots = { + override def deserialize(proto: PutSlotsProto): WriteBusinessEvent.PutSlots = ??? /* { val lockToken = if (proto.hasLockToken) Some(proto.getLockToken) else None val serializedEntities = proto.getSerializedEntitiesList.asScala.map { fromProto(_) }.toSeq WriteBusinessEvent.PutSlots(MultiSlotSerializedEntity(serializedEntities), lockToken) - } + } */ } object EntityReferenceTupleSerializer extends WriteCommandProtoSerialization with ProtoSerializer[Tuple2[EntityReference, Long], EntityReferenceTupleProto] { - override def serialize(entityRefTuple: (EntityReference, Long)): EntityReferenceTupleProto = { + override def serialize(entityRefTuple: (EntityReference, Long)): EntityReferenceTupleProto = ??? /* { EntityReferenceTupleProto.newBuilder .setEntityRef(toProto(entityRefTuple._1)) .setLockToken(entityRefTuple._2) .build - } + } */ - override def deserialize(proto: EntityReferenceTupleProto): (EntityReference, Long) = { + override def deserialize(proto: EntityReferenceTupleProto): (EntityReference, Long) = ??? /* { (fromProto(proto.getEntityRef()), proto.getLockToken()) - } + } */ } object WriteBusinessEventResultSerializer extends WriteCommandProtoSerialization with ProtoSerializer[WriteBusinessEventResult, WriteBusinessEventResultProto] { - override def deserialize(proto: WriteBusinessEventResultProto): WriteBusinessEventResult = { + override def deserialize(proto: WriteBusinessEventResultProto): WriteBusinessEventResult = ??? /* { WriteBusinessEventResult( proto.getPutResultsList().asScala map { fromProto(_) @@ -396,23 +396,23 @@ object WriteBusinessEventResultSerializer Seq.empty, Seq.empty, fromProto(proto.getTxTime())) - } + } */ - override def serialize(result: WriteBusinessEventResult): WriteBusinessEventResultProto = { + override def serialize(result: WriteBusinessEventResult): WriteBusinessEventResultProto = ??? /* { val builder = WriteBusinessEventResultProto.newBuilder .addAllPutResults(result.putResults.map { toProto(_) }.asJava) .setTxTime(toProto(result.txTime)) builder.build - } + } */ } object PutApplicationEventResultSerializer extends WriteCommandProtoSerialization with ProtoSerializer[PutApplicationEventResult, PutApplicationEventResultProto] { - override def serialize(in: PutApplicationEventResult): PutApplicationEventResultProto = { + override def serialize(in: PutApplicationEventResult): PutApplicationEventResultProto = ??? /* { val builder = PutApplicationEventResultProto.newBuilder .setAppEvent(toProto(in.appEvent)) @@ -421,13 +421,13 @@ object PutApplicationEventResultSerializer }).asJava) .setTxTime(toProto(in.appEvent.tt)) builder.build - } + } */ - override def deserialize(proto: PutApplicationEventResultProto): PutApplicationEventResult = { + override def deserialize(proto: PutApplicationEventResultProto): PutApplicationEventResult = ??? /* { PutApplicationEventResult( fromProto(proto.getAppEvent), proto.getBusinessEventResultsList().asScala.iterator.map(fromProto(_)).toIndexedSeq) - } + } */ } object PutApplicationEventSerializer @@ -436,7 +436,7 @@ object PutApplicationEventSerializer override def serialize( in: PutApplicationEvent - ): PutApplicationEventProto = { + ): PutApplicationEventProto = ??? /* { val builder = PutApplicationEventProto.newBuilder .addAllBusinessEvents(in.bes.map(toProto(_)).asJava) .setApplication(in.application) @@ -449,11 +449,11 @@ object PutApplicationEventSerializer builder.setRetry(in.retry) } builder.build - } + } */ override def deserialize( proto: PutApplicationEventProto - ): PutApplicationEvent = { + ): PutApplicationEvent = ??? /* { import scala.jdk.CollectionConverters._ val clientTx = if (proto.hasClientTxTime) Some(fromProto(proto.getClientTxTime)) else None @@ -470,20 +470,20 @@ object PutApplicationEventSerializer appEvtId = appEvtId, retry = retry ) - } + } */ } object InvalidateAfterSerializer extends WriteCommandProtoSerialization with ProtoSerializer[InvalidateAfter, InvalidateAfterProto] { - override def deserialize(proto: InvalidateAfterProto): InvalidateAfter = { + override def deserialize(proto: InvalidateAfterProto): InvalidateAfter = ??? /* { val lt = if (proto.hasLockToken) proto.getLockToken else 0L val eref = if (proto.hasEntityReference) fromProto(proto.getEntityReference) else null InvalidateAfter(eref, fromProto(proto.getVersionedReference), lt, fromProto(proto.getValidTime), "") - } + } */ - override def serialize(invalidate: InvalidateAfter): InvalidateAfterProto = { + override def serialize(invalidate: InvalidateAfter): InvalidateAfterProto = ??? /* { val builder = InvalidateAfterProto.newBuilder if (invalidate.entityRef != null) builder.setEntityReference(toProto(invalidate.entityRef)) @@ -493,14 +493,14 @@ object InvalidateAfterSerializer .setValidTime(toProto(invalidate.validTime)) .setLockToken(invalidate.lockToken) .build - } + } */ } object InvalidateAfterResultSerializer extends WriteCommandProtoSerialization with ProtoSerializer[InvalidateAfterResult, InvalidateAfterResultProto] { - override def deserialize(proto: InvalidateAfterResultProto): InvalidateAfterResult = { + override def deserialize(proto: InvalidateAfterResultProto): InvalidateAfterResult = ??? /* { import scala.jdk.CollectionConverters._ val types = proto.getTypesList.asScala.toSeq @@ -509,9 +509,9 @@ object InvalidateAfterResultSerializer } toSeq InvalidateAfterResult(fromProto(proto.getEntityReference), types, keys, fromProto(proto.getTxTime)) - } + } */ - override def serialize(invalidate: InvalidateAfterResult): InvalidateAfterResultProto = { + override def serialize(invalidate: InvalidateAfterResult): InvalidateAfterResultProto = ??? /* { val builder = InvalidateAfterResultProto.newBuilder .setVersionedReference(toProto(VersionedReference.Nil)) .setTxTime(toProto(invalidate.txTime)) @@ -522,95 +522,95 @@ object InvalidateAfterResultSerializer .setEntityReference(toProto(invalidate.permRef)) builder.build - } + } */ } object InvalidateAllCurrentSerializer extends WriteCommandProtoSerialization with ProtoSerializer[InvalidateAllCurrent, InvalidateAllCurrentProto] { - override def deserialize(proto: InvalidateAllCurrentProto): InvalidateAllCurrent = { + override def deserialize(proto: InvalidateAllCurrentProto): InvalidateAllCurrent = ??? /* { InvalidateAllCurrent(proto.getClassName, if (proto.hasCount) Some(proto.getCount) else None) - } + } */ - override def serialize(invalidate: InvalidateAllCurrent): InvalidateAllCurrentProto = { + override def serialize(invalidate: InvalidateAllCurrent): InvalidateAllCurrentProto = ??? /* { val builder = InvalidateAllCurrentProto.newBuilder .setClassName(invalidate.clazzName) invalidate.count.foreach(c => builder.setCount(c)) builder.build - } + } */ } object InvalidateAllCurrentResultSerializer extends WriteCommandProtoSerialization with ProtoSerializer[InvalidateAllCurrentResult, InvalidateAllCurrentResultProto] { - override def deserialize(proto: InvalidateAllCurrentResultProto): InvalidateAllCurrentResult = { + override def deserialize(proto: InvalidateAllCurrentResultProto): InvalidateAllCurrentResult = ??? /* { val txTime = if (proto.hasTxTime) Some(InstantSerializer.deserialize(proto.getTxTime)) else None new InvalidateAllCurrentResult(proto.getCount, txTime) - } + } */ - override def serialize(invalidate: InvalidateAllCurrentResult): InvalidateAllCurrentResultProto = { + override def serialize(invalidate: InvalidateAllCurrentResult): InvalidateAllCurrentResultProto = ??? /* { val builder = InvalidateAllCurrentResultProto.newBuilder .setCount(invalidate.count) invalidate.txTime.foreach(tx => builder.setTxTime(InstantSerializer.serialize(tx))) builder.build - } + } */ } object InvalidateAllCurrentByRefsSerializer extends WriteCommandProtoSerialization with ProtoSerializer[InvalidateAllCurrentByRefs, InvalidateAllCurrentByRefsProto] { - override def deserialize(proto: InvalidateAllCurrentByRefsProto): InvalidateAllCurrentByRefs = { + override def deserialize(proto: InvalidateAllCurrentByRefsProto): InvalidateAllCurrentByRefs = ??? /* { InvalidateAllCurrentByRefs( proto.getEntityReferencesList.asScala.map(EntityReferenceSerializer.deserialize(_)), proto.getClassName) - } + } */ - override def serialize(command: InvalidateAllCurrentByRefs): InvalidateAllCurrentByRefsProto = { + override def serialize(command: InvalidateAllCurrentByRefs): InvalidateAllCurrentByRefsProto = ??? /* { InvalidateAllCurrentByRefsProto.newBuilder .addAllEntityReferences(command.entityReferences.map(EntityReferenceSerializer.serialize(_)).asJava) .setClassName(command.clazzName) .build - } + } */ } object CreateSlotsSerializer extends WriteCommandProtoSerialization with ProtoSerializer[CreateSlots, CreateSlotsProto] { - override def deserialize(proto: CreateSlotsProto): CreateSlots = { + override def deserialize(proto: CreateSlotsProto): CreateSlots = ??? /* { val className = proto.getClassName val slots = proto.getSlotsList.asScala.map(_.toInt).toSet new CreateSlots(className, slots) - } + } */ - override def serialize(cmd: CreateSlots): CreateSlotsProto = { + override def serialize(cmd: CreateSlots): CreateSlotsProto = ??? /* { val builder = CreateSlotsProto.newBuilder builder.setClassName(cmd.fqcn) builder.addAllSlots(cmd.slots.toSeq.map(Integer.valueOf(_)) asJava) builder.build - } + } */ } object CreateSlotsResultSerializer extends WriteCommandProtoSerialization with ProtoSerializer[CreateSlotsResult, CreateSlotsResultProto] { - override def deserialize(proto: CreateSlotsResultProto): CreateSlotsResult = { + override def deserialize(proto: CreateSlotsResultProto): CreateSlotsResult = ??? /* { val alreadyExistingSlots = proto.getAlreadyExistingSlotsList.asScala.map(_.toInt).toSet new CreateSlotsResult(alreadyExistingSlots) - } + } */ - override def serialize(res: CreateSlotsResult): CreateSlotsResultProto = { + override def serialize(res: CreateSlotsResult): CreateSlotsResultProto = ??? /* { val builder = CreateSlotsResultProto.newBuilder if (res.alreadyExistingSlots.nonEmpty) builder.addAllAlreadyExistingSlots(res.alreadyExistingSlots.toSeq.map(Integer.valueOf(_)).asJava) builder.build() - } + } */ } object FillSlotSerializer extends WriteCommandProtoSerialization with ProtoSerializer[FillSlot, FillSlotProto] { - override def deserialize(proto: FillSlotProto): FillSlot = { + override def deserialize(proto: FillSlotProto): FillSlot = ??? /* { val fqcn = proto.getFqcn val entityRef = fromProto(proto.getEntityReference) val newEntityVersions = { @@ -619,9 +619,9 @@ object FillSlotSerializer extends WriteCommandProtoSerialization with ProtoSeria vrefs zip ses } FillSlot(fqcn, entityRef, newEntityVersions.toSeq) - } + } */ - override def serialize(fs: FillSlot): FillSlotProto = { + override def serialize(fs: FillSlot): FillSlotProto = ??? /* { val builder = FillSlotProto.newBuilder builder.setFqcn(fs.fqcn) builder.setEntityReference(toProto(fs.entityReference)) @@ -629,5 +629,5 @@ object FillSlotSerializer extends WriteCommandProtoSerialization with ProtoSeria builder.addAllVersionedReferences(vrefs.map(toProto(_)).asJava) builder.addAllSerializedEntities(ses.map(toProto(_)).asJava) builder.build - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/connection/ProtocolVersionEstablisher.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/connection/ProtocolVersionEstablisher.scala index d2b6743f..7256a911 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/connection/ProtocolVersionEstablisher.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/connection/ProtocolVersionEstablisher.scala @@ -41,22 +41,22 @@ class DalProtocolVersionEstablisher private (myProtocolVersion: DalProtocolVersi private var remoteDalProtocolVersion: DalProtocolVersion = DalProtocolVersion.EstablisherNotUsed - private var status = MSNetEstablishStatus.UNKNOWN + private var status: MSNetEstablishStatus = MSNetEstablishStatus.UNKNOWN private var conn: MSNetTCPConnection = _ private val writeBuf = new MSNetTCPSocketBuffer - override def init(isServerSide: Boolean, conn: MSNetTCPConnection): Unit = { + /* override */ def init(isServerSide: Boolean, conn: MSNetTCPConnection): Unit = { require(this.conn eq null, s"Cannot reuse establisher with connection ${this.conn} for new connection $conn") log.trace(s"Initializing establisher for ${conn.getAddress}") this.conn = conn } - override def cleanup(): Unit = { + /* override */ def cleanup(): Unit = { log.trace(s"Clear write buffer for $conn") writeBuf.clear() } - override def establish(readBuf: MSNetTCPSocketBuffer): MSNetEstablishStatus = { + /* override */ def establish(readBuf: MSNetTCPSocketBuffer): MSNetEstablishStatus = { log.debug(s"Begin protocol version establishment for $conn") if (status.isUnknown) { // Write our own protocol data @@ -78,11 +78,11 @@ class DalProtocolVersionEstablisher private (myProtocolVersion: DalProtocolVersi status } - override def getStatus: MSNetEstablishStatus = status + /* override */ def getStatus: MSNetEstablishStatus = status - override def getOutputBuffer: MSNetTCPSocketBuffer = writeBuf + /* override */ def getOutputBuffer: MSNetTCPSocketBuffer = writeBuf - override def getEstablisherName: String = "DalProtocolVersionEstablisher" + /* override */ def getEstablisherName: String = "DalProtocolVersionEstablisher" private def createProtocolData(): Array[Byte] = { val buff = ByteBuffer.allocate(MessageSize) @@ -120,7 +120,7 @@ class DalProtocolVersionEstablisherFactory(protocolVersion: DalProtocolVersion) val optionalProtoEstablisher = getBoolProperty("optimus.platform.dsi.connection.dalProtocolVersionEstablisher.optional", false) - override def createEstablisher(): MSNetEstablisher = + /* override */ def createEstablisher(): MSNetEstablisher = DalProtocolVersionEstablisher(protocolVersion, optional = optionalProtoEstablisher) } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/ExpressionSqlFormatter.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/ExpressionSqlFormatter.scala index 795c5cf6..b26eb91c 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/ExpressionSqlFormatter.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/ExpressionSqlFormatter.scala @@ -584,7 +584,7 @@ class DefaultConstFormatter extends ConstFormatter { } protected def formatInner(value: Any): String = { - def serialize(v: Any): Any = { + def serialize(v: Any): Any = ??? /* { v match { case e: EntityReference => e.toString case be: BusinessEventReference => be.toString @@ -606,7 +606,7 @@ class DefaultConstFormatter extends ConstFormatter { case _ => v } - } + } */ serialize(value) match { case str: String => str diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/proto/ExpressionDecoder.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/proto/ExpressionDecoder.scala index cc77302b..6d5171b2 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/proto/ExpressionDecoder.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/proto/ExpressionDecoder.scala @@ -29,7 +29,7 @@ import scala.jdk.CollectionConverters._ * decode GPB ExpressionProto to Expression */ trait ExpressionDecoder { - def decode(proto: ExpressionProto): Expression = { + def decode(proto: ExpressionProto): Expression = ??? /* { import ExpressionProto.Type proto.getType match { case Type.Entity => decode(proto.getEntity) @@ -51,17 +51,17 @@ trait ExpressionDecoder { case Type.Embeddable => decode(proto.getEmbeddable) case Type.EntityBitempSpace => decode(proto.getEntityBitempSpace) } - } + } */ - protected def decode(proto: EntityBitempSpaceProto.Kind): UpdateKind = { + protected def decode(proto: EntityBitempSpaceProto.Kind): UpdateKind = ??? /* { import EntityBitempSpaceProto.Kind proto match { case Kind.Delta => DeltaUpdate case Kind.All => AllRects } - } + } */ - protected def decode(proto: EntityBitempSpaceProto): EntityBitemporalSpace = { + protected def decode(proto: EntityBitempSpaceProto): EntityBitemporalSpace = ??? /* { EntityBitemporalSpace( proto.getName, decode(proto.getWhen).asInstanceOf[DSIQueryTemporality.BitempRange], @@ -69,46 +69,46 @@ trait ExpressionDecoder { proto.getSuperClassesList.asScala, decode(proto.getId) ) - } + } */ - protected def decode(proto: EntityProto): Entity = { + protected def decode(proto: EntityProto): Entity = ??? /* { Entity(proto.getName, decode(proto.getWhen), proto.getSuperClassesList.asScala, decode(proto.getId)) - } + } */ - protected def decode(proto: EventProto): Event = { + protected def decode(proto: EventProto): Event = ??? /* { Event(proto.getName, decode(proto.getWhen), decode(proto.getId)) - } + } */ - protected def decode(proto: LinkageProto): Linkage = { + protected def decode(proto: LinkageProto): Linkage = ??? /* { Linkage(proto.getName, decode(proto.getWhen), decode(proto.getId)) - } + } */ - protected def decode(proto: EmbeddableProto): Embeddable = { + protected def decode(proto: EmbeddableProto): Embeddable = ??? /* { Embeddable(proto.getEntity, proto.getProperty, proto.getTag, decode(proto.getId)) - } + } */ - protected def decode(proto: PropertyProto): Property = { + protected def decode(proto: PropertyProto): Property = ??? /* { Property(propType = decode(proto.getPropType), names = proto.getNamesList.asScala, owner = decode(proto.getOwner)) - } + } */ - protected def decode(proto: ConstantProto): Constant = { + protected def decode(proto: ConstantProto): Constant = ??? /* { val typeCode = decode(proto.getTypeCode) val value = typeCode match { case TypeCode.SerializedKey => SerializedKeySerializer.deserialize(SerializedKeyProto.parseFrom(proto.getValue)) case _ => ProtoPickleSerializer.protoToProperties(FieldProto.parseFrom(proto.getValue)) } Constant(value, decode(proto.getTypeCode)) - } + } */ - protected def decode(proto: BinaryProto): Binary = { + protected def decode(proto: BinaryProto): Binary = ??? /* { Binary( op = decode(proto.getOperator), left = decode(proto.getLeft), right = decode(proto.getRight) ) - } + } */ - protected def decode(proto: InProto): In = { + protected def decode(proto: InProto): In = ??? /* { val e = decode(proto.getExpression) if (proto.hasSelect) In(e, decode(proto.getSelect)) @@ -116,9 +116,9 @@ trait ExpressionDecoder { val v: List[Expression] = proto.getValuesList.asScala.iterator.map(decode(_)).toList In(e, v) } - } + } */ - protected def decode(proto: SelectProto): Select = { + protected def decode(proto: SelectProto): Select = ??? /* { Select( from = deserializeQuerySource(proto.getFrom), properties = proto.getPropertiesList.asScala.iterator.map(decode(_)).toList, @@ -131,64 +131,64 @@ trait ExpressionDecoder { reverse = proto.getReverse, id = decode(proto.getId) ) - } + } */ private def deserializeQuerySource(e: ExpressionProto): QuerySource = { decode(e).asInstanceOf[QuerySource] } - protected def decode(proto: JoinProto): Join = { + protected def decode(proto: JoinProto): Join = ??? /* { Join( joinType = decode(proto.getJoinType), left = deserializeQuerySource(proto.getLeft), right = deserializeQuerySource(proto.getRight), on = if (proto.hasOn) Some(decode(proto.getOn)) else None ) - } + } */ - protected def decode(proto: MemberProto): Member = { + protected def decode(proto: MemberProto): Member = ??? /* { Member(proto.getName, decode(proto.getOwner)) - } + } */ - protected def decode(proto: FunctionProto): Function = { + protected def decode(proto: FunctionProto): Function = ??? /* { Function( method = proto.getMethod, arguments = proto.getArgumentsList.asScala.iterator.map(decode(_)).toList ) - } + } */ - protected def decode(proto: UnaryProto): Unary = { + protected def decode(proto: UnaryProto): Unary = ??? /* { Unary( op = decode(proto.getOperator), e = decode(proto.getExpression) ) - } + } */ - protected def decode(proto: ConditionProto): Condition = { + protected def decode(proto: ConditionProto): Condition = ??? /* { Condition( check = decode(proto.getCheck), ifTrue = decode(proto.getIfTrue), ifFalse = decode(proto.getIfFalse) ) - } + } */ - protected def decode(proto: AggregateProto): Aggregate = { + protected def decode(proto: AggregateProto): Aggregate = ??? /* { Aggregate( aggregateType = decode(proto.getAggregateType), arguments = proto.getArgumentsList.asScala.iterator.map(decode(_)).toList, proto.getDistinct ) - } + } */ - protected def decode(proto: ScalarProto): Scalar = { + protected def decode(proto: ScalarProto): Scalar = ??? /* { Scalar(decode(proto.getQuery)) - } + } */ - protected def decode(proto: ExistsProto): Exists = { + protected def decode(proto: ExistsProto): Exists = ??? /* { Exists(decode(proto.getQuery)) - } + } */ - protected def decode(typeCode: TypeCodeProto): TypeCode = { + protected def decode(typeCode: TypeCodeProto): TypeCode = ??? /* { typeCode match { case TypeCodeProto.Int => TypeCode.Int case TypeCodeProto.String => TypeCode.String @@ -218,9 +218,9 @@ trait ExpressionDecoder { case TypeCodeProto.VersionedReference => TypeCode.VersionedReference case TypeCodeProto.Rectangle => TypeCode.Rectangle } - } + } */ - protected def decode(op: BinaryProto.BinaryOperator): BinaryOperator = { + /* protected def decode(op: BinaryProto.BinaryOperator): BinaryOperator = { op match { case BinaryProto.BinaryOperator.AndAlso => BinaryOperator.AndAlso case BinaryProto.BinaryOperator.OrElse => BinaryOperator.OrElse @@ -283,9 +283,9 @@ trait ExpressionDecoder { case PropertyProto.PropertyType.Index => PropertyType.Index case PropertyProto.PropertyType.Special => PropertyType.Special } - } + } */ - protected def decode(proto: TemporalityProto): DSIQueryTemporality = { + protected def decode(proto: TemporalityProto): DSIQueryTemporality = ??? /* import TemporalityProto.Type._ proto.getType match { case At => DSIQueryTemporality.At(decode(proto.getValidTime), decode(proto.getTxTime)) @@ -305,36 +305,36 @@ trait ExpressionDecoder { } case OpenVtTxRange => DSIQueryTemporality.OpenVtTxRange(decode(proto.getOpenVtTxRange)) } - } + } */ private def toTimeInterval(vt: ValidTimeInterval): TimeInterval = { // DSIQueryTemporality.BitempRange requires TimeInterval TimeInterval(vt.from, vt.to) } - protected def decode(proto: ValidTimeIntervalProto): ValidTimeInterval = { + protected def decode(proto: ValidTimeIntervalProto): ValidTimeInterval = ??? /* { ValidTimeInterval(decode(proto.getFrom), decode(proto.getTo)) - } + } */ - protected def decode(proto: TimeIntervalProto): TimeInterval = { + protected def decode(proto: TimeIntervalProto): TimeInterval = ??? /* { TimeInterval(decode(proto.getFrom), decode(proto.getTo)) - } + } */ - protected def decode(proto: InstantProto): Instant = { + protected def decode(proto: InstantProto): Instant = ??? /* { InstantSerializer.ofEpochSecond(proto.getSeconds, proto.getNano) - } + } */ - protected def decode(proto: PropertyDefProto): PropertyDef = { + protected def decode(proto: PropertyDefProto): PropertyDef = ??? /* { PropertyDef(proto.getName, decode(proto.getExpression)) - } + } */ - protected def decode(proto: SortByDefProto): SortByDef = { + protected def decode(proto: SortByDefProto): SortByDef = ??? /* { val sortType = proto.getSortType match { case SortByDefProto.SortType.Asc => SortType.Asc case SortByDefProto.SortType.Desc => SortType.Desc } SortByDef(sortType, decode(proto.getExpression)) - } + } */ protected def decode(id: Int): Id } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/proto/ExpressionEncoder.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/proto/ExpressionEncoder.scala index 5ed15071..3d01ce6c 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/proto/ExpressionEncoder.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/proto/ExpressionEncoder.scala @@ -28,7 +28,7 @@ import scala.jdk.CollectionConverters._ * encode Expression to GPB ExpressionProto */ trait ExpressionEncoder { - def encode(obj: Expression): ExpressionProto = { + def encode(obj: Expression): ExpressionProto = ??? /* { val b = ExpressionProto.newBuilder obj match { case e: Entity => @@ -69,9 +69,9 @@ trait ExpressionEncoder { b.setType(ExpressionProto.Type.Embeddable).setEmbeddable(encode(e)) } b.build() - } + } */ - protected def encode(obj: EntityBitemporalSpace): EntityBitempSpaceProto = { + protected def encode(obj: EntityBitemporalSpace): EntityBitempSpaceProto = ??? /* { import EntityBitempSpaceProto.Kind val kind = obj.kind match { case AllRects => Kind.All @@ -85,51 +85,58 @@ trait ExpressionEncoder { .setKind(kind) .addAllSuperClasses(obj.superClasses.asJava) .build() - } + } */ - protected def encode(obj: Entity): EntityProto = { - EntityProto.newBuilder + protected def encode(obj: Entity): EntityProto = ??? /* { + import EntityBitempSpaceProto.Kind + val kind = obj.kind match { + case AllRects => Kind.All + case DeltaUpdate => Kind.Delta + } + EntityBitempSpaceProto + .newBuilder() .setName(obj.name) .setId(encode(obj.id)) .setWhen(encode(obj.when)) + .setKind(kind) .addAllSuperClasses(obj.superClasses.asJava) .build() - } + } */ - protected def encode(obj: Event): EventProto = { + protected def encode(obj: Event): EventProto = ??? /* { EventProto.newBuilder .setName(obj.name) .setId(encode(obj.id)) .setWhen(encode(obj.when)) .build() - } + } */ - protected def encode(obj: Linkage): LinkageProto = { + protected def encode(obj: Linkage): LinkageProto = ??? /* { LinkageProto.newBuilder .setName(obj.name) .setId(encode(obj.id)) .setWhen(encode(obj.when)) .build() - } + } */ - protected def encode(obj: Embeddable): EmbeddableProto = { + protected def encode(obj: Embeddable): EmbeddableProto = ??? /* { EmbeddableProto.newBuilder .setId(encode(obj.id)) .setEntity(obj.entity) .setProperty(obj.property) .setTag(obj.tag) .build() - } + } */ - protected def encode(obj: Property): PropertyProto = { + protected def encode(obj: Property): PropertyProto = ??? /* { PropertyProto.newBuilder .setOwner(encode(obj.owner)) .setPropType(encode(obj.propType)) .addAllNames(obj.names.asJava) .build() - } + } */ - protected def encode(obj: Constant): ConstantProto = { + protected def encode(obj: Constant): ConstantProto = ??? /* { val value = obj.value match { case s: SerializedKey => SerializedKeySerializer.serialize(s) case _ => ProtoPickleSerializer.propertiesToProto(obj.value) @@ -138,26 +145,26 @@ trait ExpressionEncoder { .setTypeCode(encode(obj.typeCode)) .setValue(value.toByteString) .build() - } + } */ - protected def encode(obj: Binary): BinaryProto = { + protected def encode(obj: Binary): BinaryProto = ??? /*{ BinaryProto.newBuilder .setOperator(encode(obj.op)) .setLeft(encode(obj.left)) .setRight(encode(obj.right)) .build() - } + } */ - protected def encode(obj: In): InProto = { + protected def encode(obj: In): InProto = ??? /* { val b = InProto.newBuilder obj.values match { case Left(select) => b.setSelect(encode(select)) case Right(list) => b.addAllValues(list.map(encode(_)).asJava) } b.setExpression(encode(obj.e)).build() - } + } */ - protected def encode(obj: Select): SelectProto = { + protected def encode(obj: Select): SelectProto = ??? /* { val b = SelectProto.newBuilder .setFrom(encode(obj.from)) .setId(encode(obj.id)) @@ -170,67 +177,67 @@ trait ExpressionEncoder { obj.take.foreach(t => b.setTake(encode(t))) obj.skip.foreach(t => b.setSkip(encode(t))) b.build() - } + } */ - protected def encode(obj: Join): JoinProto = { + protected def encode(obj: Join): JoinProto = ??? /* { val b = JoinProto.newBuilder .setJoinType(encode(obj.joinType)) .setLeft(encode(obj.left)) .setRight(encode(obj.right)) obj.on.foreach(on => b.setOn(encode(on))) b.build() - } + } */ - protected def encode(obj: Member): MemberProto = { + protected def encode(obj: Member): MemberProto = ??? /* { MemberProto.newBuilder .setName(obj.name) .setOwner(encode(obj.owner)) .build() - } + } */ - protected def encode(obj: Function): FunctionProto = { + protected def encode(obj: Function): FunctionProto = ??? /* { FunctionProto.newBuilder .setMethod(obj.method) .addAllArguments(obj.arguments.map(encode(_)).asJava) .build() - } + } */ - protected def encode(obj: Unary): UnaryProto = { + protected def encode(obj: Unary): UnaryProto = ??? /* { UnaryProto.newBuilder .setOperator(encode(obj.op)) .setExpression(encode(obj.e)) .build() - } + } */ - protected def encode(obj: Condition): ConditionProto = { + protected def encode(obj: Condition): ConditionProto = ??? /* { ConditionProto.newBuilder .setCheck(encode(obj.check)) .setIfTrue(encode(obj.ifTrue)) .setIfFalse(encode(obj.ifFalse)) .build() - } + } */ - protected def encode(obj: Aggregate): AggregateProto = { + protected def encode(obj: Aggregate): AggregateProto = ??? /* { AggregateProto.newBuilder .setAggregateType(encode(obj.aggregateType)) .addAllArguments(obj.arguments.map(encode(_)).asJava) .setDistinct(obj.isDistinct) .build() - } + } */ - protected def encode(obj: Scalar): ScalarProto = { + protected def encode(obj: Scalar): ScalarProto = ??? /* { ScalarProto.newBuilder .setQuery(encode(obj.query)) .build() - } + } */ - protected def encode(obj: Exists): ExistsProto = { + protected def encode(obj: Exists): ExistsProto = ??? /* { ExistsProto.newBuilder .setQuery(encode(obj.query)) .build() - } + } */ - protected def encode(typeCode: TypeCode): TypeCodeProto = { + protected def encode(typeCode: TypeCode): TypeCodeProto = ??? /* { typeCode match { case TypeCode.Int => TypeCodeProto.Int case TypeCode.String => TypeCodeProto.String @@ -260,9 +267,9 @@ trait ExpressionEncoder { case TypeCode.VersionedReference => TypeCodeProto.VersionedReference case TypeCode.Rectangle => TypeCodeProto.Rectangle } - } + } */ - protected def encode(op: BinaryOperator): BinaryProto.BinaryOperator = { + /* protected def encode(op: BinaryOperator): BinaryProto.BinaryOperator = { op match { case BinaryOperator.AndAlso => BinaryProto.BinaryOperator.AndAlso case BinaryOperator.OrElse => BinaryProto.BinaryOperator.OrElse @@ -325,9 +332,9 @@ trait ExpressionEncoder { case PropertyType.Index => PropertyProto.PropertyType.Index case PropertyType.Special => PropertyProto.PropertyType.Special } - } + } */ - protected def encode(obj: DSIQueryTemporality): TemporalityProto = { + protected def encode(obj: DSIQueryTemporality): TemporalityProto = ??? /* { val b = TemporalityProto.newBuilder obj match { case DSIQueryTemporality.At(validTime, txTime) => @@ -350,41 +357,41 @@ trait ExpressionEncoder { } b.build() - } + } */ private def toValidTimeInterval(i: TimeInterval): ValidTimeInterval = { ValidTimeInterval(i.from, i.to) } - protected def encode(obj: ValidTimeInterval): ValidTimeIntervalProto = { + protected def encode(obj: ValidTimeInterval): ValidTimeIntervalProto = ??? /* { ValidTimeIntervalProto.newBuilder .setFrom(encode(obj.from)) .setTo(encode(obj.to)) .build() - } + } */ - protected def encode(obj: TimeInterval): TimeIntervalProto = { + protected def encode(obj: TimeInterval): TimeIntervalProto = ??? /* { TimeIntervalProto.newBuilder .setFrom(encode(obj.from)) .setTo(encode(obj.to)) .build() - } + } */ - protected def encode(obj: Instant): InstantProto = { + protected def encode(obj: Instant): InstantProto = ??? /* { InstantProto.newBuilder .setNano(obj.getNano) .setSeconds(obj.getEpochSecond) .build() - } + } */ - protected def encode(obj: PropertyDef): PropertyDefProto = { + protected def encode(obj: PropertyDef): PropertyDefProto = ??? /* { PropertyDefProto.newBuilder .setName(obj.name) .setExpression(encode(obj.e)) .build() - } + } */ - protected def encode(obj: SortByDef): SortByDefProto = { + protected def encode(obj: SortByDef): SortByDefProto = ??? /* { val sortType = obj.sortType match { case SortType.Asc => SortByDefProto.SortType.Asc case SortType.Desc => SortByDefProto.SortType.Desc @@ -393,7 +400,7 @@ trait ExpressionEncoder { .setSortType(sortType) .setExpression(encode(obj.e)) .build() - } + } */ protected def encode(id: Id): Int } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/proto/Expressions.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/proto/Expressions.scala new file mode 100644 index 00000000..af0e2b48 --- /dev/null +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/expressions/proto/Expressions.scala @@ -0,0 +1,47 @@ +package optimus.platform.dsi.expressions.proto + +object Expressions { + trait MessageLiteImpl extends com.google.protobuf.MessageLite { + def getParserForType(): com.google.protobuf.Parser[_ <: com.google.protobuf.MessageLite] = ??? + def getSerializedSize(): Int = ??? + def newBuilderForType(): com.google.protobuf.MessageLite.Builder = ??? + def toBuilder(): com.google.protobuf.MessageLite.Builder = ??? + def toByteArray(): Array[Byte] = ??? + def toByteString(): com.google.protobuf.ByteString = ??? + def writeDelimitedTo(output: java.io.OutputStream): Unit = ??? + def writeTo(output: java.io.OutputStream): Unit = ??? + def writeTo(output: com.google.protobuf.CodedOutputStream): Unit = ??? + def getDefaultInstanceForType(): com.google.protobuf.MessageLite = ??? + def isInitialized(): Boolean = ??? + } + + class ExpressionProto extends MessageLiteImpl + class EntityBitempSpaceProto extends MessageLiteImpl + object EntityBitempSpaceProto { + class Kind + } + class EntityProto extends MessageLiteImpl + class EventProto extends MessageLiteImpl + class LinkageProto extends MessageLiteImpl + class EmbeddableProto extends MessageLiteImpl + class PropertyProto extends MessageLiteImpl + class ConstantProto extends MessageLiteImpl + class BinaryProto extends MessageLiteImpl + class InProto extends MessageLiteImpl + class SelectProto extends MessageLiteImpl + class JoinProto extends MessageLiteImpl + class MemberProto extends MessageLiteImpl + class FunctionProto extends MessageLiteImpl + class UnaryProto extends MessageLiteImpl + class ConditionProto extends MessageLiteImpl + class AggregateProto extends MessageLiteImpl + class ScalarProto extends MessageLiteImpl + class ExistsProto extends MessageLiteImpl + class TypeCodeProto extends MessageLiteImpl + class TemporalityProto extends MessageLiteImpl + class ValidTimeIntervalProto extends MessageLiteImpl + class TimeIntervalProto extends MessageLiteImpl + class InstantProto extends MessageLiteImpl + class PropertyDefProto extends MessageLiteImpl + class SortByDefProto extends MessageLiteImpl +} \ No newline at end of file diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/bitemporal/serde/DSIQueryTemporalitySerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/bitemporal/serde/DSIQueryTemporalitySerialization.scala index 0fc17a4e..7baa8f62 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/bitemporal/serde/DSIQueryTemporalitySerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/bitemporal/serde/DSIQueryTemporalitySerialization.scala @@ -26,14 +26,14 @@ private[optimus] object DSIQueryTemporalitySerializer extends ProtoSerializer[DSIQueryTemporality, TemporalityProto] with ExpressionEncoder with ExpressionDecoder { - override def serialize(value: DSIQueryTemporality): TemporalityProto = { + override def serialize(value: DSIQueryTemporality): TemporalityProto = ??? /* { val proto: TemporalityProto = encode(value) proto - } - override def deserialize(proto: TemporalityProto): DSIQueryTemporality = { + } */ + override def deserialize(proto: TemporalityProto): DSIQueryTemporality = ??? /* { val temporality: DSIQueryTemporality = decode(proto) temporality - } + } */ override protected def encode(id: Id): Int = throw new NotImplementedError(s"Cannot encode($id) with ${this.getClass.getSimpleName}") override protected def decode(id: Int): Id = diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/NonTemporalPrcKey.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/NonTemporalPrcKey.scala index c7afae2b..33695e16 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/NonTemporalPrcKey.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/NonTemporalPrcKey.scala @@ -43,15 +43,15 @@ private[optimus] final case class NonTemporalPrcKey( private[optimus] object NonTemporalPrcKey { def apply(normalizedQuery: NormalizedCacheableQuery, context: Context): NonTemporalPrcKey = - apply(normalizedQuery, context, NonTemporalPrcKeyProto.Version.NORMALIZED_QUERY_PROTO.getNumber) + ??? // apply(normalizedQuery, context, NonTemporalPrcKeyProto.Version.NORMALIZED_QUERY_PROTO.getNumber) def apply(query: Query, context: Context, version: Int): NonTemporalPrcKey = apply(NormalizedCacheableQuery(query), context, version) def apply(normalizedPrcKeyComponent: NormalizedPrcKeyComponent, context: Context): NonTemporalPrcKey = - apply(normalizedPrcKeyComponent, context, NonTemporalPrcKeyProto.Version.NORMALIZED_QUERY_PROTO.getNumber) + ??? // apply(normalizedPrcKeyComponent, context, NonTemporalPrcKeyProto.Version.NORMALIZED_QUERY_PROTO.getNumber) def apply(query: Query, context: Context): NonTemporalPrcKey = - apply(query, context, NonTemporalPrcKeyProto.Version.NORMALIZED_QUERY_PROTO.getNumber) + ??? // apply(query, context, NonTemporalPrcKeyProto.Version.NORMALIZED_QUERY_PROTO.getNumber) } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/NonTemporalPrcKeySerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/NonTemporalPrcKeySerialization.scala index 8ae16da1..92aa633a 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/NonTemporalPrcKeySerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/NonTemporalPrcKeySerialization.scala @@ -27,7 +27,7 @@ import optimus.platform.dsi.bitemporal.proto.ContextSerializer import optimus.platform.dsi.bitemporal.proto.Dsi.ContextProto import optimus.platform.dsi.bitemporal.proto.Prc.NonTemporalPrcKeyProto import optimus.platform.dsi.bitemporal.proto.Prc.NormalizedCacheableQueryProto -import optimus.platform.dsi.bitemporal.proto.Prc.NormalizedCacheableQueryProto.QueryType +// import optimus.platform.dsi.bitemporal.proto.Prc.NormalizedCacheableQueryProto.QueryType import optimus.platform.dsi.bitemporal.proto.Prc.NormalizedNonCacheableCommandProto import optimus.platform.dsi.bitemporal.proto.ProtoSerializer @@ -39,7 +39,7 @@ private[optimus] trait NonTemporalPrcKeySerialization { } private[optimus] object NonTemporalPrcKeySerializer extends ProtoSerializer[NonTemporalPrcKey, NonTemporalPrcKeyProto] { - override def serialize(value: NonTemporalPrcKey): NonTemporalPrcKeyProto = { + override def serialize(value: NonTemporalPrcKey): NonTemporalPrcKeyProto = ??? /* { val contextProto: ContextProto = value.context.contextType match { case DefaultContextType | UniqueContextType => ContextSerializer.serialize(value.context) case _ => @@ -58,9 +58,9 @@ private[optimus] object NonTemporalPrcKeySerializer extends ProtoSerializer[NonT NormalizedNonCacheableCommandProto.newBuilder().setCommand(CommandSerializer.serialize(c.command)).build()) } builder.build() - } + } */ - override def deserialize(proto: NonTemporalPrcKeyProto): NonTemporalPrcKey = { + override def deserialize(proto: NonTemporalPrcKeyProto): NonTemporalPrcKey = ??? /* { require( proto.hasQuery ^ proto.hasNonCacheableCommand, "The nontemporal prc key must contain either a cacheable or a noncacheable component") @@ -78,12 +78,12 @@ private[optimus] object NonTemporalPrcKeySerializer extends ProtoSerializer[NonT } NonTemporalPrcKey(normalizedKeyComponent, context, version) - } + } */ } object NormalizedCacheableQuerySerialzer extends ProtoSerializer[NormalizedCacheableQuery, NormalizedCacheableQueryProto] { - override def deserialize(proto: NormalizedCacheableQueryProto): NormalizedCacheableQuery = { + override def deserialize(proto: NormalizedCacheableQueryProto): NormalizedCacheableQuery = ??? /* { proto.getQueryType match { case NormalizedCacheableQueryProto.QueryType.ENTITY_REFERENCE => NormalizedEntityReferenceQuery(new RefHolder(proto.getEntityReference.toByteArray)) @@ -97,9 +97,9 @@ object NormalizedCacheableQuerySerialzer case NormalizedCacheableQueryProto.QueryType.UNKNOWN => throw new IllegalArgumentException("Cannot deserialize unknown query type") } - } + } */ - override def serialize(query: NormalizedCacheableQuery): NormalizedCacheableQueryProto = { + override def serialize(query: NormalizedCacheableQuery): NormalizedCacheableQueryProto = ??? /* { val builder = NormalizedCacheableQueryProto.newBuilder query match { case NormalizedEntityReferenceQuery(entityRefBytes) => @@ -112,5 +112,5 @@ object NormalizedCacheableQuerySerialzer .setEventReference(BusinessEventReferenceSerializer.serialize(ref)) } builder.build() - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/PrcUserOptsSerializer.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/PrcUserOptsSerializer.scala index bfe8bc06..74cc6495 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/PrcUserOptsSerializer.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/cache/PrcUserOptsSerializer.scala @@ -25,7 +25,7 @@ import scala.jdk.CollectionConverters._ private[optimus] object PrcUserOptsSerializer extends CommandProtoSerialization with ProtoSerializer[PrcUserOptions, PrcUserOptionsProto] { - override def serialize(value: PrcUserOptions): PrcUserOptionsProto = value match { + override def serialize(value: PrcUserOptions): PrcUserOptionsProto = ??? /* value match { case options: CommandsPrcUserOptions => val cmdType = options match { case _: ClientCommandsPrcUserOptions => PrcUserOptionsProto.UserOptionsType.COMMANDS @@ -53,9 +53,9 @@ private[optimus] object PrcUserOptsSerializer .setUserOptionsType(PrcUserOptionsProto.UserOptionsType.LSQT) .addKey(key) .build() - } + } */ - private def mkCommandsPrcUserOptions(typ: PrcUserOptionsProto.UserOptionsType, proto: PrcUserOptionsProto) = { + /* private def mkCommandsPrcUserOptions(typ: PrcUserOptionsProto.UserOptionsType, proto: PrcUserOptionsProto) = { require(proto.getCommandCount == proto.getKeyCount, "Each key option should be mapped to a command.") val keys = proto.getKeyList.asScala.map(NonTemporalPrcKeySerializer.deserialize) val cmds = proto.getCommandList.asScala.map(CommandSerializer.deserialize) @@ -85,9 +85,9 @@ private[optimus] object PrcUserOptsSerializer case _ => throw new IllegalArgumentException(s"Shouldn't be building CommandsPrcUserOptions for type $typ ") } - } + } */ - override def deserialize(proto: PrcUserOptionsProto): PrcUserOptions = proto.getUserOptionsType match { + override def deserialize(proto: PrcUserOptionsProto): PrcUserOptions = ??? /* proto.getUserOptionsType match { // for backwards-compatibility, deserialize the default value (UNKNOWN) as COMMANDS since clients did not // initially serialize the user options type at all case PrcUserOptionsProto.UserOptionsType.DUAL_READ_COMMANDS | PrcUserOptionsProto.UserOptionsType.COMMANDS | @@ -99,5 +99,5 @@ private[optimus] object PrcUserOptsSerializer require(proto.getKeyList.size() == 1, "Should have exactly one command keys for an LSQT user option") val key = proto.getKeyList.asScala.map(NonTemporalPrcKeySerializer.deserialize).head LsqtQueryPrcUserOptions(key.context) - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/session/PrcClientSessionSerialization.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/session/PrcClientSessionSerialization.scala index e2fa1cd6..2bb25078 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/session/PrcClientSessionSerialization.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/prc/session/PrcClientSessionSerialization.scala @@ -25,7 +25,7 @@ import scala.jdk.CollectionConverters._ private[optimus] object PrcClientSessionSerializer extends CommandProtoSerialization with ProtoSerializer[PrcClientSessionInfo, PrcClientSessionInfoProto] { - override def serialize(value: PrcClientSessionInfo): PrcClientSessionInfoProto = { + override def serialize(value: PrcClientSessionInfo): PrcClientSessionInfoProto = ??? /* { val contextProto: ContextProto = value.context.contextType match { case DefaultContextType | UniqueContextType => ContextSerializer.serialize(value.context) @@ -39,9 +39,9 @@ private[optimus] object PrcClientSessionSerializer .setTxTime(toProto(value.establishmentTime)) value.effectiveId.foreach(builder.setReadId) builder.build() - } + } */ - override def deserialize(proto: PrcClientSessionInfoProto): PrcClientSessionInfo = { + override def deserialize(proto: PrcClientSessionInfoProto): PrcClientSessionInfo = ??? /* { val context: Context = ContextSerializer.deserialize(proto.getContext) val effectiveOpt = if (proto.hasReadId) Some(proto.getReadId) else None PrcClientSessionInfo( @@ -51,5 +51,5 @@ private[optimus] object PrcClientSessionSerializer fromProto(proto.getTxTime), context ) - } + } */ } diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/proto/EnvelopeHelper.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/proto/EnvelopeHelper.scala index 77019102..fa27963a 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/proto/EnvelopeHelper.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/dsi/proto/EnvelopeHelper.scala @@ -1,4 +1,4 @@ -/* +/* /* * Morgan Stanley makes this available to you under the Apache License, Version 2.0 (the "License"). * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -39,3 +39,4 @@ object EnvelopeHelper { parseHeader() } } + */ \ No newline at end of file diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/pickling/ImmutableByteArray.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/pickling/ImmutableByteArray.scala index 9d36379f..cbf0a2e6 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/pickling/ImmutableByteArray.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/pickling/ImmutableByteArray.scala @@ -13,7 +13,7 @@ package optimus.platform.pickling import java.util.Arrays -import net.iharder.base64.Base64 +import net.iharder.Base64 object ImmutableByteArray { def apply(data: Array[Byte]) = new ImmutableByteArray(data) diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/runtime/OptimusCompositeLeaderElectorClient.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/runtime/OptimusCompositeLeaderElectorClient.scala index ae73c027..4bf4fbad 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/runtime/OptimusCompositeLeaderElectorClient.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/runtime/OptimusCompositeLeaderElectorClient.scala @@ -17,13 +17,14 @@ import java.util.concurrent.CountDownLatch import msjava.base.slr.internal.NotificationPolicies import msjava.base.sr.ServiceAttributes.CommonKey import msjava.hdom.Document +import msjava.hdom.Element import msjava.msxml.xpath.MSXPathUtils import msjava.slf4jutils.scalalog.getLogger import msjava.zkapi.internal.ZkaContext -import msjava.zkapi.ZkaDirectoryWatcher +/* import msjava.zkapi.ZkaDirectoryWatcher import msjava.zkapi.leader.LeaderSubscriber import msjava.zkapi.leader.LeaderSubscriberListener -import msjava.zkapi.leader.internal.ZkaLeaderSubscriber +import msjava.zkapi.leader.internal.ZkaLeaderSubscriber */ import optimus.breadcrumbs.Breadcrumbs import optimus.breadcrumbs.ChainedID import optimus.breadcrumbs.crumbs.PropertiesCrumb @@ -169,9 +170,9 @@ class OptimusCompositeLeaderElectorClient protected ( val pointerName: String = if (ci_hot) OptimusCiSplitZkClientConstants.HotPointerName else OptimusCiSplitZkClientConstants.ColdPointerName - val compiledxPath = MSXPathUtils.compile(s"${OptimusCiSplitZkClientConstants.DsiNode}/$pointerName") - val elements = zksu.findElements(doc, compiledxPath) - val pointer: String = elements.head.getValueAsString + // val compiledxPath = MSXPathUtils.compile(s"${OptimusCiSplitZkClientConstants.DsiNode}/$pointerName") + val elements: List[Element] = ??? + val pointer: String = ??? log.info(s"found pointer: $pointer") DalEnv(pointer) case Failure(ex) => @@ -191,7 +192,7 @@ class OptimusCompositeLeaderElectorClient protected ( private[this] val ignoreExhaustedBrokers = DiagnosticSettings.getBoolProperty("optimus.dsi.ignoreExhaustedBrokers", true) - private[this] val urlKey = CommonKey.url.name() + private[this] val urlKey: String = ??? private[this] val random = new Random private[this] val listeners = mutable.Set.empty[LeaderElectorClientListener] @@ -226,7 +227,7 @@ class OptimusCompositeLeaderElectorClient protected ( private[this] val initCountDownLatch = new CountDownLatch(1) - private[this] val leaderSubscriberListener = new LeaderSubscriberListener { + /* private[this] val leaderSubscriberListener = new LeaderSubscriberListener { override def onLeaderUpdate(leaderSubscriber: LeaderSubscriber): Unit = update(leaderSubscriber) override def onInitialized(leaderSubscriber: LeaderSubscriber): Unit = update(leaderSubscriber) override def onCandidateUpdate(leaderSubscriber: LeaderSubscriber): Unit = update(leaderSubscriber) @@ -256,7 +257,7 @@ class OptimusCompositeLeaderElectorClient protected ( log.debug(s"modern ZK mode read brokers: ${readBrokerData.mkString(", ")}") } } - } + } */ private[this] var legacyWriteBrokerDataRaw: Option[BrokerData] = None private[this] def legacyWriteBrokerData: Option[BrokerData] = @@ -265,11 +266,7 @@ class OptimusCompositeLeaderElectorClient protected ( private[this] val legacyListener: PathChildrenCacheListener = new PathChildrenCacheListener { override def childEvent(client: CuratorFramework, event: PathChildrenCacheEvent): Unit = { - val nodes: List[ChildData] = zkaDirectoryWatcher map { - _.getCurrentData.asScala.toList - .filter(legacyElectionNodeFilter) - .sortWith(legacyElectionNodeSorter) - } getOrElse Nil + val nodes: List[ChildData] = ??? val writer = if (nodes.isEmpty) "" else new String(nodes.head.getData) val readers = if (nodes.isEmpty) nodes else nodes.drop(1) @@ -335,15 +332,15 @@ class OptimusCompositeLeaderElectorClient protected ( private[this] lazy val legacyBrokerBaseNode: String = legacyGetBrokersBaseNode(env.underlying) - private[this] val (leaderSubscriber, zkaDirectoryWatcher) = { + /* private[this] val (leaderSubscriber, zkaDirectoryWatcher) = { if (rootContext.exists(modernLePath, "/semaphore/locks") ne null) ( Some(new ZkaLeaderSubscriber(modernLeContext, leaderSubscriberListener, NotificationPolicies.PASS_ALL_POLICY)), None) else (None, Some(new ZkaDirectoryWatcher(rootContext, legacyBrokerBaseNode, legacyListener))) - } + } */ - val (zkaDirectoryWatcherTime, _): (Long, Unit) = timed { + /* val (zkaDirectoryWatcherTime, _): (Long, Unit) = timed { if ( zkaDirectoryWatcher.isDefined && !ZkUtils.waitZdwForInitialization( zkaDirectoryWatcher.get, @@ -361,31 +358,19 @@ class OptimusCompositeLeaderElectorClient protected ( s"Timed out on initializing directory watcher for $legacyBrokerBaseNode. " + s"Error is fatal, cannot resolve read or write brokers.") } - } - Breadcrumbs.info( + } */ + /* Breadcrumbs.info( ChainedID.root, - new PropertiesCrumb(_, DalZkCrumbSource, ("DalClientZkaDirectoryWatcher", zkaDirectoryWatcherTime.toString))) + new PropertiesCrumb(_, DalZkCrumbSource, ("DalClientZkaDirectoryWatcher", zkaDirectoryWatcherTime.toString))) */ - val (leaderSubscriberTime, _): (Long, Unit) = timed { - if (leaderSubscriber.isDefined && !leaderSubscriber.get.waitForInitialization(ZkUtils.watcherTimeout)) { - try { - leaderSubscriber.foreach(_.close()) - } catch { - case ex: Exception => - log.error("Error closing LeaderSubscriber", ex) - } - throw new IOException( - s"Timed out on initializing subscribers for $modernLePath. " + - s"Error is fatal, cannot resolve read or write brokers.") - } - } + val (leaderSubscriberTime, _): (Long, Unit) = ??? Breadcrumbs.info( ChainedID.root, new PropertiesCrumb(_, DalZkCrumbSource, ("DalClientLeaderSubscriber", leaderSubscriberTime.toString))) override def close(): Unit = { - zkaDirectoryWatcher foreach { _.close() } - leaderSubscriber foreach { _.close() } + // zkaDirectoryWatcher foreach { _.close() } + // leaderSubscriber foreach { _.close() } } private def obtainBiasedRandomBrokerFromList(brokersList: List[BrokerData]): BrokerData = { @@ -493,7 +478,7 @@ class OptimusCompositeLeaderElectorClient protected ( def getBrokerNodesAndData: List[(String, String)] = { try { - zkaDirectoryWatcher map { zkaDirWatcher => + /* zkaDirectoryWatcher map { zkaDirWatcher => zkaDirWatcher.getCurrentData.asScala.toList .filter(legacyElectionNodeFilter) .sortWith(legacyElectionNodeSorter) map { node => @@ -506,7 +491,8 @@ class OptimusCompositeLeaderElectorClient protected ( (s"${rootContext.getRootNode}${modernLeContext.getBasePath}", node.asScala.getOrElse(urlKey, "").toString)) allNodesAndData } getOrElse Nil - } + } */ + Nil } catch { case e: Exception => OptimusCompositeLeaderElectorClient.log diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/runtime/OptimusVersioningZkClient.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/runtime/OptimusVersioningZkClient.scala index cb5ac559..3eebf7ae 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/runtime/OptimusVersioningZkClient.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/platform/runtime/OptimusVersioningZkClient.scala @@ -1,4 +1,4 @@ -/* +/* /* * Morgan Stanley makes this available to you under the Apache License, Version 2.0 (the "License"). * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -106,3 +106,4 @@ class OptimusVersioningZkClient private (val instance: String, private[this] val private[this] val random = new Random private[this] def randomElementFrom[T](list: List[T]): T = list(random.nextInt(list.size)) } + */ \ No newline at end of file diff --git a/optimus/platform/projects/dal_core/src/main/scala/optimus/testsupport/package.scala b/optimus/platform/projects/dal_core/src/main/scala/optimus/testsupport/package.scala index 9b7f3d9d..d24c7b66 100644 --- a/optimus/platform/projects/dal_core/src/main/scala/optimus/testsupport/package.scala +++ b/optimus/platform/projects/dal_core/src/main/scala/optimus/testsupport/package.scala @@ -13,7 +13,7 @@ package optimus import java.util.concurrent.atomic.AtomicBoolean -import msjava.base.slr.internal.ServiceEnvironment +// import msjava.base.slr.internal.ServiceEnvironment import optimus.graph.DiagnosticSettings import scala.util.Try @@ -27,7 +27,7 @@ package object testsupport { val shouldLogDalResultWeight: Boolean = inTest && logDalResultWeight - class IllegalBackendAccessException(msg: String) extends Exception(msg) + /* class IllegalBackendAccessException(msg: String) extends Exception(msg) def authorizeBackendAccess(backendName: String): Unit = { if (!backendAccessAllowed) @@ -77,5 +77,5 @@ package object testsupport { if (!allowNonDevZkAccess && env != null && env != ServiceEnvironment.dev) { throw new IllegalZkAccessException(env) } - } + } */ } diff --git a/optimus/platform/projects/instrumentation/src/main/scala/optimus/graph/diagnostics/ap/AsyncProfilerIntegration.scala b/optimus/platform/projects/instrumentation/src/main/scala/optimus/graph/diagnostics/ap/AsyncProfilerIntegration.scala index e9b730ba..e0513be0 100644 --- a/optimus/platform/projects/instrumentation/src/main/scala/optimus/graph/diagnostics/ap/AsyncProfilerIntegration.scala +++ b/optimus/platform/projects/instrumentation/src/main/scala/optimus/graph/diagnostics/ap/AsyncProfilerIntegration.scala @@ -45,7 +45,7 @@ object AsyncProfilerIntegration extends Log { private[AsyncProfilerIntegration] val offset = customOffsets.getAndIncrement() // must be lazy, since we can't save strings until after AP is initialized lazy val eventNamePtr: Long = saveString(s"${name}.${valueType}") - private[AsyncProfilerIntegration] def add(): Unit = profiler.addCustomEventType(offset, name, valueType) + private[AsyncProfilerIntegration] def add(): Unit = () // profiler.addCustomEventType(offset, name, valueType) } val TestingEvent: CustomEventType = CustomEventType("Testing", "TestValue") @@ -101,7 +101,7 @@ object AsyncProfilerIntegration extends Log { private[graph] lazy val settings: Map[String, String] = PropertyUtils.propertyMap(defaultSettings, userSettings) - def ensureLoadedIfEnabled(): Boolean = doEnable && { + def ensureLoadedIfEnabled(): Boolean = doEnable /* && { if (profiler ne null) { true } else { @@ -115,7 +115,7 @@ object AsyncProfilerIntegration extends Log { // One of the next two lines will likely throw if the native library is broken (so we'll catch // below and disable AP). p.getSamples() - p.saveString("test") + // p.saveString("test") if (p ne null) { log.info(s"asyncProfiler initialized") profiler = p @@ -138,7 +138,7 @@ object AsyncProfilerIntegration extends Log { } } } - } + } */ lazy val cpuProfilingEnabled: Boolean = ensureLoadedIfEnabled() && { try { @@ -439,39 +439,39 @@ object AsyncProfilerIntegration extends Log { } def recordCustomEvent(etype: CustomEventType, valueD: Double, valueL: Long, ptr: Long): Unit = { - if (ensureLoadedIfEnabled()) - profiler.recordCustomEvent(etype.offset, valueD, valueL, ptr) + // if (ensureLoadedIfEnabled()) + // profiler.recordCustomEvent(etype.offset, valueD, valueL, ptr) } private val savedStrings = new ConcurrentHashMap[String, Long]() // Get pointer to string in C-land - def saveString(name: String): Long = - if (!ensureLoadedIfEnabled()) 0L else savedStrings.computeIfAbsent(name, profiler.saveString) + def saveString(name: String): Long = 0L + // if (!ensureLoadedIfEnabled()) 0L else savedStrings.computeIfAbsent(name, profiler.saveString) - def getMethodID(cls: Class[_], method: String, sig: String): Long = - if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L - else profiler.getMethodID(cls, method, sig, false) + def getMethodID(cls: Class[_], method: String, sig: String): Long = 0L + // if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L + // else profiler.getMethodID(cls, method, sig, false) - def getStaticMethodID(cls: Class[_], method: String, sig: String): Long = - if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L - else profiler.getMethodID(cls, method, sig, true) + def getStaticMethodID(cls: Class[_], method: String, sig: String): Long = 0L + // if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L + // else profiler.getMethodID(cls, method, sig, true) - def setAwaitStackId(ids: Array[Long], signal: Long, insertionId: Long): Long = - if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L - else profiler.setAwaitStackId(ids, signal, insertionId) + def setAwaitStackId(ids: Array[Long], signal: Long, insertionId: Long): Long = 0L + // if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L + // else profiler.setAwaitStackId(ids, signal, insertionId) - def getAwaitDataAddress(): Long = - if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L else profiler.getAwaitDataAddress() + def getAwaitDataAddress(): Long = 0L + // if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L else profiler.getAwaitDataAddress() - def getAwaitSampledSignal(): Long = - if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L else profiler.getAwaitSampledSignal() + def getAwaitSampledSignal(): Long = 0L + // if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L else profiler.getAwaitSampledSignal() - def saveAwaitFrames(ids: Array[Long], nids: Int): Long = - if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L else profiler.saveAwaitFrames(2, ids, nids) + def saveAwaitFrames(ids: Array[Long], nids: Int): Long = 0L + // if (!DiagnosticSettings.awaitStacks || !ensureLoadedIfEnabled()) 0L else profiler.saveAwaitFrames(2, ids, nids) - def externalContext(ctx: Long, shmPath: String): Unit = - if (ensureLoadedIfEnabled()) profiler.externalContext(ctx, shmPath) + def externalContext(ctx: Long, shmPath: String): Unit = () + // if (ensureLoadedIfEnabled()) profiler.externalContext(ctx, shmPath) lazy val overflowMarker: Long = saveString("OverflowMarker") lazy val errorMarker: Long = saveString("ErrorMarker") diff --git a/optimus/platform/projects/missing/src/main/scala/com/ms/zookeeper/clientutils/ZkClientUtils.scala b/optimus/platform/projects/missing/src/main/scala/com/ms/zookeeper/clientutils/ZkClientUtils.scala new file mode 100644 index 00000000..3847afba --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/com/ms/zookeeper/clientutils/ZkClientUtils.scala @@ -0,0 +1,6 @@ +package com.ms.zookeeper.clientutils + +object ZkClientUtils { + def getConnectionString(zkEnv: ZkEnv, node: String): String = ??? + def getZooKeeper(c: String, id: String, t: Int, w: Any): Nothing = ??? +} diff --git a/optimus/platform/projects/missing/src/main/scala/com/ms/zookeeper/clientutils/ZkEnv.java b/optimus/platform/projects/missing/src/main/scala/com/ms/zookeeper/clientutils/ZkEnv.java new file mode 100644 index 00000000..9f9f6c16 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/com/ms/zookeeper/clientutils/ZkEnv.java @@ -0,0 +1,9 @@ +package com.ms.zookeeper.clientutils; + +public class ZkEnv { + public String name; + public static ZkEnv valueOf(String arg) { return new ZkEnv(); } + public static ZkEnv qa = new ZkEnv(); + public static ZkEnv dev = new ZkEnv(); + public static ZkEnv prod = new ZkEnv(); +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/MSUuidGenerator.scala b/optimus/platform/projects/missing/src/main/scala/msjava/MSUuidGenerator.scala new file mode 100644 index 00000000..83bd188a --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/MSUuidGenerator.scala @@ -0,0 +1,50 @@ +/* + * Morgan Stanley makes this available to you under the Apache License, Version 2.0 (the "License"). + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * See the NOTICE file distributed with this work for additional information regarding copyright ownership. + * + * 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. + */ +package msjava + +import java.security.MessageDigest + +import msjava.base.util.uuid.MSUuid + +object MSUuidGenerator { + + private val UUID_SIZE = 16 + + def fromStringV5(key: String): MSUuid = fromStringV5(key.getBytes()) + + def fromStringV5(key: String, namespace: MSUuid): MSUuid = { + val keyBytes = key.getBytes + val namespaceBytes = namespace.asBytes() + val namespacedBytes = new Array[Byte](keyBytes.length + namespaceBytes.length) + + System.arraycopy(namespaceBytes, 0, namespacedBytes, 0, namespaceBytes.length) + System.arraycopy(keyBytes, 0, namespacedBytes, namespaceBytes.length, keyBytes.length) + + fromStringV5(namespacedBytes) + } + + def fromStringV5(bytes: Array[Byte]): MSUuid = { + val md = MessageDigest.getInstance("SHA-1") + md.update(bytes) + + val raw: Array[Byte] = new Array[Byte](UUID_SIZE) + System.arraycopy(md.digest(), 0, raw, 0, UUID_SIZE) + + /* set the variand and version bits */ + raw(6) = (raw(6) & 0x0f).toByte /* clear version */ + raw(6) = (raw(6) | 0x50).toByte /* set to version 5 */ + raw(8) = (raw(8) & 0x3f).toByte /* clear variant */ + raw(8) = (raw(8) | 0x80).toByte /* set to IETF variant */ + + new MSUuid(raw, true) + } +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/base/event/publication/watchtower/SimpleWatchTowerEvent.scala b/optimus/platform/projects/missing/src/main/scala/msjava/base/event/publication/watchtower/SimpleWatchTowerEvent.scala new file mode 100644 index 00000000..27c82cd3 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/base/event/publication/watchtower/SimpleWatchTowerEvent.scala @@ -0,0 +1,3 @@ +package msjava.base.event.publication.watchtower + +class SimpleWatchTowerEvent(a: String, b: String, c: Any, d: String) extends WatchTowerEvent diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/base/event/publication/watchtower/WatchTowerEvent.scala b/optimus/platform/projects/missing/src/main/scala/msjava/base/event/publication/watchtower/WatchTowerEvent.scala new file mode 100644 index 00000000..c601bc37 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/base/event/publication/watchtower/WatchTowerEvent.scala @@ -0,0 +1,3 @@ +package msjava.base.event.publication.watchtower + +trait WatchTowerEvent diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/base/io/IOUtils.scala b/optimus/platform/projects/missing/src/main/scala/msjava/base/io/IOUtils.scala new file mode 100644 index 00000000..20566805 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/base/io/IOUtils.scala @@ -0,0 +1,10 @@ +package msjava.base.io + +import java.io.InputStream +import java.io.OutputStream + +object IOUtils { + def readBytes(stream: InputStream): Array[Byte] = ??? + + def copy(input: InputStream, output: OutputStream, size: Int): Unit = () +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/base/slr/internal/NotificationPolicies.scala b/optimus/platform/projects/missing/src/main/scala/msjava/base/slr/internal/NotificationPolicies.scala new file mode 100644 index 00000000..95b0e95f --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/base/slr/internal/NotificationPolicies.scala @@ -0,0 +1,5 @@ +package msjava.base.slr.internal + +object NotificationPolicies { + +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/base/sr/ServiceAttributes.scala b/optimus/platform/projects/missing/src/main/scala/msjava/base/sr/ServiceAttributes.scala new file mode 100644 index 00000000..f11cf92e --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/base/sr/ServiceAttributes.scala @@ -0,0 +1,9 @@ +package msjava.base.sr + +import java.net.URL + +object ServiceAttributes { + object CommonKey { + def url: URL = ??? + } +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/base/util/internal/SystemPropertyUtils.scala b/optimus/platform/projects/missing/src/main/scala/msjava/base/util/internal/SystemPropertyUtils.scala new file mode 100644 index 00000000..ca52da3d --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/base/util/internal/SystemPropertyUtils.scala @@ -0,0 +1,7 @@ +package msjava.base.util.internal + +import org.slf4j.Logger + +object SystemPropertyUtils { + def getBoolean(x: String, y: Boolean, z: Logger): Boolean = ??? +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/base/util/uuid/MSUuid.scala b/optimus/platform/projects/missing/src/main/scala/msjava/base/util/uuid/MSUuid.scala new file mode 100644 index 00000000..7692c37a --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/base/util/uuid/MSUuid.scala @@ -0,0 +1,16 @@ +package msjava.base.util.uuid + +import java.util.UUID + +class MSUuid(x: Array[Byte], y: Boolean) { + def this(x: String) = this(???, ???) + def this() = this(???, ???) + + def asBytes(): Array[Byte] = ??? + def asString(): String = ??? + def isTrueBase64(): Boolean = ??? +} + +object MSUuid { + def generateJavaUUID(): UUID = ??? +} \ No newline at end of file diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/hdom/Attribute.scala b/optimus/platform/projects/missing/src/main/scala/msjava/hdom/Attribute.scala new file mode 100644 index 00000000..ad9f993f --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/hdom/Attribute.scala @@ -0,0 +1,7 @@ +package msjava.hdom + +class Attribute { + def getName: String = ??? + def getValue: String = ??? + def getValueAsInt: Int = ??? +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/hdom/Document.scala b/optimus/platform/projects/missing/src/main/scala/msjava/hdom/Document.scala new file mode 100644 index 00000000..51a2cd78 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/hdom/Document.scala @@ -0,0 +1,5 @@ +package msjava.hdom + +class Document { + def getRootElement: Element = ??? +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/hdom/Element.scala b/optimus/platform/projects/missing/src/main/scala/msjava/hdom/Element.scala new file mode 100644 index 00000000..1e6621be --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/hdom/Element.scala @@ -0,0 +1,15 @@ +package msjava.hdom + +import java.{util => ju} + +class Element(name: String) { + def getName: String = ??? + def getText: String = ??? + def getChildren(name: String): ju.List[Element] = ??? + def getChildren(): ju.List[Element] = ??? + def getAttributes: ju.List[Attribute] = ??? + def getChildText(name: String): String = ??? + def getValueAsString: String = ??? + def getAttributeValue(name: String): String = ??? + def getAttribute(name: String): Attribute = ??? +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/hdom/input/SAXBuilder.scala b/optimus/platform/projects/missing/src/main/scala/msjava/hdom/input/SAXBuilder.scala new file mode 100644 index 00000000..271e11c7 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/hdom/input/SAXBuilder.scala @@ -0,0 +1,7 @@ +package msjava.hdom.input + +import java.io.InputStream + +class SAXBuilder { + def build(input: InputStream): Nothing = ??? +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/hdom/output/XMLOutputter.scala b/optimus/platform/projects/missing/src/main/scala/msjava/hdom/output/XMLOutputter.scala new file mode 100644 index 00000000..bae0ba71 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/hdom/output/XMLOutputter.scala @@ -0,0 +1,8 @@ +package msjava.hdom.output + +import java.io.StringWriter +import msjava.hdom.Document + +class XMLOutputter { + def output(d: Document, w: StringWriter): Unit = ??? +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/kerberos/auth/MSKerberosConfiguration.scala b/optimus/platform/projects/missing/src/main/scala/msjava/kerberos/auth/MSKerberosConfiguration.scala new file mode 100644 index 00000000..fa183faa --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/kerberos/auth/MSKerberosConfiguration.scala @@ -0,0 +1,7 @@ +package msjava.kerberos.auth + +object MSKerberosConfiguration { + def setClientConfiguration(): Unit = () + + def getUserPrincipal: Nothing = ??? +} \ No newline at end of file diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/msnet/MSNet.scala b/optimus/platform/projects/missing/src/main/scala/msjava/msnet/MSNet.scala new file mode 100644 index 00000000..b28b73ca --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/msnet/MSNet.scala @@ -0,0 +1,54 @@ +package msjava.msnet + +import java.{util => ju} +import java.net.Socket + +class MSNetEstablisher(p: Int, t: Int) { + def setOptional(b: Boolean): Unit = ??? +} +class MSNetEstablisherFactory + +class MSNetTCPSocketBuffer { + def processed(MessageSize: Int): Unit = ??? + def peek(): Array[Byte] = ??? + def store(bytes: Array[Byte]): Unit = ??? + def clear(): Unit = ??? +} +class MSNetTCPConnection { + def getAddress: String = ??? + def establisherIterator(): ju.Iterator[MSNetEstablisher] = ??? + def setImmutable(b: Boolean): Unit = ??? + def addListener(b: Any): Unit = ??? + def setMasterEstablisherMode(b: Any): Unit = ??? + def asyncSend(msg: Any): Unit = ??? +} +trait MSNetEstablishStatus { + def isUnknown: Boolean = ??? + def isContinue: Boolean = ??? + def isComplete: Boolean = ??? +} +object MSNetEstablishStatus { + object CONTINUE extends MSNetEstablishStatus + object UNKNOWN extends MSNetEstablishStatus + object COMPLETE extends MSNetEstablishStatus +} +class MSNetInetAddress { + def getImpl(): MSNetInetAddressImpl = ??? +} +trait MSNetInetAddressImpl { + def getHost(): String = ??? + def getPort(): Int = ??? +} +object AbstractEstablisherHandler { + def kerberosAuth(a: Socket, b: Boolean, c: Int): String = ??? +} +class MSNetEstablishException extends Exception +class MSNetMessage +trait MSNetConnectionListenerAdapter { + def readCallback(name: MSNetID, message: MSNetMessage): Unit + def disconnectCallback(name: MSNetID): Unit + def connectCallback(name: MSNetID): Unit +} +class MSNetID +class MSNetProtocolTCPConnection(config: internal.MSNetProtocolConnectionConfigurationSupport) extends MSNetTCPConnection +class MSNetExecption(cause: String) extends Exception(cause) diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/msnet/internal/MSNetProtocolConnectionConfigurationSupport.scala b/optimus/platform/projects/missing/src/main/scala/msjava/msnet/internal/MSNetProtocolConnectionConfigurationSupport.scala new file mode 100644 index 00000000..d725b2e4 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/msnet/internal/MSNetProtocolConnectionConfigurationSupport.scala @@ -0,0 +1,3 @@ +package msjava.msnet.internal + +class MSNetProtocolConnectionConfigurationSupport diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/msnet/ssl/SSLEngineFactory.scala b/optimus/platform/projects/missing/src/main/scala/msjava/msnet/ssl/SSLEngineFactory.scala new file mode 100644 index 00000000..1cb419d4 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/msnet/ssl/SSLEngineFactory.scala @@ -0,0 +1,9 @@ +package msjava.msnet.ssl + +import javax.net.ssl.SSLEngine + +trait SSLEngineFactory { + def createServerEngine(): SSLEngine + def createClientEngine(): SSLEngine + def dispose(sslEngine: SSLEngine): Unit +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/msxml/xpath/MSXPathExpression.scala b/optimus/platform/projects/missing/src/main/scala/msjava/msxml/xpath/MSXPathExpression.scala new file mode 100644 index 00000000..25728e58 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/msxml/xpath/MSXPathExpression.scala @@ -0,0 +1,3 @@ + +package msjava.msxml.xpath +class MSXPathExpression diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/msxml/xpath/MSXPathUtils.scala b/optimus/platform/projects/missing/src/main/scala/msjava/msxml/xpath/MSXPathUtils.scala new file mode 100644 index 00000000..c0009a31 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/msxml/xpath/MSXPathUtils.scala @@ -0,0 +1,5 @@ +package msjava.msxml.xpath + +object MSXPathUtils { + +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/protobufutils/server/BackendException.scala b/optimus/platform/projects/missing/src/main/scala/msjava/protobufutils/server/BackendException.scala new file mode 100644 index 00000000..7db19a28 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/protobufutils/server/BackendException.scala @@ -0,0 +1,3 @@ +package msjava.protobufutils.server + +class BackendException(cause: String) extends Exception(cause) \ No newline at end of file diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/tools/util/MSProcess.scala b/optimus/platform/projects/missing/src/main/scala/msjava/tools/util/MSProcess.scala new file mode 100644 index 00000000..480332a4 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/tools/util/MSProcess.scala @@ -0,0 +1,5 @@ +package msjava.tools.util + +object MSProcess { + def getPID: Long = ??? +} diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/PropertySource.scala b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/PropertySource.scala new file mode 100644 index 00000000..88855d5c --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/PropertySource.scala @@ -0,0 +1,7 @@ +package msjava.zkapi + +import java.io.Closeable + +trait PropertySource extends Closeable { + def getProperty(p: String): AnyRef +} \ No newline at end of file diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaAttr.scala b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaAttr.scala new file mode 100644 index 00000000..8b60e2e5 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaAttr.scala @@ -0,0 +1,5 @@ +package msjava.zkapi + +object ZkaAttr { + val KERBEROS: Nothing = ??? +} \ No newline at end of file diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaConfig.scala b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaConfig.scala new file mode 100644 index 00000000..7a4a539a --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaConfig.scala @@ -0,0 +1,9 @@ +package msjava.zkapi + +class ZkaConfig { + def attr(x: Any, y: Boolean): Nothing = ??? +} + +object ZkaConfig { + def fromURI(uri: String): ZkaConfig = ??? +} \ No newline at end of file diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaDirectoryWatcher.scala b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaDirectoryWatcher.scala new file mode 100644 index 00000000..002d27a7 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaDirectoryWatcher.scala @@ -0,0 +1,3 @@ +package msjava.zkapi + +class ZkaDirectoryWatcher diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaFactory.scala b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaFactory.scala new file mode 100644 index 00000000..e200e390 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/ZkaFactory.scala @@ -0,0 +1,5 @@ +package msjava.zkapi + +object ZkaFactory { + def newCurator(config: ZkaConfig): Nothing = ??? +} \ No newline at end of file diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/internal/ZkaContext.scala b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/internal/ZkaContext.scala new file mode 100644 index 00000000..6a425d7a --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/internal/ZkaContext.scala @@ -0,0 +1,16 @@ +package msjava.zkapi.internal + +import java.io.Closeable +import org.apache.curator.framework.CuratorFramework + +class ZkaContext(x: Any) extends Closeable { + def getRootNode: String = ??? + def getData(p: String): ZkaData = ??? + def getNodeData(mode: String): Array[Byte] = ??? + def getCurator: CuratorFramework = ??? + def close(): Unit = ??? +} + +object ZkaContext { + def contextForSubPath(context: ZkaContext, p: String): ZkaContext = ??? +} \ No newline at end of file diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/internal/ZkaData.scala b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/internal/ZkaData.scala new file mode 100644 index 00000000..56a1f513 --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/internal/ZkaData.scala @@ -0,0 +1,10 @@ +package msjava.zkapi.internal + +class ZkaData { + def get(x: String): AnyRef = ??? + def getRawMap(): Nothing = ??? +} + +object ZkaData { + def fromBytes(bytes: Array[Byte]): ZkaData = ??? +} \ No newline at end of file diff --git a/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/internal/ZkaPropertySource.scala b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/internal/ZkaPropertySource.scala new file mode 100644 index 00000000..364c84df --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/msjava/zkapi/internal/ZkaPropertySource.scala @@ -0,0 +1,8 @@ +package msjava.zkapi.internal + +import msjava.zkapi.PropertySource + +class ZkaPropertySource(x: String, y: ZkaContext) extends PropertySource { + def getProperty(p: String): AnyRef = ??? + def close(): Unit = ??? +} diff --git a/optimus/platform/projects/missing/src/main/scala/optimus/dsi/util/HashMap7.scala b/optimus/platform/projects/missing/src/main/scala/optimus/dsi/util/HashMap7.scala new file mode 100644 index 00000000..25aca4fb --- /dev/null +++ b/optimus/platform/projects/missing/src/main/scala/optimus/dsi/util/HashMap7.scala @@ -0,0 +1,5 @@ +package optimus.dsi.util + +import java.util.HashMap + +class HashMap7[K, V](size: Int) extends HashMap[K, V](size) \ No newline at end of file diff --git a/optimus/platform/projects/msnet-ssl/src/main/java/msjava/msnet/ssl/SSLEstablisher.java b/optimus/platform/projects/msnet-ssl/src/main/java/msjava/msnet/ssl/SSLEstablisher.java index 2efaa0f9..f7f01720 100644 --- a/optimus/platform/projects/msnet-ssl/src/main/java/msjava/msnet/ssl/SSLEstablisher.java +++ b/optimus/platform/projects/msnet-ssl/src/main/java/msjava/msnet/ssl/SSLEstablisher.java @@ -24,7 +24,7 @@ import msjava.msnet.MSNetTCPSocket; import msjava.msnet.MSNetTCPSocketBuffer; import msjava.msnet.MSNetTCPSocketFactory; -import msjava.msnet.utils.MSNetConfiguration; +// import msjava.msnet.utils.MSNetConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/optimus/platform/projects/platform/src/main/scala/msjava/logbackutils/async/AsyncDispatcherQueueImplPatch.java b/optimus/platform/projects/platform/src/main/scala/msjava/logbackutils/async/AsyncDispatcherQueueImplPatch.java index b87f2121..af5ba41c 100644 --- a/optimus/platform/projects/platform/src/main/scala/msjava/logbackutils/async/AsyncDispatcherQueueImplPatch.java +++ b/optimus/platform/projects/platform/src/main/scala/msjava/logbackutils/async/AsyncDispatcherQueueImplPatch.java @@ -9,6 +9,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* package msjava.logbackutils.async; import java.util.ArrayList; @@ -26,24 +27,23 @@ import ch.qos.logback.core.Appender; -/** A bounded BlockingQueue backed implementation of the AsynDispatcher interface */ +/** A bounded BlockingQueue backed implementation of the AsynDispatcher interface public class AsyncDispatcherQueueImplPatch extends AsyncDispatcherBasePatch implements AsyncDispatcher { - /** List of appenders which will be used by this dispatcher */ + /** List of appenders which will be used by this dispatcher protected final List> appenderList = new ArrayList<>(); - /** The produce consumer queue. */ + /** The produce consumer queue. protected BlockingQueue queue; - /** The dispatch thread */ + /** The dispatch thread BaseDispatchThread dispatchThread; /** * Flag indicating whether the Logging thread have to wait until space become available on the * queue
* or it should return immediately. - */ private boolean blocking = true; private static final AtomicInteger instanceId = new AtomicInteger(); @@ -55,7 +55,6 @@ public AsyncDispatcherQueueImplPatch() { /** * @param metricsId a unique ID for naming published metrics, not null and not empty; use * parameterless constructor for default - */ public AsyncDispatcherQueueImplPatch(String metricsId) { super(metricsId); } @@ -66,7 +65,6 @@ public AsyncDispatcherQueueImplPatch(String metricsId) { * * @param bufferSize the size of the message queue * @throws IllegalArgumentException if the bufferSize is less then 1 - */ public AsyncDispatcherQueueImplPatch(int bufferSize) throws IllegalArgumentException { this(bufferSize, "AsyncDispatcherQueueImpl-" + instanceId.incrementAndGet()); } @@ -79,7 +77,6 @@ public AsyncDispatcherQueueImplPatch(int bufferSize) throws IllegalArgumentExcep * @param metricsId a unique ID for naming published metrics, not null and not empty; use * parameterless constructor for default * @throws IllegalArgumentException if the bufferSize is less then 1 - */ public AsyncDispatcherQueueImplPatch(int bufferSize, String metricsId) throws IllegalArgumentException { super(metricsId); @@ -95,7 +92,6 @@ public AsyncDispatcherQueueImplPatch(int bufferSize, String metricsId) * is required. * * @return True when the logging thread have to wait when the queue is full. - */ @Override public boolean isBlocking() { return blocking; @@ -106,7 +102,6 @@ public boolean isBlocking() { * is required. * * @param blocking the blocking to set - */ @Override public void setBlocking(boolean blocking) { addInfo("Blocking flag set to: " + blocking); @@ -130,7 +125,6 @@ public void setUseListQueue(boolean useListedQueue) { * and on the dispatch thread as well. This function guarantees only that, at most queue.size() * messages will be flushed.
* New messages may arrive and will be present on the queue after flushing. - */ @Override public synchronized void flush() { flushing(); @@ -139,7 +133,6 @@ public synchronized void flush() { /** * This function will put the message onto the queue. If the queue is full, than the current * thread will block on the queue.put() call if blocking is set to true. - */ @Override public void add(E e) { if (Thread.currentThread() instanceof AsyncDispatcherQueueImplPatch.BaseDispatchThread) { @@ -171,7 +164,7 @@ public void add(E e) { /** * @return the current number of queued messages - */ + * @VisibleForTesting int getQueueSize() { return queue.size(); @@ -193,7 +186,7 @@ public synchronized void start() { addInfo("Async dispatcher started"); } - /** Starts up the dispatcher thread */ + /** Starts up the dispatcher thread protected void startDispatchThread() { if (queue == null) { queue = @@ -207,10 +200,10 @@ protected void startDispatchThread() { } } - /** Flag indicating the status of this dispatcher */ + /** Flag indicating the status of this dispatcher private volatile boolean isStarted = false; - /** Stops the dispatcher thread, and logs all the messages on the current thread. */ + /** Stops the dispatcher thread, and logs all the messages on the current thread. @Override public synchronized void stop() { stopDispatchThread(); @@ -220,13 +213,13 @@ public synchronized void stop() { addInfo("Async dispatcher stopped"); } - /** If this appender is started */ + /** If this appender is started @Override public boolean isStarted() { return isStarted; } - /** Stops the dispatcher thread */ + /** Stops the dispatcher thread private void stopDispatchThread() { if (dispatchThread != null) { try { @@ -255,7 +248,7 @@ public synchronized void setAppenders(Iterator> appenderIterator) { } } - /** Flushes all messages in the current thread. */ + /** Flushes all messages in the current thread. private void flushing() { addInfo("Flushing is just about to start in the AsyncDispatcher"); AtomicReference ex = new AtomicReference<>(); @@ -310,13 +303,13 @@ public BaseDispatchThread() { protected BaseDispatchThread newDispatchThread() { return new DispatchThreadImpl(); } - /** The dispatcher thread implementation. It runs in a loop until it is interrupted. */ + /** The dispatcher thread implementation. It runs in a loop until it is interrupted. public class DispatchThreadImpl extends BaseDispatchThread { - /** Creates the dispatcher thread */ + /** Creates the dispatcher thread public DispatchThreadImpl() {} - /** Logs everything to Logback. If queue is empty, it will block on the queue.take() call. */ + /** Logs everything to Logback. If queue is empty, it will block on the queue.take() call. @Override public void run() { while (!isInterrupted()) { @@ -339,3 +332,4 @@ protected void callAppenders(E e) { } } } +*/ \ No newline at end of file diff --git a/optimus/platform/projects/platform/src/main/scala/msjava/logbackutils/async/internal/AsyncDispatcherBasePatch.java b/optimus/platform/projects/platform/src/main/scala/msjava/logbackutils/async/internal/AsyncDispatcherBasePatch.java index 03adb28c..eb1b68a8 100644 --- a/optimus/platform/projects/platform/src/main/scala/msjava/logbackutils/async/internal/AsyncDispatcherBasePatch.java +++ b/optimus/platform/projects/platform/src/main/scala/msjava/logbackutils/async/internal/AsyncDispatcherBasePatch.java @@ -1,4 +1,4 @@ -/* +/* /* * Morgan Stanley makes this available to you under the Apache License, Version 2.0 (the "License"). * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -8,7 +8,7 @@ * 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. - */ + package msjava.logbackutils.async.internal; import java.time.Instant; @@ -43,7 +43,7 @@ import msjava.threadmonitor.thread.MSThreadMonitor; import msjava.logbackutils.async.AsyncDispatcher; -/** Provides common circular-logging guard functionality for async dispatchers. */ +/** Provides common circular-logging guard functionality for async dispatchers. @ManagedResource public abstract class AsyncDispatcherBasePatch extends ContextAwareBase implements AsyncDispatcher, MSThreadMonitor.ExtraInfoProvider, SelfNaming { @@ -118,7 +118,7 @@ protected static void setGuard(boolean state) { private int bufferSize = 1000; - /** used for metrics and for logging */ + /** used for metrics and for logging private final ConcurrentHashMap threadsAndBlockTimes = new ConcurrentHashMap<>(); private final AtomicLong totalBlockTime = new AtomicLong(); @@ -135,7 +135,7 @@ protected static void setGuard(boolean state) { /** * @param metricsId a unique ID for naming published metrics, not null and not empty - */ + protected AsyncDispatcherBasePatch(String metricsId) { this.metricsId = metricsId; @@ -307,7 +307,7 @@ private static void setIfGreater(AtomicLong container, long value) { * Call to emit a warning if the application thread will be blocked * * @deprecated use {@link #emitQueueFullWarning(Object, boolean)} - */ + @Deprecated public void emitQueueFullWarning() { emitQueueFullWarning(null, false); @@ -320,7 +320,7 @@ public void emitQueueFullWarning() { * * @param event * @param willThrowAway rather than block, drop the event. - */ + public void emitQueueFullWarning(E event, boolean willThrowAway) { try { if (event != null) { @@ -384,7 +384,7 @@ private void registerBlocking(long now) { * Call for metrics gathering after an event has been added to the event queue. * * @param event - */ + protected void eventQueued(E event, boolean wasBlocked) { try { if (!DISABLE_MULTIMETER) this.numQueued.incrementAndGet(); @@ -411,7 +411,7 @@ protected void eventQueued(E event, boolean wasBlocked) { * interrupted. * * @param event - */ + protected void eventInterrupted(E event) { try { addEvent(event, true); @@ -436,7 +436,7 @@ protected void eventInterrupted(E event) { * Call for metrics gathering after an event has been flushed from the event queue. * * @param event - */ + protected void eventFlushed(E event) { try { if (!DISABLE_MULTIMETER) numQueued.decrementAndGet(); @@ -606,13 +606,13 @@ private String doGetExtraInformation(boolean includeBlockedThreadStacks) { .append(" ms)\n"); if (includeBlockedThreadStacks) { sb.append("Stack trace:\n"); - StackTraceUtils.appendStackTrace(sb, e.getKey().getStackTrace()); + // StackTraceUtils.appendStackTrace(sb, e.getKey().getStackTrace()); sb.append("\n"); } } } catch (Exception e) { sb.append("Failed to get extra information: ").append(e.toString()); - StackTraceUtils.appendStackTrace(sb, e.getStackTrace()); + // StackTraceUtils.appendStackTrace(sb, e.getStackTrace()); } return sb.toString(); @@ -995,3 +995,4 @@ public void remove() { } } } + */ \ No newline at end of file diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastAsyncDispatcher.scala b/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastAsyncDispatcher.scala index 2167977c..2cdc7187 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastAsyncDispatcher.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastAsyncDispatcher.scala @@ -1,4 +1,4 @@ -/* +/* /* * Morgan Stanley makes this available to you under the Apache License, Version 2.0 (the "License"). * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -91,3 +91,4 @@ class FastAsyncDispatcher extends AsyncDispatcherQueueImplPatch[ILoggingEvent] { override def append(event: ILoggingEvent): Unit = appender.append(event, buffer) } } + */ \ No newline at end of file diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastConsoleAppender.scala b/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastConsoleAppender.scala index b3038d5e..43fab423 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastConsoleAppender.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastConsoleAppender.scala @@ -139,7 +139,7 @@ final class FastConsoleAppender extends ConsoleAppender[ILoggingEvent] with Fast override def start(): Unit = { super.start() } - override protected final def _lock: ReentrantLock = lock + override protected final def _lock: ReentrantLock = ??? // lock override protected final def _started(value: Boolean): Unit = started = value override def _encoder: Encoder[ILoggingEvent] = encoder } diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastEncoder.scala b/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastEncoder.scala index 72b4f30e..03e906f5 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastEncoder.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastEncoder.scala @@ -20,7 +20,7 @@ import ch.qos.logback.core.pattern.PatternLayoutEncoderBase object foo extends LayoutWrappingEncoder class FastEncoder extends PatternLayoutEncoderBase[ILoggingEvent] { - private var fastLayout: FastPatternLayout = _ + // private var fastLayout: FastPatternLayout = _ // start from parent for comparison private def convertToBytes(s: String): Array[Byte] = { @@ -36,21 +36,21 @@ class FastEncoder extends PatternLayoutEncoderBase[ILoggingEvent] { // end from parent def encodeToBuffer(event: ILoggingEvent, buffer: EncoderBuffer) = { - fastLayout.doLayout(event, buffer) + // fastLayout.doLayout(event, buffer) } override def setLayout(layout: Layout[ILoggingEvent]): Unit = { layout match { - case fastPatternLayout: FastPatternLayout => + /* case fastPatternLayout: FastPatternLayout => this.layout = fastPatternLayout - this.fastLayout = fastPatternLayout + this.fastLayout = fastPatternLayout */ case _ => addError(s"A FastEncoder requires a FastLayout not a $layout") } } override def start(): Unit = { - fastLayout.setContext(context) - fastLayout.start() + /* fastLayout.setContext(context) + fastLayout.start() */ super.start() } } diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastPatternLayout.scala b/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastPatternLayout.scala index e6def091..be75042e 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastPatternLayout.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/logging/FastPatternLayout.scala @@ -1,4 +1,4 @@ -/* +/* /* * Morgan Stanley makes this available to you under the Apache License, Version 2.0 (the "License"). * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -64,3 +64,4 @@ sealed abstract class AbstractFastPatternLayout extends InternalPatternLayout { } } } + */ \ No newline at end of file diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/breadcrumbs/BreadcrumbsSetup.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/breadcrumbs/BreadcrumbsSetup.scala index a6c6ee46..624f6445 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/breadcrumbs/BreadcrumbsSetup.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/breadcrumbs/BreadcrumbsSetup.scala @@ -103,7 +103,7 @@ object BreadcrumbsSetup { import optimus.breadcrumbs.crumbs._ println("Breadcrumbs initialization demo") - BreadcrumbsSetup.initializeBreadcrumbsEnv(ZkEnv.dev, "demo", "BreadcrumbsInitializationDemo") + // BreadcrumbsSetup.initializeBreadcrumbsEnv(ZkEnv.dev, "demo", "BreadcrumbsInitializationDemo") Breadcrumbs.info( ChainedID.create(), PropertiesCrumb(_, new Crumb.Source { override val name = "DEMO" }, Map("hello" -> "dev world"))) diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/dal/versioning/worker/VersioningWorkerExecutionPool.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/dal/versioning/worker/VersioningWorkerExecutionPool.scala index 5c109488..f985db34 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/dal/versioning/worker/VersioningWorkerExecutionPool.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/dal/versioning/worker/VersioningWorkerExecutionPool.scala @@ -16,8 +16,8 @@ import java.util.concurrent.atomic.AtomicInteger import com.google.common.cache.CacheBuilder import com.google.common.cache.CacheLoader import com.google.common.cache.LoadingCache -import msjava.pool.ManagedPool -import msjava.pool.base.BasePoolableObjectFactory +// import msjava.pool.ManagedPool +// import msjava.pool.base.BasePoolableObjectFactory import msjava.slf4jutils.scalalog.getLogger import optimus.config.OptimusConfigurationException import optimus.config.RuntimeConfiguration @@ -58,7 +58,7 @@ private[optimus] class VersioningWorkerPool(runtimeConfig: RuntimeConfiguration) ThreadName ) - private val pool = + /* private val pool = new ManagedPool[VersioningPoolWorker](new BasePoolableObjectFactory[VersioningPoolWorker] { override def createObject = { val worker = @@ -76,16 +76,16 @@ private[optimus] class VersioningWorkerPool(runtimeConfig: RuntimeConfiguration) }) pool.setMaxActive(poolSize) - pool.afterPropertiesSet + pool.afterPropertiesSet */ def close(): Unit = { - pool.destroy() + // pool.destroy() } /** * Executes the passed block of code using the primary dsi and not with user specific dsi. */ - def exec[T](f: => T): T = { + def exec[T](f: => T): T = ??? /* { val svc = pool.borrowObject() try { val ret = svc.exec(f) @@ -93,12 +93,12 @@ private[optimus] class VersioningWorkerPool(runtimeConfig: RuntimeConfiguration) } finally { pool.returnObject(svc) } - } + } */ /** * Executes the passed block of code using the user specific dsi. */ - def exec[T](session: ClientSessionInfo)(f: => T): T = { + def exec[T](session: ClientSessionInfo)(f: => T): T = ??? /* { val svc = pool.borrowObject() try { val ret = svc.exec(session)(f) @@ -106,7 +106,7 @@ private[optimus] class VersioningWorkerPool(runtimeConfig: RuntimeConfiguration) } finally { pool.returnObject(svc) } - } + } */ private val untweakedScenarioStateCache = CacheBuilder .newBuilder() diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalContextDeserializer.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalContextDeserializer.scala index 771f7093..37db634c 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalContextDeserializer.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalContextDeserializer.scala @@ -31,7 +31,7 @@ object TemporalContextDeserializer extends BasicProtoSerialization with TemporalSurfaceMatcherDeserialization with ProtoSerializerFrom[TemporalContext, TemporalContextProto] { - private[this] def helper(proto: TemporalContextProto): TemporalSurface = { + private[this] def helper(proto: TemporalContextProto): TemporalSurface = ??? /* { val vt: Option[Instant] = if (proto.hasValidTime) Some(fromProto(proto.getValidTime)) @@ -89,7 +89,7 @@ object TemporalContextDeserializer tag ) } - } + } */ // Use a helper function so that we can cast the outer TemporalSurface to a // TemporalContext, but keep the possibility of having TemporalSurfaces diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalSurfaceMatcherDeserializer.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalSurfaceMatcherDeserializer.scala index d5aaff84..d9068579 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalSurfaceMatcherDeserializer.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/dsi/bitemporal/proto/TemporalSurfaceMatcherDeserializer.scala @@ -41,7 +41,7 @@ object TemporalSurfaceMatcherDeserializer EntityInfoRegistry.getCompanion(fqn).asInstanceOf[EntityCompanionBase[_]] } - private[this] def allOrNoneMatcherRequirements(proto: TemporalSurfaceMatcherProto): Unit = { + private[this] def allOrNoneMatcherRequirements(proto: TemporalSurfaceMatcherProto): Unit = ??? /* { require(proto.getFqnsCount == 0, s"Expected 0 FQNs for ALL matcher but got ${proto.getFqnsList}") require(proto.getNamespacesCount == 0, s"Expected 0 Namespaces for ALL matcher but got ${proto.getNamespacesList}") require( @@ -50,7 +50,7 @@ object TemporalSurfaceMatcherDeserializer require( proto.getListsOfRelationElementsCount == 0, s"Expected 0 ListOfRelationalElements for FOR_CLASS matcher but got ${proto.getListsOfRelationElementsList}") - } + } */ private[this] def getAllTemporalSurfaceMatcher(proto: TemporalSurfaceMatcherProto): TemporalSurfaceMatcher = { allOrNoneMatcherRequirements(proto) @@ -62,7 +62,7 @@ object TemporalSurfaceMatcherDeserializer TemporalSurfaceMatchers.none } - private[this] def getForClassTemporalSurfaceMatcher(proto: TemporalSurfaceMatcherProto): TemporalSurfaceMatcher = { + private[this] def getForClassTemporalSurfaceMatcher(proto: TemporalSurfaceMatcherProto): TemporalSurfaceMatcher = ??? /* { require( proto.getNamespacesCount == 0, s"Expected 0 Namespaces for FOR_CLASS matcher but got ${proto.getNamespacesList}") @@ -78,9 +78,9 @@ object TemporalSurfaceMatcherDeserializer getEcb(fqn.getFqClassName) } .filter(_ ne null): _*) - } + } */ - private[this] def getForPackageTemporalSurfaceMatcher(proto: TemporalSurfaceMatcherProto): TemporalSurfaceMatcher = { + private[this] def getForPackageTemporalSurfaceMatcher(proto: TemporalSurfaceMatcherProto): TemporalSurfaceMatcher = ??? /* { require(proto.getFqnsCount == 0, s"Expected 0 FQNs for FOR_PACKAGE matcher but got ${proto.getFqnsList}") require( proto.getEntityInfosCount == 0, @@ -91,9 +91,9 @@ object TemporalSurfaceMatcherDeserializer TemporalSurfaceMatchers.forQuery(proto.getNamespacesList.asScala.map(fromProto(_)).map { n: NamespaceWrapper => from(Namespace(n.namespace, n.includesSubPackage)) }: _*) - } + } */ - private[this] def getForPriqlTemporalSurfaceMatcher(proto: TemporalSurfaceMatcherProto): TemporalSurfaceMatcher = { + private[this] def getForPriqlTemporalSurfaceMatcher(proto: TemporalSurfaceMatcherProto): TemporalSurfaceMatcher = ??? /* { require(proto.getFqnsCount == 0, s"Expected 0 FQNs for ALL matcher but got ${proto.getFqnsList}") require(proto.getNamespacesCount == 0, s"Expected 0 Namespaces for ALL matcher but got ${proto.getNamespacesList}") require( @@ -113,9 +113,9 @@ object TemporalSurfaceMatcherDeserializer }) } QueryBasedTemporalSurfaceMatchers.buildFromReactiveQueryProcessors(x) - } + } */ - override def deserialize(proto: TemporalSurfaceMatcherProto): TemporalSurfaceMatcher = { + override def deserialize(proto: TemporalSurfaceMatcherProto): TemporalSurfaceMatcher = ??? /* { proto.getType match { case TemporalSurfaceMatcherProto.Type.ALL => getAllTemporalSurfaceMatcher(proto) case TemporalSurfaceMatcherProto.Type.NONE => getNoneTemporalSurfaceMatcher(proto) @@ -124,5 +124,5 @@ object TemporalSurfaceMatcherDeserializer case TemporalSurfaceMatcherProto.Type.PRIQL => getForPriqlTemporalSurfaceMatcher(proto) case _ => throw new InvalidTemporalSurfaceMatcherException(proto) } - } + } */ } diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/nameservice/MsJavaInetAddressResolver.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/nameservice/MsJavaInetAddressResolver.scala index ad381c56..5ee108c2 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/nameservice/MsJavaInetAddressResolver.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/nameservice/MsJavaInetAddressResolver.scala @@ -11,9 +11,9 @@ */ package optimus.platform.nameservice -import msjava.base.dns.AsyncNameService +/* import msjava.base.dns.AsyncNameService import msjava.base.dns.CachingNameService -import msjava.base.dns.MSNameService +import msjava.base.dns.MSNameService */ import msjava.slf4jutils.scalalog.getLogger import java.net.InetAddress @@ -35,19 +35,19 @@ class MsJavaInetAddressResolverProvider extends InetAddressResolverProvider { // we end up with resolver = MSNameServiceToInetAddressResolverAdapter --> CachingNameService --> // AsyncNameService --> InetAddressResolverToMSNameServiceAdapter --> configuration.builtinResolver - override def get(configuration: InetAddressResolverProvider.Configuration): InetAddressResolver = { + override def get(configuration: InetAddressResolverProvider.Configuration): InetAddressResolver = ??? /* { log.info(s"Constructing MsJavaInetAddressResolver with async and cached resolution") val adaptedBuiltinResolver = new InetAddressResolverToMSNameServiceAdapter(configuration.builtinResolver()) val timeout: Long = sys.props.get(AsyncNameService.TIMEOUT_MS_PROPERTY).map(_.toLong).getOrElse(60000L) val asyncNameService = new AsyncNameService.Builder().delegate(adaptedBuiltinResolver).timeoutMs(timeout).build val cachingNameService = new CachingNameService.Builder().delegate(asyncNameService).build new MSNameServiceToInetAddressResolverAdapter(cachingNameService) - } + } */ override def name(): String = getClass.getName } /** adapts a MSNameService to the Java InetAddressResolver API */ -private class MSNameServiceToInetAddressResolverAdapter(underlying: MSNameService) extends InetAddressResolver { +/* private class MSNameServiceToInetAddressResolverAdapter(underlying: MSNameService) extends InetAddressResolver { override def lookupByName(host: String, lookupPolicy: InetAddressResolver.LookupPolicy): Stream[InetAddress] = Stream.of(underlying.lookupAllHostAddr(host): _*) @@ -64,4 +64,4 @@ private class InetAddressResolverToMSNameServiceAdapter(underlying: InetAddressR underlying.lookupByName(hostname, policy).toArray(new Array[InetAddress](_)) override def getHostByAddr(addr: Array[Byte]): String = underlying.lookupByAddress(addr) -} +} */ diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/dynamic/DynamicObjectRelationUtils.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/dynamic/DynamicObjectRelationUtils.scala index 3cd04814..4a9fa8bf 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/dynamic/DynamicObjectRelationUtils.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/dynamic/DynamicObjectRelationUtils.scala @@ -11,7 +11,7 @@ */ package optimus.platform.relational.dynamic -import javax.jms.IllegalStateException +// import javax.jms.IllegalStateException import java.time.LocalDate import optimus.platform._ diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/reactive/Query2Filter.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/reactive/Query2Filter.scala index 69112cbd..52c555ac 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/reactive/Query2Filter.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/reactive/Query2Filter.scala @@ -16,7 +16,6 @@ import optimus.platform.annotations.internal.EmbeddableMetaDataAnnotation import optimus.platform.pickling._ import optimus.platform.storable.{EntityImpl, EntityReference} import optimus.platform.dsi.bitemporal._ -import optimus.platform.dsi.bitemporal.proto.Dsi.NotificationMessageProto.Type._ import optimus.platform.relational.reactive.filter.Binary import optimus.platform.relational.reactive.{defaultFilterClassOption => _} import optimus.platform.relational.tree._ diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/reactive/filter/Condition.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/reactive/filter/Condition.scala index e7b0ab62..0a760729 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/reactive/filter/Condition.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/relational/reactive/filter/Condition.scala @@ -14,7 +14,7 @@ package optimus.platform.relational.reactive.filter import optimus.utils.datetime.ZoneIds import java.time._ -import net.iharder.base64.Base64 +import net.iharder.Base64 import optimus.platform.pickling._ import optimus.platform.storable.{Entity, EntityImpl, EntityReference, ModuleEntityToken} import optimus.platform.dsi.bitemporal._ @@ -58,7 +58,7 @@ sealed trait Condition { object Condition { import BinaryOperator._ - def fieldFor(tpe: NotificationMessageProto.Type): String = tpe match { + /* def fieldFor(tpe: NotificationMessageProto.Type): String = tpe match { case NotificationMessageProto.Type.HEARTBEAT => "heart_beat" case NotificationMessageProto.Type.RESET_STATE => "reset_state" case NotificationMessageProto.Type.BEGIN_TRANSACTION => "begin_transaction" @@ -96,7 +96,7 @@ object Condition { Seq(Binary(s"$field.context.type", EQ, ContextProto.Type.UNIQUE), Binary(s"$field.context.uuid", EQ, uuid))) case DefaultContext => Binary(s"$field.context.type", EQ, ContextProto.Type.DEFAULT) } - } + } */ def ofClass(clazz: Class[_])(implicit filterClassOption: FilterClassOption.Value): Binary = { import FilterClassOption._ filterClassOption match { @@ -185,7 +185,7 @@ final case class PropertyCondition( val operator: BinaryOperator.Value = BinaryOperator.EQ, reverse: Boolean = false) extends Condition { - import FieldProto.Type._ + // import FieldProto.Type._ import scala.collection.mutable @@ -228,7 +228,7 @@ final case class PropertyCondition( override def writeFloat(data: Float): Unit = () override def writeInt(data: Int): Unit = () override def writeLong(data: Long): Unit = () - override def writeRawObject(data: AnyRef) = res = data match { + override def writeRawObject(data: AnyRef) = ??? /* res = data match { case lt: LocalTime => s"""$valuePrefix.children[type = "$LOCAL_TIME" AND associated_key = "$valueName"].long_value ${op} ${lt.toNanoOfDay}""" case dt: LocalDate => @@ -271,7 +271,7 @@ final case class PropertyCondition( } case _ => throw new UnsupportedFilterCondition(s"Unsupported filtering on ${valueName} of type ${data.getClass}") - } + } */ def currentField: Option[String] = Some(valueName) } @@ -346,7 +346,7 @@ final case class PropertyCondition( import scala.collection.mutable.ArrayBuffer private[this] val buf = ArrayBuffer[Any]() - private var tpe: FieldProto.Type = _ + private var tpe: Any/* : FieldProto.Type */ = _ private var valueType: String = _ def getResult(): String = { @@ -380,7 +380,7 @@ final case class PropertyCondition( override def writeFloat(data: Float): Unit = () override def writeInt(data: Int): Unit = () override def writeLong(data: Long): Unit = () - override def writeRawObject(data: AnyRef) = data match { + override def writeRawObject(data: AnyRef) = ??? /* data match { case lt: LocalTime => tpe = LOCAL_TIME valueType = "long_value" @@ -448,7 +448,7 @@ final case class PropertyCondition( case unspported => throw new UnsupportedFilterCondition(s"Unsupported filtering on ${name} of type ${data.getClass}") - } + } */ def currentField: Option[String] = parent.currentField } diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/runtime/RuntimeComponents.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/runtime/RuntimeComponents.scala index 3d6e0cb9..3bc8d494 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/runtime/RuntimeComponents.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/runtime/RuntimeComponents.scala @@ -61,9 +61,9 @@ object RuntimeComponents { DALEntityResolver(dsi) /** Extracts [[InitialRuntime.initialTime]] from a scenario stack */ - private[optimus] def getInitialRuntimeInitialTime(ss: ScenarioStack): Instant = { + private[optimus] def getInitialRuntimeInitialTime(ss: ScenarioStack): Instant = ??? /* { ss.getNode(InitialRuntime.initialTime.key).get - } + } */ class WithConstantTime(rc: RuntimeConfiguration, t: Instant) extends RuntimeComponents(rc) { override protected[this] final def timeLookup(resolver: EntityResolver): Instant = t diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/DefaultAsyncLogbackConfigurator.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/DefaultAsyncLogbackConfigurator.scala index 9d0544c8..1f9fe987 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/DefaultAsyncLogbackConfigurator.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/DefaultAsyncLogbackConfigurator.scala @@ -18,8 +18,8 @@ import ch.qos.logback.classic.spi.ILoggingEvent import ch.qos.logback.core.ConsoleAppender import ch.qos.logback.core.encoder.LayoutWrappingEncoder import ch.qos.logback.core.spi.ContextAwareBase -import msjava.logbackutils.async.AsyncAppender -import msjava.logbackutils.async.AsyncDispatcherQueueImplPatch +// import msjava.logbackutils.async.AsyncAppender +// import msjava.logbackutils.async.AsyncDispatcherQueueImplPatch /** * Similar to default configuration of logback, except that console appender is wrapped in async appender. @@ -29,7 +29,7 @@ import msjava.logbackutils.async.AsyncDispatcherQueueImplPatch */ class DefaultAsyncLogbackConfigurator extends ContextAwareBase with Configurator { - override def configure(lc: LoggerContext): Unit = { + override def configure(lc: LoggerContext) = ??? /* { addInfo("Setting up default configuration for async logging.") val ca = new ConsoleAppender[ILoggingEvent] @@ -61,6 +61,6 @@ class DefaultAsyncLogbackConfigurator extends ContextAwareBase with Configurator asyncAppender.start() val rootLogger = lc.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME) - rootLogger.addAppender(asyncAppender) - } + // rootLogger.addAppender(asyncAppender) + } */ } diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/LoggingHelper.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/LoggingHelper.scala index 9e0adef7..b4ae0c3b 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/LoggingHelper.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/LoggingHelper.scala @@ -32,7 +32,7 @@ private[optimus] /*[platform]*/ object LoggingHelper { def checkAsyncEnabled(tree: AppenderAttachable[_]): Boolean = { tree.iteratorForAppenders.asScala.forall { - case _: ch.qos.logback.core.AsyncAppenderBase[_] | _: msjava.logbackutils.async.AsyncAppender[_] => true + case _: ch.qos.logback.core.AsyncAppenderBase[_] /* | _: msjava.logbackutils.async.AsyncAppender[_] */ => true case a if toleratedSyncLoggers.contains(a.getClass.getName) => true case a: ch.qos.logback.core.spi.AppenderAttachable[_] => checkAsyncEnabled(a) case _ => false diff --git a/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/RuntimeExecutor.scala b/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/RuntimeExecutor.scala index 7b2c34a2..2ffc8760 100644 --- a/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/RuntimeExecutor.scala +++ b/optimus/platform/projects/platform/src/main/scala/optimus/platform/util/RuntimeExecutor.scala @@ -41,7 +41,7 @@ object RuntimeExecutor { tb.eval(evalTree) } catch { - case ex: Exception => throw msjava.base.lang.ExceptionUtils.getUltimateCause(ex) + case ex: Exception => ??? // throw msjava.base.lang.ExceptionUtils.getUltimateCause(ex) case err: Throwable => throw new Exception("Dynamic code compile error! Please check your expression: " + code) } diff --git a/optimus/platform/projects/platform_profiler/src/main/scala/optimus/profiler/NodeDump.scala b/optimus/platform/projects/platform_profiler/src/main/scala/optimus/profiler/NodeDump.scala index 284a8748..07f18914 100644 --- a/optimus/platform/projects/platform_profiler/src/main/scala/optimus/profiler/NodeDump.scala +++ b/optimus/platform/projects/platform_profiler/src/main/scala/optimus/profiler/NodeDump.scala @@ -13,7 +13,7 @@ package optimus.profiler import java.nio.charset.Charset -import net.iharder.base64.Base64 +import net.iharder.Base64 import optimus.core.CoreHelpers import optimus.graph.NodeTask import optimus.platform.storable.Entity diff --git a/optimus/platform/projects/priql/src/main/scala/optimus/platform/util/RuntimeScalaCompiler.scala b/optimus/platform/projects/priql/src/main/scala/optimus/platform/util/RuntimeScalaCompiler.scala index 8b5e782e..1c8cc269 100644 --- a/optimus/platform/projects/priql/src/main/scala/optimus/platform/util/RuntimeScalaCompiler.scala +++ b/optimus/platform/projects/priql/src/main/scala/optimus/platform/util/RuntimeScalaCompiler.scala @@ -54,7 +54,7 @@ class RuntimeScalaCompiler( settings.pluginOptions.value ++= pluginOptions - settings.YaliasPackage.tryToSet(PackageAliases.aliases) + // settings.YaliasPackage.tryToSet(PackageAliases.aliases) val reporter = new StoreReporter(settings) val global = new Global(settings, reporter) diff --git a/optimus/platform/projects/priql_dal_persistence/src/main/scala/optimus/platform/relational/dal/persistence/DalConstantProtoSerialization.scala b/optimus/platform/projects/priql_dal_persistence/src/main/scala/optimus/platform/relational/dal/persistence/DalConstantProtoSerialization.scala index 33afc708..30f37b47 100644 --- a/optimus/platform/projects/priql_dal_persistence/src/main/scala/optimus/platform/relational/dal/persistence/DalConstantProtoSerialization.scala +++ b/optimus/platform/projects/priql_dal_persistence/src/main/scala/optimus/platform/relational/dal/persistence/DalConstantProtoSerialization.scala @@ -19,5 +19,5 @@ object DalConstValueProtoSerializer extends ConstValueSerializer { override def toBytes(o: Any): Array[Byte] = ProtoPickleSerializer.propertiesToProto(o, None).toByteArray - override def fromBytes(proto: Array[Byte]): Any = ProtoPickleSerializer.protoToProperties(FieldProto.parseFrom(proto)) + override def fromBytes(proto: Array[Byte]): Any = ??? /* ProtoPickleSerializer.protoToProperties(FieldProto.parseFrom(proto)) */ } diff --git a/optimus/platform/projects/utils/src/main/scala/optimus/logging/CachedNamedConverter.scala b/optimus/platform/projects/utils/src/main/scala/optimus/logging/CachedNamedConverter.scala index 992ca884..2b4e279f 100644 --- a/optimus/platform/projects/utils/src/main/scala/optimus/logging/CachedNamedConverter.scala +++ b/optimus/platform/projects/utils/src/main/scala/optimus/logging/CachedNamedConverter.scala @@ -9,18 +9,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package ch.qos.logback.classic.pattern { +/* package ch.qos.logback.classic.pattern { sealed abstract class NamedConverterExtension extends ClassOfCallerConverter { protected final def getAbbreviator = abbreviator } -} +} */ package optimus.logging { import java.util.concurrent.ConcurrentHashMap import ch.qos.logback.classic.PatternLayout - import ch.qos.logback.classic.pattern.NamedConverterExtension + import ch.qos.logback.classic.pattern.ClassOfCallerConverter import ch.qos.logback.classic.spi.ILoggingEvent object OptimusLogging { @@ -42,21 +42,23 @@ package optimus.logging { def install(): Unit = installed } - class CachedNamedConverter extends NamedConverterExtension { + class CachedNamedConverter extends /* NamedConverterExtension */ ClassOfCallerConverter { var cachedNames: ConcurrentHashMap[String, String] = null override def start(): Unit = { super.start() - if (getAbbreviator ne null) { - cachedNames = new ConcurrentHashMap[String, String] - } + // TODO + // if (getAbbreviator ne null) { + // cachedNames = new ConcurrentHashMap[String, String] + // } } override def convert(event: ILoggingEvent): String = { // Note - After Java 11 migration this can be improved // to walk the stack val fqn: String = getFullyQualifiedName(event) - val abbreviator = getAbbreviator + // TODO + /* val abbreviator = getAbbreviator if (abbreviator eq null) fqn // the default abbreviator generates loads of garbage, so cache the responses @@ -64,7 +66,8 @@ package optimus.logging { val exists = cachedNames.get(fqn) if (exists ne null) exists else cachedNames.computeIfAbsent(fqn, abbreviator.abbreviate) - } + } */ + fqn } } class CachedLoggerConverter extends CachedNamedConverter { diff --git a/optimus/platform/projects/utils/src/main/scala/optimus/platform/utils/KerberosAuthentication.scala b/optimus/platform/projects/utils/src/main/scala/optimus/platform/utils/KerberosAuthentication.scala index d8c2864a..d68137a5 100644 --- a/optimus/platform/projects/utils/src/main/scala/optimus/platform/utils/KerberosAuthentication.scala +++ b/optimus/platform/projects/utils/src/main/scala/optimus/platform/utils/KerberosAuthentication.scala @@ -13,7 +13,7 @@ package optimus.platform.utils import javax.security.auth.login.AppConfigurationEntry import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag -import msjava.kerberos.auth.MSKerberosConfiguration +// import msjava.kerberos.auth.MSKerberosConfiguration import scala.jdk.CollectionConverters._ @@ -26,14 +26,14 @@ trait KerberosAuthentication { } protected def setupKerberosCredentials(clientNames: List[String] = List("KafkaClient", "Client")): Unit = { - if (isKerberized) { + /* if (isKerberized) { MSKerberosConfiguration.setClientConfiguration() clientNames.foreach(clientName => registerAppConfigurationEntryFor(clientName)) - } + } */ } private def registerAppConfigurationEntryFor(clientName: String): Unit = { - MSKerberosConfiguration.registerAppConfigurationEntry( + /* MSKerberosConfiguration.registerAppConfigurationEntry( clientName, (_: String) => Array( @@ -48,6 +48,6 @@ trait KerberosAuthentication { ).asJava ) ) - ) + ) */ } } diff --git a/optimus/platform/projects/utils/src/main/scala/optimus/utils/datetime/package.scala b/optimus/platform/projects/utils/src/main/scala/optimus/utils/datetime/package.scala index ea386fd8..e084f49b 100644 --- a/optimus/platform/projects/utils/src/main/scala/optimus/utils/datetime/package.scala +++ b/optimus/platform/projects/utils/src/main/scala/optimus/utils/datetime/package.scala @@ -193,7 +193,7 @@ package object datetime { object JSR310Conversions { - implicit class ConvertibleInstant(val instant: Instant) extends AnyVal { + /* implicit class ConvertibleInstant(val instant: Instant) extends AnyVal { def toEpochNano = toJSR310.toEpochNano def toJSR310: javax.time.Instant = javax.time.Instant.ofEpochSecond(instant.getEpochSecond, instant.getNano) } @@ -236,7 +236,7 @@ package object datetime { zdt.getNanoOfSecond, ZoneId.of(zdt.getZone.getID, ZoneId.SHORT_IDS) ) - } + } */ } diff --git a/optimus/silverking/projects/silverking/src/main/resources/optimus/platform/dsi/bitemporal/proto/dsi.proto b/optimus/silverking/projects/silverking/src/main/resources/optimus/platform/dsi/bitemporal/proto/dsi.proto new file mode 100644 index 00000000..ff99b9d9 --- /dev/null +++ b/optimus/silverking/projects/silverking/src/main/resources/optimus/platform/dsi/bitemporal/proto/dsi.proto @@ -0,0 +1,19 @@ +/* + * Morgan Stanley makes this available to you under the Apache License, Version 2.0 (the "License"). + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * See the NOTICE file distributed with this work for additional information regarding copyright ownership. + * + * 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. + */ +package optimus.platform.dsi.bitemporal.proto; + +option optimize_for = LITE_RUNTIME; + +message ChainedIdProto { + repeated string data = 1; +} + diff --git a/optimus/silverking/projects/silverking/src/main/resources/optimus/platform/dsi/bitemporal/proto/prc.proto b/optimus/silverking/projects/silverking/src/main/resources/optimus/platform/dsi/bitemporal/proto/prc.proto new file mode 100644 index 00000000..b0f273c8 --- /dev/null +++ b/optimus/silverking/projects/silverking/src/main/resources/optimus/platform/dsi/bitemporal/proto/prc.proto @@ -0,0 +1,33 @@ +/* + * Morgan Stanley makes this available to you under the Apache License, Version 2.0 (the "License"). + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * See the NOTICE file distributed with this work for additional information regarding copyright ownership. + * + * 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. + */ +import "optimus/platform/dsi/bitemporal/proto/dsi.proto"; + +package optimus.platform.dsi.bitemporal.proto; + +option optimize_for = LITE_RUNTIME; + +message SilverKingTraceIdProto { + enum Type { + TRACE_ID = 1; + } + + enum ForwardState { + NOT_FORWARDED = 1; + LOCAL_FORWARDED = 2; + REMOTE_FORWARDED = 3; + } + + optional Type type = 1; + optional ForwardState forward_state = 2; + optional string request_uuid = 3; + optional ChainedIdProto chained_id = 4; +} diff --git a/optimus/stratosphere/common/src/main/scala/optimus/stratosphere/http/client/HttpClientFactory.scala b/optimus/stratosphere/common/src/main/scala/optimus/stratosphere/http/client/HttpClientFactory.scala index 3d9adeb5..99e169b9 100644 --- a/optimus/stratosphere/common/src/main/scala/optimus/stratosphere/http/client/HttpClientFactory.scala +++ b/optimus/stratosphere/common/src/main/scala/optimus/stratosphere/http/client/HttpClientFactory.scala @@ -16,8 +16,8 @@ import akka.http.scaladsl.model.HttpRequest import akka.http.scaladsl.model.HttpResponse import akka.http.scaladsl.model.Uri import akka.http.scaladsl.settings.ConnectionPoolSettings -import optimus.security.akka.http.client.SimpleNoAuthenticationHttpClient -import optimus.security.akka.http.common.AkkaConfigurations +/* import optimus.security.akka.http.client.SimpleNoAuthenticationHttpClient +import optimus.security.akka.http.common.AkkaConfigurations */ import optimus.stratosphere.config.StratoWorkspaceCommon import java.util.concurrent.TimeUnit @@ -77,7 +77,7 @@ class SimpleNoAuthenticationRestClient( jTimeout: Duration )(protected implicit val actorSystem: ActorSystem) extends RestClient { - private val innerClient = new SimpleNoAuthenticationHttpClient(rootUri) + // private val innerClient = new SimpleNoAuthenticationHttpClient(rootUri) protected val timeout: FiniteDuration = FiniteDuration.apply(jTimeout.toMillis, TimeUnit.MILLISECONDS) def hostName: String = rootUri.authority.host.toString() @@ -85,17 +85,17 @@ class SimpleNoAuthenticationRestClient( override def request( pathQueryFragmentOrUri: String, modifier: HttpRequest => HttpRequest, - settingsOverride: Option[ConnectionPoolSettings]): Future[HttpResponse] = - innerClient.request(pathQueryFragmentOrUri, modifier, settingsOverride) + settingsOverride: Option[ConnectionPoolSettings]): Future[HttpResponse] = ??? + // innerClient.request(pathQueryFragmentOrUri, modifier, settingsOverride) } class DefaultHttpClientFactory(stratoWorkspace: StratoWorkspaceCommon) extends HttpClientFactoryApi { // The class loader matters because of the plugin architecture of IntelliJ! - implicit val actorSystem: ActorSystem = - ActorSystem("http-clients", AkkaConfigurations.BasicClientConfiguration, getClass.getClassLoader) + /* implicit val actorSystem: ActorSystem = + ActorSystem("http-clients", AkkaConfigurations.BasicClientConfiguration, getClass.getClassLoader) */ stratoWorkspace.log.debug("Using DefaultHttpClientFactory") - def createClient(rootUri: Uri, targetSystemType: String, timeout: Duration, sendCrumbs: Boolean = false): RestClient = - new SimpleNoAuthenticationRestClient(stratoWorkspace, rootUri, timeout) + def createClient(rootUri: Uri, targetSystemType: String, timeout: Duration, sendCrumbs: Boolean = false): RestClient = ??? + // new SimpleNoAuthenticationRestClient(stratoWorkspace, rootUri, timeout) } diff --git a/project/BuildTool.scala b/project/BuildTool.scala new file mode 100644 index 00000000..5bd4ef95 --- /dev/null +++ b/project/BuildTool.scala @@ -0,0 +1,75 @@ +package optimus + +import optimus.Dependencies._ +import sbt._ +import sbt.Keys._ + +object BuildTool { + private val projectsDir = file("optimus/buildtool/projects") + + lazy val app = Project("buildToolApp", projectsDir / "app") + .settings( + scalacOptions ++= ScalacOptions.common, + libraryDependencies ++= Seq( + bsp4j, + coursier, + cxfTools, + cxfToolsWsdlto, + jgit, + jmustache, + jsonSchema2Pojo, + scalaxb, + scalaXml, + zinc + ) + ) + .dependsOn( + format, + rest, + runConf, + DHT.client3, + Platform.entityPlugin, + Platform.entityPluginJar % "plugin", + Platform.gitUtils, + Platform.platform, + Stratosphere.common, + ) + + lazy val rest = Project("buildToolRest", projectsDir / "rest") + .settings(libraryDependencies ++= Seq(args4j)) + .dependsOn(Platform.platform) + + lazy val runConf = Project("buildToolRunConf", projectsDir / "runconf") + .settings( + scalacOptions ++= ScalacOptions.common, + libraryDependencies ++= Seq(slf4j, typesafeConfig) + ) + .dependsOn(core, Platform.scalaCompat, Platform.utils) + + lazy val format = Project("buildToolFormat", projectsDir / "format") + .settings( + scalacOptions ++= ScalacOptions.common, + libraryDependencies ++= Seq( + args4j, + jacksonDatabind, + jacksonModuleScala, + jibCore, + scalaCollectionCompat, + slf4j, + sprayJson, + zstdJni + ) + ) + .dependsOn(core, Platform.annotations, Platform.scalaCompat) + + lazy val core = Project("buildToolCore", projectsDir / "core") + .settings( + libraryDependencies ++= Seq( + scalaCollectionCompat, + scalaParserCombinator, + sprayJson, + typesafeConfig + ) + ) + .dependsOn(Platform.sprayJson) +} diff --git a/project/DHT.scala b/project/DHT.scala new file mode 100644 index 00000000..ac3df50c --- /dev/null +++ b/project/DHT.scala @@ -0,0 +1,38 @@ +package optimus + +import optimus.Dependencies._ +import sbt._ +import sbt.Keys._ +import sbtprotobuf.ProtobufPlugin +import sbtprotobuf.ProtobufPlugin.autoImport._ + +object DHT { + private val projectsDir = file("optimus/dht/projects") + + lazy val client3 = Project("dhtClient3", projectsDir / "client3") + .settings(libraryDependencies ++= Seq(guiceAssistedInject, nettyResolverDNS)) + .dependsOn(digest, common3) + + val digest = Project("dhtDigest", projectsDir / "digest") + + lazy val common3 = Project("dhtCommon3", projectsDir / "common3") + .enablePlugins(ProtobufPlugin) + .settings( + ProtobufConfig / sourceDirectory := (Compile / sourceDirectory).value / "proto", + libraryDependencies ++= Seq( + commonsLang3, + guava, + guice, + hdrHistogram, + jakartaInject, + jcTools, + nettyBuffer, + nettyHandler, + slf4j, + snakeYaml, + typesafeConfig, + zooKeeper, + ) + ) + .dependsOn(Platform.missing) +} \ No newline at end of file diff --git a/project/Dependencies.scala b/project/Dependencies.scala new file mode 100644 index 00000000..51788866 --- /dev/null +++ b/project/Dependencies.scala @@ -0,0 +1,100 @@ +package optimus + +import sbt._ + +object Dependencies { + val akkaVersion = "2.6.20" + val akkaHttpVersion = "10.2.10" + val asmVersion = "9.7.1" + val curatorVersion = "5.7.1" + val cxfVersion = "3.6.4" + val guiceVersion = "7.0.0" + val httpComponentsVersion = "4.5.14" + val jacksonVersion = "2.18.2" + val kafkaVersion = "3.9.0" + val logbackVersion = "1.5.12" + val nettyVersion = "4.1.115.Final" + val scala2Version = "2.13.15" + val springVersion = "6.2.0" + + val akkaActor = "com.typesafe.akka" %% "akka-actor" % akkaVersion + val akkaHttpCore = "com.typesafe.akka" %% "akka-http-core" % akkaHttpVersion + val akkaHttpSprayJson = "com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion + val akkaStream = "com.typesafe.akka" %% "akka-stream" % akkaVersion + val archaiusCore = "com.netflix.archaius" % "archaius-core" % "0.7.12" + val args4j = "args4j" % "args4j" % "2.37" + val asm = "org.ow2.asm" % "asm" % asmVersion + val asmCommons = "org.ow2.asm" % "asm-commons" % asmVersion + val asmTree = "org.ow2.asm" % "asm-tree" % asmVersion + val asmUtil = "org.ow2.asm" % "asm-util" % asmVersion + val asyncProfilerLoaderAll = "me.bechberger" % "ap-loader-all" % "3.0-9" + val awsSdk = "com.amazonaws" % "aws-java-sdk" % "1.12.779" + val base64 = "net.iharder" % "base64" % "2.3.9" + val bsp4j = "ch.epfl.scala" % "bsp4j" % "2.1.0" + val caffeine = "com.github.ben-manes.caffeine" % "caffeine" % "3.1.8" + val caliper = "com.google.caliper" % "caliper" % "1.0-beta-3" + val commonsCompress = "org.apache.commons" % "commons-compress" % "1.27.1" + val commonsIO = "commons-io" % "commons-io" % "2.18.0" + val commonsLang3 = "org.apache.commons" % "commons-lang3" % "3.17.0" + val commonsMath3 = "org.apache.commons" % "commons-math3" % "3.6.1" + val coursier = "io.get-coursier" %% "coursier" % "2.0.16" + val curatorRecipes = "org.apache.curator" % "curator-recipes" % curatorVersion + val curatorFramework = "org.apache.curator" % "curator-framework" % curatorVersion + val cxfTools = "org.apache.cxf" % "cxf-tools-common" % cxfVersion + val cxfToolsWsdlto = "org.apache.cxf" % "cxf-tools-wsdlto-core" % cxfVersion + val eaioUUID = "com.eaio.uuid" % "uuid" % "3.2" + val fastUtil = "it.unimi.dsi" % "fastutil" % "8.5.15" + val freemarker = "org.freemarker" % "freemarker" % "2.3.33" + val guava = "com.google.guava" % "guava" % "33.3.1-jre" + val guice = "com.google.inject" % "guice" % guiceVersion + val guiceAssistedInject = "com.google.inject.extensions" % "guice-assistedinject" % guiceVersion + val hamcrest = "org.hamcrest" % "hamcrest" % "3.0" + val hdrHistogram = "org.hdrhistogram" % "HdrHistogram" % "2.2.2" + val hibernateValidator = "org.hibernate.validator" % "hibernate-validator" % "8.0.1.Final" + val hkdf = "at.favre.lib" % "hkdf" % "1.1.0" + val httpClient = "org.apache.httpcomponents" % "httpclient" % httpComponentsVersion + val httpMime = "org.apache.httpcomponents" % "httpmime" % httpComponentsVersion + val jansi = "org.fusesource.jansi" % "jansi" % "2.4.1" + val jakartaInject = "jakarta.inject" % "jakarta.inject-api" % "2.0.1" + val javaxActivation = "javax.activation" % "activation" % "1.1.1" + val javaxMail = "javax.mail" % "javax.mail-api" % "1.6.2" + val jacksonDatabind = "com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion + val jacksonDataformatYaml = "com.fasterxml.jackson.dataformat" % "jackson-dataformat-yaml" % jacksonVersion + val jacksonDatatypeJSR310 = "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % jacksonVersion + val jacksonModuleScala = "com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonVersion + val jcTools = "org.jctools" % "jctools-core" % "4.0.5" + val jettison = "org.codehaus.jettison" % "jettison" % "1.5.4" + val jgit = "org.eclipse.jgit" % "org.eclipse.jgit" % "7.1.0.202411261347-r" + val jgrapht = "org.jgrapht" % "jgrapht-core" % "1.3.1" + val jibCore = "com.google.cloud.tools" % "jib-core" % "0.27.2" + val jmustache = "com.samskivert" % "jmustache" % "1.16" + val jnaPlatform = "net.java.dev.jna" % "jna-platform" % "5.15.0" + val jodaTime = "joda-time" % "joda-time" % "2.13.0" + val jsonSchema2Pojo = "org.jsonschema2pojo" % "jsonschema2pojo-core" % "1.2.2" + val junit = "junit" % "junit" % "4.13.2" + val kafka = "org.apache.kafka" %% "kafka" % kafkaVersion + val kafkaClients = "org.apache.kafka" % "kafka-clients" % kafkaVersion + val logbackClassic = "ch.qos.logback" % "logback-classic" % logbackVersion + val logbackCore = "ch.qos.logback" % "logback-core" % logbackVersion + val nettyBuffer = "io.netty" % "netty-buffer" % nettyVersion + val nettyHandler = "io.netty" % "netty-handler" % nettyVersion + val nettyResolverDNS = "io.netty" % "netty-resolver-dns" % nettyVersion + val openCSV = "com.opencsv" % "opencsv" % "5.9" + val poi = "org.apache.poi" % "poi" % "5.3.0" + val scalaCollectionCompat = "org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0" + val scalaCompiler = "org.scala-lang" % "scala-compiler" % scala2Version + val scalaParallelCollections = "org.scala-lang.modules" %% "scala-parallel-collections" % "0.2.0" + val scalaParserCombinator = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2" + val scalaReflect = "org.scala-lang" % "scala-reflect" % scala2Version + val scalaxb = "org.scalaxb" %% "scalaxb" % "1.8.3" + val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.3.1" + val slf4j = "org.slf4j" % "slf4j-api" % "2.0.16" + val snakeYaml = "org.yaml" % "snakeyaml" % "2.3" + val sprayJson = "io.spray" %% "spray-json" % "1.3.6" + val springContext = "org.springframework" % "spring-context" % springVersion + val springWeb = "org.springframework" % "spring-web" % springVersion + val typesafeConfig = "com.typesafe" % "config" % "1.4.3" + val zooKeeper = "org.apache.zookeeper" % "zookeeper" % "3.9.3" + val zinc = "org.scala-sbt" %% "zinc" % "1.7.2" + val zstdJni = "com.github.luben" % "zstd-jni" % "1.5.6-8" +} \ No newline at end of file diff --git a/project/GSF.scala b/project/GSF.scala new file mode 100644 index 00000000..973c93e0 --- /dev/null +++ b/project/GSF.scala @@ -0,0 +1,13 @@ +package optimus + +import optimus.Dependencies._ +import sbt._ +import sbt.Keys._ + +object GSF { + private val projectsDir = file("optimus/gsf/projects") + + val breadcrumbs = Project("gsfBreadcrumbs", projectsDir / "gsf_breadcrumbs") + .settings(libraryDependencies ++= Seq(scalaCollectionCompat, sprayJson)) + .dependsOn(Platform.breadcrumbs) +} diff --git a/project/Platform.scala b/project/Platform.scala new file mode 100644 index 00000000..92362ab2 --- /dev/null +++ b/project/Platform.scala @@ -0,0 +1,295 @@ +package optimus + +import optimus.Dependencies._ +import sbt._ +import sbt.Keys._ +import sbtprotobuf.ProtobufPlugin +import sbtprotobuf.ProtobufPlugin.autoImport._ +import sbtassembly.AssemblyPlugin.autoImport._ + +object Platform { + private val projectsDir = file("optimus/platform/projects") + private val loomSettings = Seq( + Compile / unmanagedSourceDirectories += (Compile / sourceDirectory).value / "loom-off", + ) + + lazy val platform = Project("platform", projectsDir / "platform") + .settings( + scalacOptions ++= ScalacOptions.common ++ ScalacOptions.macros ++ ScalacOptions.dynamics ++ Seq("-P:entity:enableStaging:true"), + libraryDependencies ++= Seq(freemarker, jacksonDatatypeJSR310, javaxMail) + ) + .dependsOn( + core, + dalClient, + entityPlugin, + entityPluginJar % "plugin", + priql, + priqlDal, + priqlDalPersistence + ) + + lazy val gitUtils = Project("platformGitUtils", projectsDir / "git-utils") + .settings(libraryDependencies ++= Seq(scalaCollectionCompat, slf4j)) + + lazy val bitBucketUtils = Project("platformBitBucketUtils", projectsDir / "bitbucket-utils") + .settings( + libraryDependencies ++= Seq( + akkaHttpCore, + akkaHttpSprayJson, + Dependencies.sprayJson, + typesafeConfig + ) + ) + .dependsOn(restUtils) + + lazy val restUtils = Project("platformRestUtils", projectsDir / "rest-utils") + .settings(libraryDependencies ++= Seq(Dependencies.sprayJson)) + + lazy val priqlDalPersistence = Project("platformPriqlDalPersistence", projectsDir / "priql_dal_persistence") + .settings(scalacOptions ++= ScalacOptions.common) + .dependsOn(priqlDal) + + lazy val priqlDal = Project("platformPriqlDal", projectsDir / "priql_dal") + .enablePlugins(ProtobufPlugin) + .settings( + ProtobufConfig / sourceDirectory := (Compile / resourceDirectory).value, + scalacOptions ++= ScalacOptions.common ++ ScalacOptions.macros + ) + .dependsOn(dalClient, dalCore, entityPlugin, entityPluginJar % "plugin", priql) + + lazy val priql = Project("platformPriql", projectsDir / "priql") + .enablePlugins(ProtobufPlugin) + .settings( + ProtobufConfig / sourceDirectory := (Compile / resourceDirectory).value, + scalacOptions ++= ScalacOptions.common ++ ScalacOptions.macros ++ Seq("-P:entity:enableStaging:true"), + libraryDependencies ++= Seq(poi, scalaParserCombinator), + ) + .dependsOn( + alarms, + core, + coreMacro, + collections, + entityPlugin, + entityPluginJar % "plugin", + scalaCompat + ) + + lazy val dalClient = Project("platformDalClient", projectsDir / "dal_client") + .settings(scalacOptions ++= ScalacOptions.common ++ ScalacOptions.macros) + .dependsOn(core, dalCore, entityPlugin, entityPluginJar % "plugin", tls, versioningRuntime) + + lazy val versioningRuntime = Project("platformVersioningRuntime", projectsDir / "versioning_runtime") + .settings(scalacOptions ++= ScalacOptions.common) + .dependsOn(dalCore, entityPlugin, entityPluginJar % "plugin", core) + + lazy val msNetSSL = Project("platformMSNetSSL", projectsDir / "msnet-ssl") + .dependsOn(missing) + + lazy val tls = Project("platformTls", projectsDir / "tls") + .settings(libraryDependencies ++= Seq(guava, nettyHandler, typesafeConfig)) + .dependsOn(missing, utils) + + lazy val dalCore = Project("platformDalCore", projectsDir / "dal_core") + .settings( + scalacOptions ++= ScalacOptions.common ++ ScalacOptions.macros, + libraryDependencies ++= Seq(guice, logbackClassic, slf4j, springContext) + ) + .dependsOn( + breadcrumbs, + collections, + core, + coreConfig, + dalEnvironment, + entityAgent, + Silverking.silverking + ) + + lazy val collections = Project("platformCollections", projectsDir / "collections") + + lazy val dalEnvironment = Project("platformDalEnvironment", projectsDir / "dal_environment") + .settings( + scalacOptions ++= ScalacOptions.common, + libraryDependencies ++= Seq(curatorFramework, guava, typesafeConfig) + ) + .dependsOn( + breadcrumbs, + coreConfig, + coreMacro, + missing, + Silverking.silverking + ) + + lazy val core = Project("platformCore", projectsDir / "core") + .settings( + scalacOptions ++= ScalacOptions.common ++ ScalacOptions.macros, + libraryDependencies ++= Seq( + asyncProfilerLoaderAll, + commonsMath3, + eaioUUID, + fastUtil, + jodaTime, + Dependencies.sprayJson, + typesafeConfig + ) + ) + .dependsOn( + annotations, + breadcrumbs, + coreConfig, + debugger, + entityAgent, + GSF.breadcrumbs, + inputs, + instrumentation, + missing, + sprayJson, + stagingPluginJar % "plugin" + ) + + lazy val debugger = Project("platformDebugger", projectsDir / "debugger") + .settings(libraryDependencies ++= Seq(jacksonDatabind, jacksonModuleScala)) + + lazy val instrumentation = Project("platformInstrumentation", projectsDir / "instrumentation") + .settings( + scalacOptions ++= ScalacOptions.common, + libraryDependencies ++= Seq( + asyncProfilerLoaderAll, + httpClient, + httpMime, + kafka, + springWeb + ) + ) + .dependsOn( + breadcrumbs, + entityAgent, + utils, + stagingPluginJar % "plugin" + ) + + lazy val inputs = Project("platformInputs", projectsDir / "inputs") + + lazy val coreConfig = Project("platformCoreConfig", projectsDir / "core_config") + .dependsOn(breadcrumbs, utils) + + lazy val entityAgent = Project("platformEntityAgent", projectsDir / "entityagent") + .settings( + loomSettings, + libraryDependencies ++= Seq(asm, asmCommons, asmTree, asmUtil) + ) + .dependsOn(entityAgentExt) + + lazy val entityAgentExt = Project("platformEntityAgentExt", projectsDir / "entityagent-ext") + + // fat jar version of entityPlugin, to be consumed as a compiler plugin + lazy val entityPluginJar = Project("platformEntityPluginJar", projectsDir / "entityplugin-jar") + .settings( + exportJars := true, + Compile / packageBin := (entityPlugin / assembly).value, + ) + + lazy val entityPlugin = Project("platformEntityPlugin", projectsDir / "entityplugin") + .settings( + loomSettings, + scalacOptions ++= Seq("-language:postfixOps"), + libraryDependencies ++= Seq(scalaCompiler, typesafeConfig), + assembly / assemblyOption ~= { _.withIncludeScala(false) }, + assemblyMergeStrategy := { + case "scalac-plugin.xml" => MergeStrategy.preferProject + case other => assemblyMergeStrategy.value(other) + } + ) + .dependsOn( + scalaCompat, + stagingPlugin, + stagingPluginJar % "plugin" + ) + + lazy val breadcrumbs = Project("platformBreadcrumbs", projectsDir / "breadcrumbs") + .settings( + scalacOptions ++= ScalacOptions.common, + libraryDependencies ++= Seq( + archaiusCore, + base64, + httpClient, + jacksonDatabind, + jacksonModuleScala, + kafkaClients, + scalaCollectionCompat, + snakeYaml, + Dependencies.sprayJson, + ) + ) + .dependsOn(missing, utils) + + lazy val missing = Project("platformMissing", projectsDir / "missing") + .settings(libraryDependencies ++= Seq(curatorFramework, slf4j)) + + lazy val utils = Project("platformUtils", projectsDir / "utils") + .settings( + scalacOptions ++= ScalacOptions.common ++ ScalacOptions.macros, + libraryDependencies ++= Seq( + args4j, + caffeine, + commonsIO, + curatorRecipes, + curatorFramework, + guava, + hkdf, + javaxActivation, + javaxMail, + jettison, + logbackClassic, + openCSV, + slf4j, + zooKeeper, + zstdJni + ) + ) + .dependsOn(coreMacro, scalaCompat , stagingPlugin) + + lazy val scalaCompat = Project("platformScalaCompat", projectsDir / "scala_compat") + .settings( + libraryDependencies ++= Seq( + scalaCollectionCompat, + scalaCompiler, + scalaParallelCollections, + scalaXml + ) + ) + + // fat jar version of entityPlugin, to be consumed as a compiler plugin + lazy val stagingPluginJar = Project("platformStagingPluginJar", projectsDir / "stagingplugin-jar") + .settings( + exportJars := true, + Compile / packageBin := (stagingPlugin / assembly).value, + ) + + lazy val stagingPlugin = Project("platformStagingPlugin", projectsDir / "stagingplugin") + .settings( + libraryDependencies ++= Seq(scalaCompiler), + assembly / assemblyOption ~= { _.withIncludeScala(false) } + ) + .dependsOn(alarms, sprayJson) + + lazy val coreMacro = Project("platformCoreMacro", projectsDir / "core_macro") + .settings( + scalacOptions ++= Seq("-language:experimental.macros"), + libraryDependencies ++= Seq(logbackClassic, logbackCore, scalaReflect, slf4j) + ) + .dependsOn(alarms) + + lazy val alarms = Project("platformAlarms", projectsDir / "alarms") + .settings( + exportJars := true, + libraryDependencies ++= Seq(scalaCompiler) + ) + + lazy val annotations = Project("platformAnnotations", projectsDir / "annotations") + + lazy val sprayJson = Project("platformSprayJson", projectsDir / "spray_json") + .settings( + exportJars := true, + libraryDependencies += scalaReflect + ) +} diff --git a/project/ScalacOptions.scala b/project/ScalacOptions.scala new file mode 100644 index 00000000..b4094761 --- /dev/null +++ b/project/ScalacOptions.scala @@ -0,0 +1,10 @@ +package optimus + +object ScalacOptions { + val common = Seq( + "-language:postfixOps", + "-Yimports:java.lang,scala,scala.Predef,optimus.scala212.DefaultSeq" + ) + val macros = Seq("-language:experimental.macros") + val dynamics = Seq("-language:dynamics") +} diff --git a/project/Silverking.scala b/project/Silverking.scala new file mode 100644 index 00000000..d6f8d306 --- /dev/null +++ b/project/Silverking.scala @@ -0,0 +1,30 @@ +package optimus + +import optimus.Dependencies._ +import sbt._ +import sbt.Keys._ +import sbtprotobuf.ProtobufPlugin +import sbtprotobuf.ProtobufPlugin.autoImport._ + +object Silverking { + private val projectsDir = file("optimus/silverking/projects") + + lazy val silverking = Project("silverking", projectsDir / "silverking") + .enablePlugins(ProtobufPlugin) + .settings( + ProtobufConfig / sourceDirectory := (Compile / resourceDirectory).value, + libraryDependencies ++= Seq( + awsSdk, + caliper, + commonsCompress, + fastUtil, + hibernateValidator, + jacksonDataformatYaml, + jgrapht + ) + ) + .dependsOn(Platform.breadcrumbs, utils) + + lazy val utils = Project("silverkingUtils", projectsDir / "silverking_utils") + .settings(libraryDependencies ++= Seq(guava, slf4j)) +} diff --git a/project/Stratoshpere.scala b/project/Stratoshpere.scala new file mode 100644 index 00000000..733bddea --- /dev/null +++ b/project/Stratoshpere.scala @@ -0,0 +1,41 @@ +package optimus + +import optimus.Dependencies._ +import sbt._ +import sbt.Keys._ +import sbtprotobuf.ProtobufPlugin +import sbtprotobuf.ProtobufPlugin.autoImport._ + +object Stratosphere { + private val projectsDir = file("optimus/stratosphere") + + lazy val common = Project("stratosphereCommon", projectsDir / "common") + .settings( + scalacOptions ++= ScalacOptions.common, + libraryDependencies ++= Seq( + akkaActor, + akkaHttpCore, + akkaStream, + args4j, + commonsCompress, + hamcrest, + jacksonDatabind, + jansi, + javaxActivation, + jnaPlatform, + junit, + scalaReflect, + scalaCollectionCompat, + sprayJson + ) + ) + .dependsOn( + bootstrap, + Platform.bitBucketUtils, + Platform.stagingPluginJar % "plugin", + Platform.utils + ) + + lazy val bootstrap = Project("stratosphereBootstrap", projectsDir / "bootstrap") + .settings(libraryDependencies ++= Seq(typesafeConfig)) +} \ No newline at end of file diff --git a/project/build.properties b/project/build.properties new file mode 100644 index 00000000..db1723b0 --- /dev/null +++ b/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.10.5 diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 00000000..c4f77ccb --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1,2 @@ +addSbtPlugin("com.github.sbt" % "sbt-protobuf" % "0.8.1") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.0")