turcsanyip commented on code in PR #6279:
URL: https://github.com/apache/nifi/pull/6279#discussion_r958230510
##########
nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/ListSmb.java:
##########
@@ -79,32 +90,31 @@
"previous node left off without duplicating all of the data.")
@InputRequirement(Requirement.INPUT_FORBIDDEN)
@WritesAttributes({
- @WritesAttribute(attribute = "filename", description = "The name of
the file that was read from filesystem."),
- @WritesAttribute(attribute = "shortname", description = "The short
name of the file that was read from filesystem."),
- @WritesAttribute(attribute = "path", description =
+ @WritesAttribute(attribute = FILENAME, description = "The name of the
file that was read from filesystem."),
+ @WritesAttribute(attribute = SHORT_NAME, description = "The short name
of the file that was read from filesystem."),
+ @WritesAttribute(attribute = PATH, description =
"The path is set to the relative path of the file's directory "
+ "on filesystem compared to the Share and Input
Directory properties and the configured host "
+ "and port inherited from the configured connection
pool controller service. For example, for "
+ "a given remote location
smb://HOSTNAME:PORT/SHARE/DIRECTORY, and a file is being listed from "
+ "smb://HOSTNAME:PORT/SHARE/DIRECTORY/sub/folder/file
then the path attribute will be set to \"sub/folder/file\"."),
- @WritesAttribute(attribute = "absolute.path", description =
+ @WritesAttribute(attribute = ABSOLUTE_PATH, description =
"The absolute.path is set to the absolute path of the file's
directory on the remote location. For example, "
+ "given a remote location
smb://HOSTNAME:PORT/SHARE/DIRECTORY, and a file is being listen from "
Review Comment:
Typo: `being listed from`
##########
nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/ListSmb.java:
##########
@@ -79,32 +90,31 @@
"previous node left off without duplicating all of the data.")
@InputRequirement(Requirement.INPUT_FORBIDDEN)
@WritesAttributes({
- @WritesAttribute(attribute = "filename", description = "The name of
the file that was read from filesystem."),
- @WritesAttribute(attribute = "shortname", description = "The short
name of the file that was read from filesystem."),
- @WritesAttribute(attribute = "path", description =
+ @WritesAttribute(attribute = FILENAME, description = "The name of the
file that was read from filesystem."),
+ @WritesAttribute(attribute = SHORT_NAME, description = "The short name
of the file that was read from filesystem."),
+ @WritesAttribute(attribute = PATH, description =
"The path is set to the relative path of the file's directory "
+ "on filesystem compared to the Share and Input
Directory properties and the configured host "
+ "and port inherited from the configured connection
pool controller service. For example, for "
+ "a given remote location
smb://HOSTNAME:PORT/SHARE/DIRECTORY, and a file is being listed from "
+ "smb://HOSTNAME:PORT/SHARE/DIRECTORY/sub/folder/file
then the path attribute will be set to \"sub/folder/file\"."),
- @WritesAttribute(attribute = "absolute.path", description =
+ @WritesAttribute(attribute = ABSOLUTE_PATH, description =
"The absolute.path is set to the absolute path of the file's
directory on the remote location. For example, "
+ "given a remote location
smb://HOSTNAME:PORT/SHARE/DIRECTORY, and a file is being listen from "
+ "SHARE/DIRECTORY/sub/folder/file then the
absolute.path attribute will be set to "
+ "SHARE/DIRECTORY/sub/folder/file."),
Review Comment:
When I run ListSmb, `absolute.path` attribute does not contain the SHARE
part. I think this is the correct behaviour and the documentation needs to be
corrected.
##########
nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/ListSmb.java:
##########
@@ -184,10 +194,10 @@ public class ListSmb extends
AbstractListProcessor<SmbListableEntity> {
.build();
private static final List<PropertyDescriptor> PROPERTIES =
unmodifiableList(asList(
- SMB_LISTING_STRATEGY,
SMB_CLIENT_PROVIDER_SERVICE,
- DIRECTORY,
AbstractListProcessor.RECORD_WRITER,
+ SMB_LISTING_STRATEGY,
+ DIRECTORY,
Review Comment:
It is a good idea to move these properties after
`SMB_CLIENT_PROVIDER_SERVICE` but `RECORD_WRITER` should not precedes them
because it is not so important / not frequently used.
Please move `RECORD_WRITER` after `FILE_NAME_SUFFIX_FILTER`.
##########
nifi-nar-bundles/nifi-smb-bundle/nifi-smb-processors/src/main/java/org/apache/nifi/processors/smb/ListSmb.java:
##########
@@ -79,32 +90,31 @@
"previous node left off without duplicating all of the data.")
@InputRequirement(Requirement.INPUT_FORBIDDEN)
@WritesAttributes({
- @WritesAttribute(attribute = "filename", description = "The name of
the file that was read from filesystem."),
- @WritesAttribute(attribute = "shortname", description = "The short
name of the file that was read from filesystem."),
- @WritesAttribute(attribute = "path", description =
+ @WritesAttribute(attribute = FILENAME, description = "The name of the
file that was read from filesystem."),
+ @WritesAttribute(attribute = SHORT_NAME, description = "The short name
of the file that was read from filesystem."),
+ @WritesAttribute(attribute = PATH, description =
"The path is set to the relative path of the file's directory "
+ "on filesystem compared to the Share and Input
Directory properties and the configured host "
+ "and port inherited from the configured connection
pool controller service. For example, for "
+ "a given remote location
smb://HOSTNAME:PORT/SHARE/DIRECTORY, and a file is being listed from "
+ "smb://HOSTNAME:PORT/SHARE/DIRECTORY/sub/folder/file
then the path attribute will be set to \"sub/folder/file\"."),
Review Comment:
`path` attribute is the same as `absolute.path` but does not contain the
filename.
So the documentation is not correct: it is not the "relative path" (compared
to `absolute.path`) and no filename should be in the example.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]