Java Code Examples for org.apache.storm.hdfs.common.rotation.RotationAction#execute()
The following examples show how to use
org.apache.storm.hdfs.common.rotation.RotationAction#execute() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SourceHandler.java From metron with Apache License 2.0 | 6 votes |
protected void rotateOutputFile() throws IOException { LOG.debug("Rotating output file..."); long start = System.currentTimeMillis(); synchronized (this.writeLock) { closeOutputFile(); // Want to use the callback to make sure we have an accurate count of open files. cleanupCallback(); LOG.debug("Performing {} file rotation actions.", this.rotationActions.size()); for (RotationAction action : this.rotationActions) { action.execute(this.fs, this.currentFile); } } long time = System.currentTimeMillis() - start; LOG.info("File rotation took {} ms", time); }
Example 2
Source File: HdfsState.java From storm-hdfs with Apache License 2.0 | 6 votes |
protected void rotateOutputFile() throws IOException { LOG.info("Rotating output file..."); long start = System.currentTimeMillis(); synchronized (this.writeLock) { closeOutputFile(); this.rotation++; Path newFile = createOutputFile(); LOG.info("Performing {} file rotation actions.", this.rotationActions.size()); for (RotationAction action : this.rotationActions) { action.execute(this.fs, this.currentFile); } this.currentFile = newFile; } long time = System.currentTimeMillis() - start; LOG.info("File rotation took {} ms.", time); }
Example 3
Source File: AbstractHdfsBolt.java From storm-hdfs with Apache License 2.0 | 6 votes |
protected void rotateOutputFile() throws IOException { LOG.info("Rotating output file..."); long start = System.currentTimeMillis(); synchronized (this.writeLock) { closeOutputFile(); this.rotation++; Path newFile = createOutputFile(); LOG.info("Performing {} file rotation actions.", this.rotationActions.size()); for (RotationAction action : this.rotationActions) { action.execute(this.fs, this.currentFile); } this.currentFile = newFile; } long time = System.currentTimeMillis() - start; LOG.info("File rotation took {} ms.", time); }