Package org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot

Examples of org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot.FileInfo


                    fileInfos.put(fileInfo.metadata().name(), fileInfo);
                }
                final Store.MetadataSnapshot sourceMetaData = new Store.MetadataSnapshot(snapshotMetaData);
                final Store.RecoveryDiff diff = sourceMetaData.recoveryDiff(recoveryTargetMetadata);
                for (StoreFileMetaData md : diff.identical) {
                    FileInfo fileInfo = fileInfos.get(md.name());
                    numberOfFiles++;
                    totalSize += md.length();
                    numberOfReusedFiles++;
                    reusedTotalSize += md.length();
                    recoveryState.getIndex().addReusedFileDetail(fileInfo.name(), fileInfo.length());
                    if (logger.isTraceEnabled()) {
                        logger.trace("[{}] [{}] not_recovering [{}] from [{}], exists in local store and is same", shardId, snapshotId, fileInfo.physicalName(), fileInfo.name());
                    }
                }

                for (StoreFileMetaData md : Iterables.concat(diff.different, diff.missing)) {
                    FileInfo fileInfo = fileInfos.get(md.name());
                    numberOfFiles++;
                    totalSize += fileInfo.length();
                    filesToRecover.add(fileInfo);
                    recoveryState.getIndex().addFileDetail(fileInfo.name(), fileInfo.length());
                    if (logger.isTraceEnabled()) {
                        if (md == null) {
                            logger.trace("[{}] [{}] recovering [{}] from [{}], does not exists in local store", shardId, snapshotId, fileInfo.physicalName(), fileInfo.name());
                        } else {
                            logger.trace("[{}] [{}] recovering [{}] from [{}], exists in local store but is different", shardId, snapshotId, fileInfo.physicalName(), fileInfo.name());
                        }
                    }
                }
                final RecoveryState.Index index = recoveryState.getIndex();
                index.totalFileCount(numberOfFiles);
View Full Code Here


     * @param physicalName original name
     * @return file info or null if file is not present in any of snapshots
     */
    public FileInfo findPhysicalIndexFile(String physicalName) {
        for (BlobStoreIndexShardSnapshot snapshot : shardSnapshots) {
            FileInfo fileInfo = snapshot.findPhysicalIndexFile(physicalName);
            if (fileInfo != null) {
                return fileInfo;
            }
        }
        return null;
View Full Code Here

     * @param name file name
     * @return file info or null if file is not present in any of snapshots
     */
    public FileInfo findNameFile(String name) {
        for (BlobStoreIndexShardSnapshot snapshot : shardSnapshots) {
            FileInfo fileInfo = snapshot.findNameFile(name);
            if (fileInfo != null) {
                return fileInfo;
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot.FileInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.