| Constructor and Description |
|---|
MetaManager(List<HostAddress> address)
init the meta info cache
|
MetaManager(List<HostAddress> address,
int timeout,
int connectionRetry,
int executionRetry,
boolean enableSSL,
SSLParam sslParam)
init the meta info cache with more config
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close meta client
|
int |
getConnectionRetry() |
EdgeItem |
getEdge(String spaceName,
String edgeName)
get Edge
|
int |
getEdgeType(String spaceName,
String edgeName)
get edge type
|
int |
getExecutionRetry() |
HostAddr |
getLeader(String spaceName,
int part)
get part leader
|
Map<Integer,List<HostAddr>> |
getPartsAlloc(String spaceName)
get all parts alloc of one space
|
SpaceItem |
getSpace(String spaceName)
get space item
|
int |
getSpaceId(String spaceName)
get space id
|
List<Integer> |
getSpaceParts(String spaceName)
get all parts of one space
|
TagItem |
getTag(String spaceName,
String tagName)
get tag
|
int |
getTagId(String spaceName,
String tagName)
get tag id
|
int |
getTimeout() |
Set<HostAddr> |
listHosts()
get all storage addresses
|
void |
updateLeader(String spaceName,
int part,
HostAddr newLeader)
cache new leader for part
|
public MetaManager(List<HostAddress> address) throws com.facebook.thrift.TException, ClientServerIncompatibleException, UnknownHostException
com.facebook.thrift.TExceptionClientServerIncompatibleExceptionUnknownHostExceptionpublic MetaManager(List<HostAddress> address, int timeout, int connectionRetry, int executionRetry, boolean enableSSL, SSLParam sslParam) throws com.facebook.thrift.TException, ClientServerIncompatibleException, UnknownHostException
com.facebook.thrift.TExceptionClientServerIncompatibleExceptionUnknownHostExceptionpublic void close()
public int getSpaceId(String spaceName) throws IllegalArgumentException
spaceName - nebula space nameIllegalArgumentExceptionpublic SpaceItem getSpace(String spaceName) throws IllegalArgumentException
getSpace in interface MetaCachespaceName - nebula graph space nameIllegalArgumentExceptionpublic int getTagId(String spaceName, String tagName) throws IllegalArgumentException
spaceName - nebula graph space nametagName - nebula tag nameIllegalArgumentExceptionpublic TagItem getTag(String spaceName, String tagName) throws IllegalArgumentException
getTag in interface MetaCachespaceName - nebula space nametagName - nebula tag nameIllegalArgumentExceptionpublic int getEdgeType(String spaceName, String edgeName) throws IllegalArgumentException
spaceName - nebula graph space nameedgeName - nebula edge nameIllegalArgumentExceptionpublic EdgeItem getEdge(String spaceName, String edgeName) throws IllegalArgumentException
getEdge in interface MetaCachespaceName - nebula graph space nameedgeName - nebula edge nameIllegalArgumentExceptionpublic HostAddr getLeader(String spaceName, int part) throws IllegalArgumentException
spaceName - nebula graph space namepart - nebula part idIllegalArgumentExceptionpublic List<Integer> getSpaceParts(String spaceName) throws IllegalArgumentException
spaceName - nebula graph space nameIllegalArgumentExceptionpublic Map<Integer,List<HostAddr>> getPartsAlloc(String spaceName) throws IllegalArgumentException
getPartsAlloc in interface MetaCachespaceName - nebula graph space nameIllegalArgumentExceptionpublic void updateLeader(String spaceName, int part, HostAddr newLeader) throws IllegalArgumentException
spaceName - nebula graph spacepart - nebula partnewLeader - nebula part new leaderIllegalArgumentExceptionpublic int getConnectionRetry()
public int getTimeout()
public int getExecutionRetry()
Copyright © 2022. All rights reserved.