Package org.apache.solr.hdfs.update
Class HdfsUpdateLog
- java.lang.Object
-
- org.apache.solr.update.UpdateLog
-
- org.apache.solr.hdfs.update.HdfsUpdateLog
-
- All Implemented Interfaces:
AutoCloseable,SolrMetricProducer,PluginInfoInitialized
public class HdfsUpdateLog extends UpdateLog
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.update.UpdateLog
UpdateLog.DBQ, UpdateLog.DeleteUpdate, UpdateLog.LogPtr, UpdateLog.RecentUpdates, UpdateLog.RecoveryInfo, UpdateLog.State, UpdateLog.SyncLevel, UpdateLog.Update
-
-
Field Summary
Fields Modifier and Type Field Description static AtomicLongINIT_FAILED_LOGS_COUNT-
Fields inherited from class org.apache.solr.update.UpdateLog
ADD, applyingBufferedOpsMeter, BUFFER_TLOG_NAME, bufferedOpsGauge, bufferTlog, cancelApplyBufferUpdate, COMMIT, copyOverOldUpdatesMeter, dataDir, defaultSyncLevel, DELETE, DELETE_BY_QUERY, deleteByQueries, existOldBufferLog, FLAGS_IDX, globalStrings, id, lastDataDir, LOG_FILENAME_PATTERN, logs, map, maxNumLogsToKeep, newestLogsOnStartup, numDeletesByQueryToKeep, numDeletesToKeep, numOldRecords, numRecordsToKeep, numVersionBuckets, oldDeletes, OPERATION_MASK, PREV_POINTER_IDX, PREV_VERSION_IDX, prevMap, prevMap2, prevMapLog, prevMapLog2, prevTlog, prevTlogOnPrecommit, recoveryInfo, replayOpsMeter, solrMetricsContext, startingVersions, state, testing_logReplayFinishHook, testing_logReplayHook, tlog, TLOG_NAME, tlogDir, tlogFiles, uhandler, UPDATE_INPLACE, VERSION_IDX, versionInfo
-
-
Constructor Summary
Constructors Constructor Description HdfsUpdateLog()HdfsUpdateLog(String confDir)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearLog(SolrCore core, PluginInfo ulogPluginInfo)Clears the logs on the file system.voidclose(boolean committed)voidclose(boolean committed, boolean deleteOnClose)protected voiddeleteBufferLogs()protected voidensureBufferTlog()protected voidensureLog()static String[]getBufferLogList(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path tlogDir)StringgetLogDir()static String[]getLogList(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path tlogDir)String[]getLogList(org.apache.hadoop.fs.Path tlogDir)voidinit(PluginInfo info)voidinit(UpdateHandler uhandler, SolrCore core)voidpreSoftCommit(CommitUpdateCommand cmd)StringtoString()Returns true if we were able to drop buffered updates and return to the ACTIVE state-
Methods inherited from class org.apache.solr.update.UpdateLog
add, add, addOldLog, applyBufferedUpdates, applyPartialUpdates, bufferUpdates, commitAndSwitchToNewTlog, convertTlogEntryToAddUpdateCommand, copyOverBufferingUpdates, copyOverOldUpdates, copyOverOldUpdates, delete, deleteAll, deleteByQuery, deleteFile, dropBufferedUpdates, existOldBufferLog, finish, getCurrentLogSizeFromStream, getDBQNewer, getLastLogId, getLogList, getMaxNumLogsToKeep, getNumRecordsToKeep, getNumVersionBuckets, getRecentUpdates, getSolrMetricsContext, getStartingVersions, getState, getTlogDir, getTotalLogsNumber, getTotalLogsSize, getVersionInfo, hasUncommittedChanges, initializeMetrics, lookup, lookupVersion, newMap, newTransactionLog, objToInt, openRealtimeSearcher, postCommit, postSoftCommit, preCommit, recoverFromCurrentLog, recoverFromLog, trackDeleteByQuery
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.solr.metrics.SolrMetricProducer
close
-
-
-
-
Field Detail
-
INIT_FAILED_LOGS_COUNT
public static AtomicLong INIT_FAILED_LOGS_COUNT
-
-
Constructor Detail
-
HdfsUpdateLog
public HdfsUpdateLog()
-
HdfsUpdateLog
public HdfsUpdateLog(String confDir)
-
-
Method Detail
-
init
public void init(PluginInfo info)
- Specified by:
initin interfacePluginInfoInitialized- Overrides:
initin classUpdateLog
-
init
public void init(UpdateHandler uhandler, SolrCore core)
-
getBufferLogList
public static String[] getBufferLogList(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path tlogDir)
-
getLogList
public static String[] getLogList(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path tlogDir)
-
close
public void close(boolean committed, boolean deleteOnClose)
-
ensureBufferTlog
protected void ensureBufferTlog()
- Overrides:
ensureBufferTlogin classUpdateLog
-
deleteBufferLogs
protected void deleteBufferLogs()
- Overrides:
deleteBufferLogsin classUpdateLog
-
clearLog
public void clearLog(SolrCore core, PluginInfo ulogPluginInfo)
Clears the logs on the file system. Only call before init.
-
preSoftCommit
public void preSoftCommit(CommitUpdateCommand cmd)
- Overrides:
preSoftCommitin classUpdateLog
-
getLogList
public String[] getLogList(org.apache.hadoop.fs.Path tlogDir) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
-