Beispiel #1
0
 private static void releaseLockAndLog(FileLock fLock, String spoutId) {
   try {
     if (fLock != null) {
       fLock.release();
       LOG.debug("Spout {} released FileLock. SpoutId = {}", fLock.getLockFile(), spoutId);
     }
   } catch (IOException e) {
     LOG.error("Unable to delete lock file : " + fLock.getLockFile() + " SpoutId =" + spoutId, e);
   }
 }
Beispiel #2
0
 protected void releaseFileLockAndCloseFileChannel() {
   try {
     if (fileLock != null) {
       fileLock.release();
     }
     if (fileChannel != null) {
       fileChannel.close();
     }
   } catch (IOException e) {
     stringLogger.warn("Could not close [" + storageFileName + "]", e);
   }
   fileChannel = null;
 }