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) {
|
if (numFiles >= maxDestinationFiles) {
|
||||||
flowFile = session.penalize(flowFile);
|
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});
|
+ "configured maximum number of files", new Object[]{flowFile, finalCopyFileDir, numFiles});
|
||||||
session.transfer(flowFile, REL_FAILURE);
|
session.transfer(flowFile, REL_FAILURE);
|
||||||
return;
|
return;
|
||||||
|
@ -232,7 +232,7 @@ public class PutFile extends AbstractProcessor {
|
||||||
return;
|
return;
|
||||||
case FAIL_RESOLUTION:
|
case FAIL_RESOLUTION:
|
||||||
flowFile = session.penalize(flowFile);
|
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);
|
session.transfer(flowFile, REL_FAILURE);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -215,7 +215,7 @@ public abstract class PutFileTransfer<T extends FileTransfer> extends AbstractPr
|
||||||
}
|
}
|
||||||
|
|
||||||
if (remoteFileInfo.isDirectory()) {
|
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);
|
return new ConflictResult(REL_REJECT, false, fileName, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ public abstract class PutFileTransfer<T extends FileTransfer> extends AbstractPr
|
||||||
destinationRelationship = REL_REJECT;
|
destinationRelationship = REL_REJECT;
|
||||||
transferFile = false;
|
transferFile = false;
|
||||||
penalizeFile = 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;
|
break;
|
||||||
case FileTransfer.CONFLICT_RESOLUTION_REPLACE:
|
case FileTransfer.CONFLICT_RESOLUTION_REPLACE:
|
||||||
transfer.deleteFile(path, fileName);
|
transfer.deleteFile(path, fileName);
|
||||||
|
@ -256,7 +256,7 @@ public abstract class PutFileTransfer<T extends FileTransfer> extends AbstractPr
|
||||||
destinationRelationship = REL_REJECT;
|
destinationRelationship = REL_REJECT;
|
||||||
transferFile = false;
|
transferFile = false;
|
||||||
penalizeFile = 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;
|
break;
|
||||||
case FileTransfer.CONFLICT_RESOLUTION_IGNORE:
|
case FileTransfer.CONFLICT_RESOLUTION_IGNORE:
|
||||||
|
@ -269,7 +269,7 @@ public abstract class PutFileTransfer<T extends FileTransfer> extends AbstractPr
|
||||||
destinationRelationship = REL_FAILURE;
|
destinationRelationship = REL_FAILURE;
|
||||||
transferFile = false;
|
transferFile = false;
|
||||||
penalizeFile = true;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue