Package dk.netarkivet.heritrix3.monitor
Class Heritrix3JobMonitor
- java.lang.Object
-
- dk.netarkivet.heritrix3.monitor.Heritrix3JobMonitor
-
-
Field Summary
Fields Modifier and Type Field Description boolean
bActive
boolean
bInitialized
boolean
bPull
String
crawlLogFilePath
protected NASEnvironment
environment
String
h3HostnamePort
org.netarchivesuite.heritrix3wrapper.Heritrix3Wrapper
h3wrapper
String
hostUrl
File
idxFile
RandomAccessFile
idxRaf
Job
job
long
jobId
String
jobname
org.netarchivesuite.heritrix3wrapper.JobResult
jobResult
long
lastIndexed
File
logFile
RandomAccessFile
logRaf
protected Map<String,SearchResult>
qSearchResultMap
protected int
searchResultNr
long
totalCachedLines
-
Constructor Summary
Constructors Modifier Constructor Description protected
Heritrix3JobMonitor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanup(List<File> oldFilesList)
long
getIndexSize()
static Heritrix3JobMonitor
getInstance(Long jobId, NASEnvironment environment)
long
getLastIndexed()
SearchResult
getSearchResult(String q)
long
getTotalCachedLines()
void
init()
boolean
isReady()
byte[]
readPage(long page, long itemsPerPage, boolean descending)
void
setCrawlLogFilePath(String crawlLogFilePath)
Set the file path to the crawl logvoid
update()
void
updateCrawlLog(byte[] tmpBuf)
-
-
-
Field Detail
-
environment
protected NASEnvironment environment
-
bActive
public boolean bActive
-
bPull
public boolean bPull
-
bInitialized
public boolean bInitialized
-
jobId
public long jobId
-
job
public Job job
-
h3wrapper
public org.netarchivesuite.heritrix3wrapper.Heritrix3Wrapper h3wrapper
-
h3HostnamePort
public String h3HostnamePort
-
hostUrl
public String hostUrl
-
jobname
public String jobname
-
jobResult
public org.netarchivesuite.heritrix3wrapper.JobResult jobResult
-
crawlLogFilePath
public String crawlLogFilePath
-
logFile
public File logFile
-
logRaf
public RandomAccessFile logRaf
-
idxFile
public File idxFile
-
idxRaf
public RandomAccessFile idxRaf
-
lastIndexed
public long lastIndexed
-
totalCachedLines
public long totalCachedLines
-
qSearchResultMap
protected Map<String,SearchResult> qSearchResultMap
-
searchResultNr
protected int searchResultNr
-
-
Method Detail
-
getInstance
public static Heritrix3JobMonitor getInstance(Long jobId, NASEnvironment environment) throws IOException
- Throws:
IOException
-
init
public void init()
-
update
public void update()
-
updateCrawlLog
public void updateCrawlLog(byte[] tmpBuf)
-
getIndexSize
public long getIndexSize()
- Specified by:
getIndexSize
in interfacePageable
-
getLastIndexed
public long getLastIndexed()
- Specified by:
getLastIndexed
in interfacePageable
-
getTotalCachedLines
public long getTotalCachedLines()
-
readPage
public byte[] readPage(long page, long itemsPerPage, boolean descending) throws IOException
- Specified by:
readPage
in interfacePageable
- Throws:
IOException
-
isReady
public boolean isReady()
-
getSearchResult
public SearchResult getSearchResult(String q) throws IOException
- Throws:
IOException
-
setCrawlLogFilePath
public void setCrawlLogFilePath(String crawlLogFilePath)
Set the file path to the crawl log- Parameters:
crawlLogFilePath
- File path to the crawl log
-
-