acquired = false; } else { shardLock = new InternalShardLock(shardId); shardLocks.put(shardId, shardLock); acquired = true;
acquired = false; } else { shardLock = new InternalShardLock(shardId); shardLocks.put(shardId, shardLock); acquired = true;
acquired = false; } else { shardLock = new InternalShardLock(shardId); shardLocks.put(shardId, shardLock); acquired = true;
public static class NodePath { /* ${data.paths}/nodes/{node.id} */ public final Path path; /* ${data.paths}/nodes/{node.id}/indices */ public final Path indicesPath; /** Cached FileStore from path */ public final FileStore fileStore; public final int majorDeviceNumber; public final int minorDeviceNumber; public NodePath(Path path) throws IOException { this.path = path; this.indicesPath = path.resolve(INDICES_FOLDER); this.fileStore = Environment.getFileStore(path); if (fileStore.supportsFileAttributeView("lucene")) { this.majorDeviceNumber = (int) fileStore.getAttribute("lucene:major_device_number"); this.minorDeviceNumber = (int) fileStore.getAttribute("lucene:minor_device_number"); } else { this.majorDeviceNumber = -1; this.minorDeviceNumber = -1; } } /** * Resolves the given shards directory against this NodePath * ${data.paths}/nodes/{node.id}/indices/{index.uuid}/{shard.id} */ public Path resolve(ShardId shardId) { return resolve(shardId.getIndex()).resolve(Integer.toString(shardId.id()));
acquired = false; } else { shardLock = new InternalShardLock(id); shardLocks.put(id, shardLock); acquired = true;