mirror of https://github.com/apache/nifi.git
NIFI-1498: putFile - Flowfiles routed to failure relationship produce INFO level log messages
This closes #445. Signed-off-by: Aldrin Piri <aldrin@apache.org>
This commit is contained in:
parent
d6674fbb8e
commit
afc8c645a1
|
@ -213,7 +213,7 @@ public class PutFile extends AbstractProcessor {
|
|||
|
||||
if (numFiles >= maxDestinationFiles) {
|
||||
flowFile = session.penalize(flowFile);
|
||||
logger.info("Penalizing {} and routing to 'failure' because the output directory {} has {} files, which exceeds the "
|
||||
logger.warn("Penalizing {} and routing to 'failure' because the output directory {} has {} files, which exceeds the "
|
||||
+ "configured maximum number of files", new Object[]{flowFile, finalCopyFileDir, numFiles});
|
||||
session.transfer(flowFile, REL_FAILURE);
|
||||
return;
|
||||
|
@ -232,7 +232,7 @@ public class PutFile extends AbstractProcessor {
|
|||
return;
|
||||
case FAIL_RESOLUTION:
|
||||
flowFile = session.penalize(flowFile);
|
||||
logger.info("Penalizing {} and routing to failure as configured because file with the same name already exists", new Object[]{flowFile});
|
||||
logger.warn("Penalizing {} and routing to failure as configured because file with the same name already exists", new Object[]{flowFile});
|
||||
session.transfer(flowFile, REL_FAILURE);
|
||||
return;
|
||||
default:
|
||||
|
|
|
@ -215,7 +215,7 @@ public abstract class PutFileTransfer<T extends FileTransfer> extends AbstractPr
|
|||
}
|
||||
|
||||
if (remoteFileInfo.isDirectory()) {
|
||||
logger.info("Resolving conflict by rejecting {} due to conflicting filename with a directory or file already on remote server", new Object[]{flowFile});
|
||||
logger.warn("Resolving conflict by rejecting {} due to conflicting filename with a directory or file already on remote server", new Object[]{flowFile});
|
||||
return new ConflictResult(REL_REJECT, false, fileName, false);
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ public abstract class PutFileTransfer<T extends FileTransfer> extends AbstractPr
|
|||
destinationRelationship = REL_REJECT;
|
||||
transferFile = false;
|
||||
penalizeFile = false;
|
||||
logger.info("Resolving conflict by rejecting {} due to conflicting filename with a directory or file already on remote server", new Object[]{flowFile});
|
||||
logger.warn("Resolving conflict by rejecting {} due to conflicting filename with a directory or file already on remote server", new Object[]{flowFile});
|
||||
break;
|
||||
case FileTransfer.CONFLICT_RESOLUTION_REPLACE:
|
||||
transfer.deleteFile(path, fileName);
|
||||
|
@ -256,7 +256,7 @@ public abstract class PutFileTransfer<T extends FileTransfer> extends AbstractPr
|
|||
destinationRelationship = REL_REJECT;
|
||||
transferFile = false;
|
||||
penalizeFile = false;
|
||||
logger.info("Could not determine a unique name after 99 attempts for. Switching resolution mode to REJECT for " + flowFile);
|
||||
logger.warn("Could not determine a unique name after 99 attempts for. Switching resolution mode to REJECT for " + flowFile);
|
||||
}
|
||||
break;
|
||||
case FileTransfer.CONFLICT_RESOLUTION_IGNORE:
|
||||
|
@ -269,7 +269,7 @@ public abstract class PutFileTransfer<T extends FileTransfer> extends AbstractPr
|
|||
destinationRelationship = REL_FAILURE;
|
||||
transferFile = false;
|
||||
penalizeFile = true;
|
||||
logger.info("Resolved filename conflict for {} as configured by routing to FAILURE relationship.", new Object[]{flowFile});
|
||||
logger.warn("Resolved filename conflict for {} as configured by routing to FAILURE relationship.", new Object[]{flowFile});
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue