org.apache.solr.update

## Class HdfsUpdateLog

- java.lang.Object
- - org.apache.solr.update.UpdateLog
  - - org.apache.solr.update.HdfsUpdateLog

- All Implemented Interfaces:
    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.LogPtr, UpdateLog.RecentUpdates, UpdateLog.RecoveryInfo, UpdateLog.State, UpdateLog.SyncLevel`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static AtomicLong` | `INIT_FAILED_LOGS_COUNT`

    - ### Fields inherited from class org.apache.solr.update.UpdateLog

      `ADD, cancelApplyBufferUpdate, COMMIT, dataDir, defaultSyncLevel, DELETE, DELETE_BY_QUERY, deleteByQueries, FLAG_GAP, globalStrings, lastDataDir, LOG_FILENAME_PATTERN, logs, map, maxNumLogsToKeep, maxVersionFromIndex, newestLogsOnStartup, numDeletesByQueryToKeep, numDeletesToKeep, numOldRecords, numRecordsToKeep, numVersionBuckets, oldDeletes, OPERATION_MASK, operationFlags, prevMap, prevMap2, prevMapLog, prevMapLog2, prevTlog, recoveryInfo, state, testing_logReplayFinishHook, testing_logReplayHook, tlog, TLOG_NAME, tlogFiles, versionInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HdfsUpdateLog()`
    `HdfsUpdateLog(String confDir)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearLog(SolrCore core, PluginInfo ulogPluginInfo)` Clears the logs on the file system.
    `void` | `close(boolean committed)`
    `void` | `close(boolean committed, boolean deleteOnClose)`
    `boolean` | `dropBufferedUpdates()` Returns true if we were able to drop buffered updates and return to the ACTIVE state
    `protected void` | `ensureLog()`
    `String` | `getLogDir()`
    `static String[]` | `getLogList(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path tlogDir)`
    `String[]` | `getLogList(org.apache.hadoop.fs.Path tlogDir)`
    `void` | `init(PluginInfo info)`
    `void` | `init(UpdateHandler uhandler, SolrCore core)`
    `void` | `preSoftCommit(CommitUpdateCommand cmd)`
    `String` | `toString()` 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, bufferUpdates, cancelApplyBufferedUpdates, delete, deleteAll, deleteByQuery, deleteFile, finish, getCurrentMaxVersion, getDBQNewer, getFs, getLastLogId, getLogList, getMaxNumLogsToKeep, getNumRecordsToKeep, getNumVersionBuckets, getRecentUpdates, getStartingOperation, getStartingVersions, getState, getTlogDir, getTotalLogsNumber, getTotalLogsSize, getVersionInfo, hasUncommittedChanges, lookup, lookupVersion, newMap, newTransactionLog, objToInt, openRealtimeSearcher, postCommit, postSoftCommit, preCommit, recoverFromLog, seedBucketsWithHighestVersion, seedBucketsWithHighestVersion`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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

    - #### dropBufferedUpdates

          public boolean dropBufferedUpdates()

      Description copied from class: `UpdateLog`
      Returns true if we were able to drop buffered updates and return to the ACTIVE state
      Overrides:
        `dropBufferedUpdates` in class `UpdateLog`

    - #### init

          public void init(PluginInfo info)

      Specified by:
        `init` in interface `PluginInfoInitialized`
      Overrides:
        `init` in class `UpdateLog`

    - #### init

          public void init(UpdateHandler uhandler,
                           SolrCore core)

      Overrides:
        `init` in class `UpdateLog`

    - #### getLogDir

          public String getLogDir()

      Overrides:
        `getLogDir` in class `UpdateLog`

    - #### getLogList

          public static String[] getLogList(org.apache.hadoop.fs.FileSystem fs,
                                            org.apache.hadoop.fs.Path tlogDir)

    - #### close

          public void close(boolean committed)

      Overrides:
        `close` in class `UpdateLog`

    - #### close

          public void close(boolean committed,
                            boolean deleteOnClose)

      Overrides:
        `close` in class `UpdateLog`

    - #### ensureLog

          protected void ensureLog()

      Overrides:
        `ensureLog` in class `UpdateLog`

    - #### clearLog

          public void clearLog(SolrCore core,
                               PluginInfo ulogPluginInfo)

      Clears the logs on the file system. Only call before init.
      Overrides:
        `clearLog` in class `UpdateLog`
      Parameters:
        `core` - the SolrCore
        `ulogPluginInfo` - the init info for the UpdateHandler

    - #### preSoftCommit

          public void preSoftCommit(CommitUpdateCommand cmd)

      Overrides:
        `preSoftCommit` in class `UpdateLog`

    - #### getLogList

          public String[] getLogList(org.apache.hadoop.fs.Path tlogDir)
                              throws FileNotFoundException,
                                     IOException

      Throws:
        `FileNotFoundException`
        `IOException`

    - #### toString

          public String toString()

      Returns true if we were able to drop buffered updates and return to the ACTIVE state
      Overrides:
        `toString` in class `UpdateLog`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.