public final class ShardPath extends Object
| 修飾子とタイプ | フィールドと説明 |
|---|---|
static String |
INDEX_FOLDER_NAME |
static String |
TRANSLOG_FOLDER_NAME |
| コンストラクタと説明 |
|---|
ShardPath(boolean isCustomDataPath,
Path dataPath,
Path shardStatePath,
String indexUUID,
ShardId shardId) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
static void |
deleteLeftoverShardDirectory(ESLogger logger,
NodeEnvironment env,
ShardLock lock,
Settings indexSettings)
This method tries to delete left-over shards where the index name has been reused but the UUID is different
to allow the new shard to be allocated.
|
boolean |
equals(Object o) |
boolean |
exists() |
Path |
getDataPath() |
String |
getIndexUUID() |
Path |
getRootDataPath()
Returns the data-path root for this shard.
|
Path |
getRootStatePath()
Returns the state-path root for this shard.
|
ShardId |
getShardId() |
Path |
getShardStatePath() |
int |
hashCode() |
boolean |
isCustomDataPath()
Returns
true iff the data location is a custom data location and therefore outside of the nodes configured data paths. |
static ShardPath |
loadShardPath(ESLogger logger,
NodeEnvironment env,
ShardId shardId,
Settings indexSettings)
This method walks through the nodes shard paths to find the data and state path for the given shard.
|
Path |
resolveIndex() |
Path |
resolveTranslog() |
static ShardPath |
selectNewPathForShard(NodeEnvironment env,
ShardId shardId,
Settings indexSettings,
long avgShardSizeInBytes,
Map<Path,Integer> dataPathToShardCount) |
String |
toString() |
public Path resolveTranslog()
public Path resolveIndex()
public Path getDataPath()
public boolean exists()
public String getIndexUUID()
public ShardId getShardId()
public Path getShardStatePath()
public Path getRootDataPath()
getDataPath() without the index name
and the shard ID.public Path getRootStatePath()
getRootStatePath() ()} without the index name
and the shard ID.public boolean isCustomDataPath()
true iff the data location is a custom data location and therefore outside of the nodes configured data paths.public static ShardPath loadShardPath(ESLogger logger, NodeEnvironment env, ShardId shardId, Settings indexSettings) throws IOException
IOExceptionpublic static void deleteLeftoverShardDirectory(ESLogger logger, NodeEnvironment env, ShardLock lock, Settings indexSettings) throws IOException
IOExceptionpublic static ShardPath selectNewPathForShard(NodeEnvironment env, ShardId shardId, Settings indexSettings, long avgShardSizeInBytes, Map<Path,Integer> dataPathToShardCount) throws IOException
IOExceptionCopyright © 2009–2016. All rights reserved.