[
https://issues.apache.org/jira/browse/GOBBLIN-1967?focusedWorklogId=893038&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-893038
]
ASF GitHub Bot logged work on GOBBLIN-1967:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 30/Nov/23 02:53
Start Date: 30/Nov/23 02:53
Worklog Time Spent: 10m
Work Description: phet commented on code in PR #3838:
URL: https://github.com/apache/gobblin/pull/3838#discussion_r1410094588
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/dataset/ExternalUriDatasetDescriptor.java:
##########
@@ -24,23 +24,29 @@
import lombok.Getter;
import
org.apache.gobblin.service.modules.flowgraph.DatasetDescriptorConfigKeys;
import
org.apache.gobblin.service.modules.flowgraph.DatasetDescriptorErrorUtils;
-import org.apache.gobblin.util.ConfigUtils;
/**
- * Describes a external dataset not on HDFS
- * e.g, https://some-api:443/user/123/names where the path is the full URI
+ * Describes a external dataset not on HDFS, for usage with
Data-Integration-Library in a generic way - see:
https://github.com/linkedin/data-integration-library/tree/master
+ * Datasets under ExternalUriDatasetDescriptor can also be represented by more
specific dataset descriptors, e.g. HttpDatasetDescriptor, SqlDatasetDescriptor,
etc.
+ * e.g, https://some-api:443/user/123/names for a http URI
+ * e.g, jdbc:mysql://some-db:3306/db for a sql URI
*/
-public class ExternalDatasetDescriptor extends BaseDatasetDescriptor
implements DatasetDescriptor {
+public class ExternalUriDatasetDescriptor extends BaseDatasetDescriptor
implements DatasetDescriptor {
@Getter
- private final String path;
+ private final String uri;
- public ExternalDatasetDescriptor(Config config) throws IOException {
+ public ExternalUriDatasetDescriptor(Config config) throws IOException {
super(config);
-
Preconditions.checkArgument(config.hasPath(DatasetDescriptorConfigKeys.PATH_KEY),
"Dataset descriptor config must specify path");
- // refers to the full HTTP url
- this.path = ConfigUtils.getString(config,
DatasetDescriptorConfigKeys.PATH_KEY, "");
+
Preconditions.checkArgument(config.hasPath(DatasetDescriptorConfigKeys.URI_KEY),
"Dataset descriptor config must specify a uri");
Review Comment:
nit: capitalize "URI"
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/flowgraph/datanodes/ExternalDataNode.java:
##########
@@ -0,0 +1,44 @@
+/*
+ * 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.service.modules.flowgraph.datanodes;
+
+import com.typesafe.config.Config;
+import org.apache.gobblin.service.modules.dataset.ExternalUriDatasetDescriptor;
+import org.apache.gobblin.service.modules.flowgraph.BaseDataNode;
+
+
+/**
+ * A DataNode for generic ingress/egress data movement outside of HDFS (HTTP
or otherwise)
+ */
+public class ExternalDataNode extends BaseDataNode {
Review Comment:
should this (and the test) be renamed to `ExternalUriDataNode`
Issue Time Tracking
-------------------
Worklog Id: (was: 893038)
Time Spent: 1h 50m (was: 1h 40m)
> Add data node for generic external ingress egress
> -------------------------------------------------
>
> Key: GOBBLIN-1967
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1967
> Project: Apache Gobblin
> Issue Type: Improvement
> Components: gobblin-service
> Reporter: William Lo
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> GaaS has datanodes for HTTP, SFTP, and HDFS/Table varients. However, in some
> scenarios we want a generic identifier for an external ingress/egress flow
> running in GaaS. Reason being is that there are some usecases that can be
> very generic and we want to avoid adapting these flows to the opinionated
> setup of GaaS, while maintaining compatibility.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)