org.apache.solr.update
Class HdfsTransactionLog
java.lang.Object
org.apache.solr.update.TransactionLog
org.apache.solr.update.HdfsTransactionLog
public class HdfsTransactionLog
- extends TransactionLog
Log Format: List{Operation, Version, ...}
ADD, VERSION, DOC
DELETE, VERSION, ID_BYTES
DELETE_BY_QUERY, VERSION, String
TODO: keep two files, one for [operation, version, id] and the other for the actual
document data. That way we could throw away document log files more readily
while retaining the smaller operation log files longer (and we can retrieve
the stored fields from the latest documents from the index).
This would require keeping all source fields stored of course.
This would also allow to not log document data for requests with commit=true
in them (since we know that if the request succeeds, all docs will be committed)
Field Summary |
static org.slf4j.Logger |
log
|
Methods inherited from class org.apache.solr.update.TransactionLog |
addGlobalStrings, decref, endRecord, forceClose, getLogSize, incref, numRecords, position, snapshot, try_incref, write, writeData, writeDelete, writeDeleteByQuery, writeLogHeader |
log
public static org.slf4j.Logger log
endsWithCommit
public boolean endsWithCommit()
throws IOException
- Overrides:
endsWithCommit
in class TransactionLog
- Throws:
IOException
rollback
public void rollback(long pos)
throws IOException
- Overrides:
rollback
in class TransactionLog
- Throws:
IOException
writeCommit
public long writeCommit(CommitUpdateCommand cmd,
int flags)
- Overrides:
writeCommit
in class TransactionLog
lookup
public Object lookup(long pos)
- Overrides:
lookup
in class TransactionLog
finish
public void finish(UpdateLog.SyncLevel syncLevel)
- Overrides:
finish
in class TransactionLog
close
protected void close()
- Overrides:
close
in class TransactionLog
toString
public String toString()
- Overrides:
toString
in class TransactionLog
getReader
public TransactionLog.LogReader getReader(long startingPos)
- Returns a reader that can be used while a log is still in use.
Currently only *one* LogReader may be outstanding, and that log may only
be used from a single thread.
- Overrides:
getReader
in class TransactionLog
getReverseReader
public TransactionLog.ReverseReader getReverseReader()
throws IOException
- Returns a single threaded reverse reader
- Overrides:
getReverseReader
in class TransactionLog
- Throws:
IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.