[ 
https://issues.apache.org/jira/browse/GOBBLIN-2170?focusedWorklogId=942238&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-942238
 ]

ASF GitHub Bot logged work on GOBBLIN-2170:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Nov/24 20:22
            Start Date: 06/Nov/24 20:22
    Worklog Time Spent: 10m 
      Work Description: phet commented on code in PR #4068:
URL: https://github.com/apache/gobblin/pull/4068#discussion_r1831663279


##########
gobblin-temporal/src/test/java/org/apache/gobblin/temporal/dynamic/ProfileDerivationTest.java:
##########
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.gobblin.temporal.dynamic;
+
+import java.util.Optional;
+import java.util.function.Function;
+
+import com.google.common.collect.Lists;
+import com.typesafe.config.Config;
+import com.typesafe.config.ConfigFactory;
+
+import org.testng.annotations.Test;
+import org.testng.Assert;
+
+
+public class ProfileDerivationTest {
+
+  @Test
+  public void testFormulateConfigSuccess() throws 
ProfileDerivation.UnknownBasisException {
+    String basisProfileName = "testProfile";
+    ProfileOverlay overlay = new ProfileOverlay.Adding(Lists.newArrayList(new 
ProfileOverlay.KVPair("key1", "value1B")));
+    ProfileDerivation profileDerivation = new 
ProfileDerivation(basisProfileName, overlay);
+
+    Function<String, Optional<WorkerProfile>> basisResolver = name -> {
+      if (basisProfileName.equals(name)) {
+        Config config = ConfigFactory.parseString("key1=value1A, key2=value2");
+        WorkerProfile profile = new WorkerProfile(basisProfileName, config);
+        return Optional.of(profile);
+      }
+      return Optional.empty();
+    };
+
+    Config resultConfig = profileDerivation.formulateConfig(basisResolver);
+    Assert.assertEquals(resultConfig.getString("key1"), "value1B");
+    Assert.assertEquals(resultConfig.getString("key2"), "value2");
+  }
+
+  public void testFormulateConfigUnknownBasis() {
+    String basisProfileName = "foo";

Review Comment:
   fixed, thanks





Issue Time Tracking
-------------------

            Worklog Id:     (was: 942238)
    Remaining Estimate: 0h
            Time Spent: 10m

> Implement dynamic scaling for Gobblin-on-Temporal 
> --------------------------------------------------
>
>                 Key: GOBBLIN-2170
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2170
>             Project: Apache Gobblin
>          Issue Type: Bug
>          Components: gobblin-core
>            Reporter: Kip Kohn
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Enable Gobblin-on-Temporal to dynamically scale up/down the number of workers 
> and also to reconfigure worker containers (including resource resizing).  
> Support a heterogeneous workforce of multiple simultaneous worker container 
> configurations.
> Develop abstractions for implementing with the current GoT-atop-YARN 
> deployment that are also general enough for reuse even with containerization 
> other than YARN, such as with k8s.
> Create a simple, human-readable syntax for Dynamic Scaling Directives that is 
> "FS-safe", where each may serve as a filename w/o excessive encoding.  Then 
> allow an HDFS directory to function as a source of Dynamic Scaling 
> Directives, ordered by file modtime.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to