You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2021/08/10 00:26:04 UTC

[GitHub] [gobblin] aplex commented on a change in pull request #3360: [GOBBLIN-1512] add a path filter to filter out only files starting with a dot

aplex commented on a change in pull request #3360:
URL: https://github.com/apache/gobblin/pull/3360#discussion_r685606436



##########
File path: gobblin-utility/src/main/java/org/apache/gobblin/util/filters/DotFileFilter.java
##########
@@ -0,0 +1,31 @@
+/*
+ * 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.filters;
+
+import org.apache.hadoop.fs.PathFilter;
+
+/**
+ * A {@link PathFilter} similar to {@link HiddenFilter}, but does not filter files starting with '_'.
+ */
+public class DotFileFilter extends HiddenFilter {

Review comment:
       What do you think is better - to have a separate class for dot, or a config setting, where users can override default ignored files in HiddenFilter?
   
   I'm thinking about a couple use cases:
   1. People want to copy everything, including hidden files
   2. There are other types of files to ignore, like "~something"
   
   Also, I found that we have RegexPathFilter, can users just use that to override filter behaviour?




-- 
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: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org