mirror of https://github.com/apache/nifi.git
NIFI-246: fixed provenance transit uris to include hdfs:// prefix
This commit is contained in:
parent
78c069fb5b
commit
f36eea3701
|
@ -363,7 +363,8 @@ public class GetHDFS extends AbstractHadoopProcessor {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
session.getProvenanceReporter().receive(flowFile, file.toString());
|
final String transitUri = (filename.startsWith("/")) ? "hdfs:/" + filename : "hdfs://" + filename;
|
||||||
|
session.getProvenanceReporter().receive(flowFile, transitUri);
|
||||||
session.transfer(flowFile, REL_SUCCESS);
|
session.transfer(flowFile, REL_SUCCESS);
|
||||||
getLogger().info("retrieved {} from HDFS {} in {} milliseconds at a rate of {}",
|
getLogger().info("retrieved {} from HDFS {} in {} milliseconds at a rate of {}",
|
||||||
new Object[]{flowFile, file, millis, dataRate});
|
new Object[]{flowFile, file, millis, dataRate});
|
||||||
|
|
|
@ -47,7 +47,6 @@ import org.apache.nifi.processor.io.InputStreamCallback;
|
||||||
import org.apache.nifi.processor.util.StandardValidators;
|
import org.apache.nifi.processor.util.StandardValidators;
|
||||||
import org.apache.nifi.util.StopWatch;
|
import org.apache.nifi.util.StopWatch;
|
||||||
import org.apache.nifi.util.Tuple;
|
import org.apache.nifi.util.Tuple;
|
||||||
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.FSDataOutputStream;
|
import org.apache.hadoop.fs.FSDataOutputStream;
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
import org.apache.hadoop.fs.FileSystem;
|
||||||
|
@ -322,7 +321,9 @@ public class PutHDFS extends AbstractHadoopProcessor {
|
||||||
getLogger().info("copied {} to HDFS at {} in {} milliseconds at a rate of {}",
|
getLogger().info("copied {} to HDFS at {} in {} milliseconds at a rate of {}",
|
||||||
new Object[]{flowFile, copyFile, millis, dataRate});
|
new Object[]{flowFile, copyFile, millis, dataRate});
|
||||||
|
|
||||||
session.getProvenanceReporter().send(flowFile, copyFile.toString());
|
final String filename = copyFile.toString();
|
||||||
|
final String transitUri = (filename.startsWith("/")) ? "hdfs:/" + filename : "hdfs://" + filename;
|
||||||
|
session.getProvenanceReporter().send(flowFile, transitUri);
|
||||||
session.transfer(flowFile, REL_SUCCESS);
|
session.transfer(flowFile, REL_SUCCESS);
|
||||||
|
|
||||||
} catch (final Throwable t) {
|
} catch (final Throwable t) {
|
||||||
|
|
Loading…
Reference in New Issue