public class IndexCopier extends Object implements CopyOnReadStatsMBean, Closeable
Modifier and Type | Field and Description |
---|---|
static Set<String> |
REMOTE_ONLY |
TYPE
Constructor and Description |
---|
IndexCopier(Executor executor,
File indexRootDir) |
IndexCopier(Executor executor,
File indexRootDir,
boolean prefetchEnabled) |
public IndexCopier(Executor executor, File indexRootDir) throws IOException
IOException
public IndexCopier(Executor executor, File indexRootDir, boolean prefetchEnabled) throws IOException
IOException
public org.apache.lucene.store.Directory wrapForRead(String indexPath, IndexDefinition definition, org.apache.lucene.store.Directory remote, String dirName) throws IOException
IOException
public org.apache.lucene.store.Directory wrapForWrite(IndexDefinition definition, org.apache.lucene.store.Directory remote, boolean reindexMode, String dirName) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public boolean isClosed()
protected org.apache.lucene.store.Directory createLocalDirForIndexWriter(IndexDefinition definition, String dirName) throws IOException
IOException
protected org.apache.lucene.store.Directory createLocalDirForIndexReader(String indexPath, IndexDefinition definition, String dirName) throws IOException
IOException
public File getIndexDir(IndexDefinition definition, String indexPath, String dirName) throws IOException
IOException
public void clearIndexFilesBeingWritten(String indexPath)
public boolean deleteFile(org.apache.lucene.store.Directory dir, String fileName, boolean copiedFromRemote)
public long startCopy(LocalIndexFile file)
public boolean isCopyInProgress(LocalIndexFile file)
public void doneCopy(LocalIndexFile file, long start)
public void skippedUpload(long skippedFilesSize)
public void scheduledForCopy()
public void copyDone()
public void readFromRemote(boolean reader)
public void readFromLocal(boolean reader)
public void foundInvalidFile()
public TabularData getIndexPathMapping()
getIndexPathMapping
in interface CopyOnReadStatsMBean
public boolean isPrefetchEnabled()
isPrefetchEnabled
in interface CopyOnReadStatsMBean
public int getReaderLocalReadCount()
getReaderLocalReadCount
in interface CopyOnReadStatsMBean
public int getReaderRemoteReadCount()
getReaderRemoteReadCount
in interface CopyOnReadStatsMBean
public int getWriterLocalReadCount()
getWriterLocalReadCount
in interface CopyOnReadStatsMBean
public int getWriterRemoteReadCount()
getWriterRemoteReadCount
in interface CopyOnReadStatsMBean
public int getInvalidFileCount()
public String getDownloadSize()
getDownloadSize
in interface CopyOnReadStatsMBean
public long getDownloadTime()
getDownloadTime
in interface CopyOnReadStatsMBean
public int getDownloadCount()
getDownloadCount
in interface CopyOnReadStatsMBean
public int getUploadCount()
getUploadCount
in interface CopyOnReadStatsMBean
public String getUploadSize()
getUploadSize
in interface CopyOnReadStatsMBean
public long getUploadTime()
getUploadTime
in interface CopyOnReadStatsMBean
public String getLocalIndexSize()
getLocalIndexSize
in interface CopyOnReadStatsMBean
public String[] getGarbageDetails()
getGarbageDetails
in interface CopyOnReadStatsMBean
public String getGarbageSize()
getGarbageSize
in interface CopyOnReadStatsMBean
public int getScheduledForCopyCount()
getScheduledForCopyCount
in interface CopyOnReadStatsMBean
public int getCopyInProgressCount()
getCopyInProgressCount
in interface CopyOnReadStatsMBean
public String getCopyInProgressSize()
getCopyInProgressSize
in interface CopyOnReadStatsMBean
public int getMaxCopyInProgressCount()
getMaxCopyInProgressCount
in interface CopyOnReadStatsMBean
public int getMaxScheduledForCopyCount()
getMaxScheduledForCopyCount
in interface CopyOnReadStatsMBean
public String getSkippedFromUploadSize()
getSkippedFromUploadSize
in interface CopyOnReadStatsMBean
public String[] getCopyInProgressDetails()
getCopyInProgressDetails
in interface CopyOnReadStatsMBean
public int getDeletedFilesCount()
getDeletedFilesCount
in interface CopyOnReadStatsMBean
public String getGarbageCollectedSize()
getGarbageCollectedSize
in interface CopyOnReadStatsMBean
Copyright © 2012–2017 The Apache Software Foundation. All rights reserved.