[
https://issues.apache.org/jira/browse/GOBBLIN-742?focusedWorklogId=229943&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-229943
]
ASF GitHub Bot logged work on GOBBLIN-742:
------------------------------------------
Author: ASF GitHub Bot
Created on: 18/Apr/19 22:37
Start Date: 18/Apr/19 22:37
Worklog Time Spent: 10m
Work Description: htran1 commented on pull request #2608: GOBBLIN-742:
Implement a FileSystem based JobConfigurationManager.
URL: https://github.com/apache/incubator-gobblin/pull/2608#discussion_r276855685
##########
File path:
gobblin-cluster/src/test/java/org/apache/gobblin/cluster/FsScheduledJobConfigurationManagerTest.java
##########
@@ -0,0 +1,159 @@
+/*
+ * 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;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ExecutionException;
+
+import org.apache.avro.file.DataFileWriter;
+import org.apache.avro.io.DatumWriter;
+import org.apache.avro.specific.SpecificDatumWriter;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import com.google.common.eventbus.EventBus;
+import com.google.common.io.Files;
+import com.typesafe.config.Config;
+import com.typesafe.config.ConfigFactory;
+import com.typesafe.config.ConfigValueFactory;
+
+import lombok.extern.slf4j.Slf4j;
+
+import org.apache.gobblin.configuration.ConfigurationKeys;
+import org.apache.gobblin.runtime.api.FsSpecConsumer;
+import org.apache.gobblin.runtime.api.JobSpec;
+import org.apache.gobblin.runtime.api.JobSpecNotFoundException;
+import org.apache.gobblin.runtime.api.MutableJobCatalog;
+import org.apache.gobblin.runtime.api.SpecExecutor;
+import org.apache.gobblin.runtime.job_catalog.NonObservingFSJobCatalog;
+import org.apache.gobblin.runtime.job_spec.AvroJobSpec;
+
+@Slf4j
+public class FsScheduledJobConfigurationManagerTest {
+ private MutableJobCatalog _jobCatalog;
+ private FsScheduledJobConfigurationManager jobConfigurationManager;
+
+ private String jobConfDir = "/tmp/" + this.getClass().getSimpleName() +
"/jobCatalog";
+ private String fsSpecConsumerPathString = "/tmp/fsJobConfigManagerTest";
+ private String jobSpecUriString = "testJobSpec";
+
+ private FileSystem fs;
+
+ @BeforeClass
+ public void setUp() throws IOException {
+ this.fs = FileSystem.getLocal(new Configuration(false));
+ Path jobConfDirPath = new Path(jobConfDir);
+ if (!this.fs.exists(jobConfDirPath)) {
+ Path parentDir = jobConfDirPath.getParent();
Review comment:
Can remove this this since mkdirs will make all directories up to the last
one.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 229943)
Time Spent: 20m (was: 10m)
> Implement a FileSystem based JobConfigurationManager
> ----------------------------------------------------
>
> Key: GOBBLIN-742
> URL: https://issues.apache.org/jira/browse/GOBBLIN-742
> Project: Apache Gobblin
> Issue Type: Improvement
> Components: gobblin-cluster
> Affects Versions: 0.15.0
> Reporter: Sudarshan Vasudevan
> Assignee: Hung Tran
> Priority: Major
> Fix For: 0.15.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> This task aims to implement a FileSystem based JobConfigurationManager. The
> manager has an underlying SpecConsumer which reads specs from a config
> specified path on HDFS and persists them to a JobCatalog. On successful
> consumption of the spec by the manager , it is deleted from the original
> path. So on the next fetch, only new specs will be picked up by the
> JobConfigurationManager.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)