Package | Description |
---|---|
org.apache.storm.hdfs.spout |
Modifier and Type | Method and Description |
---|---|
static FileLock.LogEntry |
FileLock.LogEntry.deserialize(String line) |
static FileLock.LogEntry |
FileLock.getLastEntry(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path lockFile)
returns the last log entry
|
static FileLock.LogEntry |
FileLock.getLastEntryIfStale(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path lockFile,
long olderThan)
checks if lockFile is older than ‘olderThan’ UTC time by examining the modification time on file and (if necessary) the timestamp in last log entry in the file.
|
FileLock.LogEntry |
FileLock.getLastLogEntry() |
Modifier and Type | Method and Description |
---|---|
static HdfsUtils.Pair<org.apache.hadoop.fs.Path,FileLock.LogEntry> |
FileLock.locateOldestExpiredLock(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path lockFilesDir,
int locktimeoutSec)
Finds oldest expired lock file (using modification timestamp), then takes ownership of the lock file Impt: Assumes access to lockFilesDir has been externally synchronized such that only one thread accessing the same thread
|
Modifier and Type | Method and Description |
---|---|
static FileLock |
FileLock.takeOwnership(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path lockFile,
FileLock.LogEntry lastEntry,
String spoutId)
Takes ownership of the lock file if possible.
|
Copyright © 2022 The Apache Software Foundation. All Rights Reserved.