You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/05/20 18:14:13 UTC
[jira] [Commented] (NIFI-1568) Allow user to specify file filter
regex when unpacking zip/tar archives
[ https://issues.apache.org/jira/browse/NIFI-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15293894#comment-15293894 ]
ASF GitHub Bot commented on NIFI-1568:
--------------------------------------
Github user trkurc commented on a diff in the pull request:
https://github.com/apache/nifi/pull/248#discussion_r64084293
--- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java ---
@@ -111,8 +107,18 @@
.name("Packaging Format")
.description("The Packaging Format used to create the file")
.required(true)
- .allowableValues(AUTO_DETECT_FORMAT, TAR_FORMAT, ZIP_FORMAT, FLOWFILE_STREAM_FORMAT_V3, FLOWFILE_STREAM_FORMAT_V2, FLOWFILE_TAR_FORMAT)
- .defaultValue(AUTO_DETECT_FORMAT)
+ .allowableValues(PackageFormat.AUTO_DETECT_FORMAT.toString(), PackageFormat.TAR_FORMAT.toString(),
+ PackageFormat.ZIP_FORMAT.toString(), PackageFormat.FLOWFILE_STREAM_FORMAT_V3.toString(),
+ PackageFormat.FLOWFILE_STREAM_FORMAT_V2.toString(), PackageFormat.FLOWFILE_TAR_FORMAT.toString())
+ .defaultValue(PackageFormat.AUTO_DETECT_FORMAT.toString())
+ .build();
+
+ public static final PropertyDescriptor FILE_FILTER = new PropertyDescriptor.Builder()
+ .name("File Filter")
+ .description("Only files whose names match the given regular expression will be extracted (tar/zip only)")
+ .required(true)
+ .defaultValue("[^\\.].*")
--- End diff --
@rickysaltzer - I'm a bit confused by this default value... is the default to filter files starting with "."? Does this change this processor's behavior?
> Allow user to specify file filter regex when unpacking zip/tar archives
> ------------------------------------------------------------------------
>
> Key: NIFI-1568
> URL: https://issues.apache.org/jira/browse/NIFI-1568
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Ricky Saltzer
> Assignee: Ricky Saltzer
> Fix For: 0.7.0
>
>
> There are times where you may want to only extract a portion of an archive, such as a specific folder, or perhaps a specific file. Similar to how the {{GetFile}} processor works, we should provide a property ({{File Filter}}) which by default extracts all files. The user can modify this property to extract only files they wish to process downstream.
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)