[
https://issues.apache.org/jira/browse/GOBBLIN-697?focusedWorklogId=209887&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-209887
]
ASF GitHub Bot logged work on GOBBLIN-697:
------------------------------------------
Author: ASF GitHub Bot
Created on: 08/Mar/19 00:13
Start Date: 08/Mar/19 00:13
Worklog Time Spent: 10m
Work Description: ibuenros commented on pull request #2568: [GOBBLIN-697]
Implementation of data file versioning and preservation in distcp.
URL: https://github.com/apache/incubator-gobblin/pull/2568#discussion_r263623328
##########
File path:
gobblin-utility/src/main/java/org/apache/gobblin/util/filesystem/ModTimeDataFileVersion.java
##########
@@ -0,0 +1,66 @@
+/*
+ * 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.util.filesystem;
+
+import java.io.IOException;
+import java.util.Set;
+
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+
+import com.google.common.collect.ImmutableSet;
+import com.typesafe.config.Config;
+
+import lombok.Data;
+
+
+/**
+ * An implementation of {@link DataFileVersion} that uses modtime as the file
version.
+ */
+@Data
+public class ModTimeDataFileVersion implements DataFileVersion<Long> {
Review comment:
Modtime is a sensible default for versioning strategy, and lets distcp work
on versions comparison instead of modtime comparison. If no alternate strategy
is specified, distcp just falls back to what it is doing now (because the
default version is just the modtime), but if an alternate is specified, it will
respect it.
----------------------------------------------------------------
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: 209887)
Time Spent: 1h 10m (was: 1h)
> Allow distcp to carry over file version independently of modtime
> ----------------------------------------------------------------
>
> Key: GOBBLIN-697
> URL: https://issues.apache.org/jira/browse/GOBBLIN-697
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Issac Buenrostro
> Assignee: Issac Buenrostro
> Priority: Major
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Examples where this might be useful is data syncing between two locations.
> Relying on modification times to detect data changes may lead to a feedback
> loop of copying: data gets created at location A at time 0, at time 1 data is
> copied to location B, sync mechanism might incorrectly believe that since mod
> time of location B is higher, it should be synced back to location A, etc.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)