phet commented on code in PR #3778:
URL: https://github.com/apache/gobblin/pull/3778#discussion_r1329684283


##########
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/temporal/GobblinTemporalJobLauncher.java:
##########
@@ -0,0 +1,154 @@
+/*
+ * 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.cluster.temporal;
+
+import io.temporal.client.WorkflowClient;
+import io.temporal.client.WorkflowOptions;
+import io.temporal.serviceclient.WorkflowServiceStubs;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.gobblin.annotation.Alpha;
+import org.apache.gobblin.cluster.GobblinClusterUtils;
+import org.apache.gobblin.cluster.GobblinJobLauncher;
+import org.apache.gobblin.metastore.StateStore;
+import org.apache.gobblin.metrics.Tag;
+import org.apache.gobblin.runtime.JobLauncher;
+import org.apache.gobblin.runtime.JobState;
+import org.apache.gobblin.source.extractor.extract.kafka.KafkaSource;
+import org.apache.gobblin.source.workunit.MultiWorkUnit;
+import org.apache.gobblin.source.workunit.WorkUnit;
+import org.apache.gobblin.util.JobLauncherUtils;
+import org.apache.gobblin.util.ParallelRunner;
+import org.apache.gobblin.util.PropertiesUtils;
+import org.apache.gobblin.util.SerializationUtils;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import java.util.Properties;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static 
org.apache.gobblin.cluster.temporal.TemporalWorkflowClientFactory.createClientInstance;
+import static 
org.apache.gobblin.cluster.temporal.TemporalWorkflowClientFactory.createServiceInstance;
+
+/**
+ * An implementation of {@link JobLauncher} that launches a Gobblin job using 
the Temporal task framework.
+ *
+ * <p>
+ *   Each {@link WorkUnit} of the job is persisted to the {@link FileSystem} 
of choice and the path to the file
+ *   storing the serialized {@link WorkUnit} is passed to the Temporal task 
running the {@link WorkUnit} as a
+ *   user-defined property {@link 
GobblinClusterConfigurationKeys#WORK_UNIT_FILE_PATH}. Upon startup, the gobblin
+ *   task reads the property for the file path and de-serializes the {@link 
WorkUnit} from the file.
+ * </p>
+ *
+ * <p>
+ *   This class is instantiated by the {@link GobblinTemporalJobScheduler} on 
every job submission to launch the Gobblin job.
+ *   The actual task execution happens in the {@link 
GobblinTemporalTaskRunner}, usually in a different process.
+ * </p>
+ */
+@Alpha
+@Slf4j
+public class GobblinTemporalJobLauncher extends GobblinJobLauncher {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(GobblinTemporalJobLauncher.class);

Review Comment:
   again, isn't this redundant, given `@Slf4j`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to