public class StorageClient extends Object
| Constructor and Description |
|---|
StorageClient(List<HostAddress> addresses)
Get a Nebula Storage client that executes the scan query to get NebulaGraph's data with multi
servers' host.
|
StorageClient(List<HostAddress> addresses,
int timeout)
Get a Nebula Storage client that executes the scan query to get NebulaGraph's data with
multi servers' hosts and timeout.
|
StorageClient(List<HostAddress> addresses,
int timeout,
int connectionRetry,
int executionRetry,
boolean enableSSL,
SSLParam sslParam)
Get a Nebula Storage client that executes the scan query to get NebulaGraph's data with
multi servers' hosts, timeout and ssl config.
|
StorageClient(String ip,
int port)
Get a Nebula Storage client that executes the scan query to get NebulaGraph's data with
one server host.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
release storage client
|
boolean |
connect()
Connect to Nebula Storage server.
|
protected GraphStorageConnection |
getConnection()
return client's connection session
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
int part,
String edgeName)
scan edge of specific part with no return cols.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
int part,
String edgeName,
int limit)
scan edge of specific part with no return cols and limit config.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
int part,
String edgeName,
int limit,
long startTime,
long endTime)
scan edge of specific part with no return cols and limit, start time, end time config.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
int part,
String edgeName,
int limit,
long startTime,
long endTime,
boolean allowPartSuccess,
boolean allowReadFromFollower)
scan edge of specific part with no return cols and limit, start time, end time, if allow
partial success, if allow read data from storage follower config.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
int part,
String edgeName,
List<String> returnCols)
scan edge of specific part with return cols.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
int part,
String edgeName,
List<String> returnCols,
int limit)
scan edge of specific part with return cols.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
int part,
String edgeName,
List<String> returnCols,
int limit,
long startTime,
long endTime)
scan edge of specific part with return cols and limit, start time, end time config.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
int part,
String edgeName,
List<String> returnCols,
int limit,
long startTime,
long endTime,
boolean allowPartSuccess,
boolean allowReadFromFollower)
scan edge of specific part with return cols and limit, start time, end time, if allow partial
success, if allow read data from storage follower config.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
String edgeName)
scan edge of all parts with no return cols.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
String edgeName,
int limit)
scan edge of all parts with no return cols and limit config.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
String edgeName,
int limit,
long startTime,
long endTime)
scan edge of all parts with no return cols and limit, start time, end time config.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
String edgeName,
int limit,
long startTime,
long endTime,
boolean allowPartSuccess,
boolean allowReadFromFollower)
scan edge of all parts with no return cols and limit, start time, end time, if allow partial
success, if allow read data from storage follower config.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
String edgeName,
List<String> returnCols)
scan edge of all parts with return cols.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
String edgeName,
List<String> returnCols,
int limit)
scan edge of all parts with return cols and limit config.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
String edgeName,
List<String> returnCols,
int limit,
long startTime,
long endTime)
scan edge of all parts with return cols and limit, start time, end time config.
|
ScanEdgeResultIterator |
scanEdge(String spaceName,
String edgeName,
List<String> returnCols,
int limit,
long startTime,
long endTime,
boolean allowPartSuccess,
boolean allowReadFromFollower)
scan edge of all parts with return cols and limit, start time, end time, if allow partial
success, if allow read data from storage follower config.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
int part,
String tagName)
scan vertex of specific part with no return cols.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
int part,
String tagName,
int limit)
scan vertex of specific part with no return cols and limit.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
int part,
String tagName,
int limit,
long startTime,
long endTime)
scan vertex of specific part with no returnCols, limit, startTime and endTime.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
int part,
String tagName,
int limit,
long startTime,
long endTime,
boolean allowPartSuccess,
boolean allowReadFromFollower)
scan vertex of specific part with no return cols, limit, startTime, endTime, whether
allow partial success, whether allow read from storage follower.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
int part,
String tagName,
List<String> returnCols)
scan vertex of specific part with specific return cols, if returnCols is an empty list,
then return all the columns of specific tagName.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
int part,
String tagName,
List<String> returnCols,
int limit)
scan vertex of specific part with specific return cols and limit.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
int part,
String tagName,
List<String> returnCols,
int limit,
long startTime,
long endTime)
scan vertex of specific part with specific returnCols, limit, startTime and endTime.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
int part,
String tagName,
List<String> returnCols,
int limit,
long startTime,
long endTime,
boolean allowPartSuccess,
boolean allowReadFromFollower)
scan vertex of specific part with specific return cols, limit, startTime, endTime, whether
allow partial success, whether allow read from storage follower.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
String tagName)
scan vertex of all parts with no return cols.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
String tagName,
int limit)
scan vertex of all parts with no return cols and limit.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
String tagName,
int limit,
long startTime,
long endTime)
scan vertex of all parts with no returnCols, limit, startTime and endTime.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
String tagName,
int limit,
long startTime,
long endTime,
boolean allowPartSuccess,
boolean allowReadFromFollower)
scan vertex of all parts with no return cols, limit, startTime, endTime, whether
allow partial success, whether allow read from storage follower.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
String tagName,
List<String> returnCols)
scan vertex of all parts with specific return cols, if returnCols is an empty list, then
return all the columns of specific tagName.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
String tagName,
List<String> returnCols,
int limit)
scan vertex of all parts with specific return cols and limit.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
String tagName,
List<String> returnCols,
int limit,
long startTime,
long endTime)
scan vertex of all parts with specific returnCols, limit, startTime and endTime.
|
ScanVertexResultIterator |
scanVertex(String spaceName,
String tagName,
List<String> returnCols,
int limit,
long startTime,
long endTime,
boolean allowPartSuccess,
boolean allowReadFromFollower)
scan vertex of all parts with specific return cols, limit, startTime, endTime, whether
allow partial success, whether allow read from storage follower.
|
public StorageClient(String ip, int port)
ip - the ip of metad serverport - the port of metad serverpublic StorageClient(List<HostAddress> addresses)
addresses - the HostAddress list of metad serverspublic StorageClient(List<HostAddress> addresses, int timeout)
addresses - the HostAddress list of metad serverstimeout - the timeout of scan vertex or edgepublic StorageClient(List<HostAddress> addresses, int timeout, int connectionRetry, int executionRetry, boolean enableSSL, SSLParam sslParam)
public boolean connect()
throws Exception
Exceptionpublic ScanVertexResultIterator scanVertex(String spaceName, String tagName, List<String> returnCols)
the result contains vertex id and return cols.
spaceName - Nebula space nametagName - Nebula tag namereturnCols - Nebula tag properties to returnScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, int part, String tagName, List<String> returnCols)
the result contains vertex id and return cols.
spaceName - Nebula space namepart - Nebula data partitiontagName - Nebula tag namereturnCols - Nebula tag properties to returnScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, String tagName)
the result only contains vertex id.
spaceName - Nebula space nametagName - Nebula tag nameScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, int part, String tagName)
the result only contains vertex id.
spaceName - Nebula space namepart - Nebula data partitiontagName - Nebula tag nameScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, String tagName, List<String> returnCols, int limit)
the result contains vertex id and return cols.
spaceName - Nebula space nametagName - Nebula tag namereturnCols - Nebula tag properties to returnlimit - the data amount of scan in every iteratorScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, int part, String tagName, List<String> returnCols, int limit)
the result contains vertex id and return cols.
spaceName - Nebula space namepart - Nebula data partitiontagName - Nebula tag namereturnCols - Nebula tag properties to returnlimit - the data amount of scan in every iteratorScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, String tagName, int limit)
the result only contains vertex id.
spaceName - Nebula space nametagName - Nebula tag namelimit - the data amount of scan in every iteratorScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, int part, String tagName, int limit)
the result only contains vertex id.
spaceName - Nebula space namepart - Nebula data partitiontagName - Nebula tag namelimit - the data amount of scan in every iteratorScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, String tagName, List<String> returnCols, int limit, long startTime, long endTime)
the result contains vertex id and return cols.
spaceName - Nebula space nametagName - Nebula tag namereturnCols - nebula tag properties to returnlimit - the data amount of scan operation for each partition in every iteratorstartTime - the time range's start time of the data to be scanned, if data was insert
before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data was insert
after end time, then it will not be return.ScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, int part, String tagName, List<String> returnCols, int limit, long startTime, long endTime)
the result contains vertex id and return cols.
spaceName - Nebula space namepart - Nebula data partitiontagName - Nebula tag namereturnCols - Nebula tag properties to returnlimit - the data amount of scan operation for each partition in every iteratorstartTime - the time range's start time of the data to be scanned, if data was insert
before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data was insert
after end time, then it will not be return.ScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, String tagName, int limit, long startTime, long endTime)
the result contains vertex id and return cols.
spaceName - Nebula space nametagName - Nebula tag namelimit - the data amount of scan operation for each partition in every iteratorstartTime - the time range's start time of the data to be scanned, if data was insert
before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data was insert
after end time, then it will not be return.ScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, int part, String tagName, int limit, long startTime, long endTime)
the result contains vertex id and return cols.
spaceName - Nebula space nametagName - Nebula tag namelimit - the data amount of scan operation for each partition in every iteratorstartTime - the time range's start time of the data to be scanned, if data was insert
before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data was insert
after end time, then it will not be return.ScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, String tagName, List<String> returnCols, int limit, long startTime, long endTime, boolean allowPartSuccess, boolean allowReadFromFollower)
the result contains vertex id and return cols.
spaceName - Nebula graph spacetagName - Nebula tag namereturnCols - Nebula tag properties to returnlimit - the data amount of scan operation for each partition in every
iteratorstartTime - the time range's start time of the data to be scanned, if
data was insert
before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data
was insert
after end time, then it will not be return.allowPartSuccess - if allow part successallowReadFromFollower - if allow read from followerScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, int part, String tagName, List<String> returnCols, int limit, long startTime, long endTime, boolean allowPartSuccess, boolean allowReadFromFollower)
the result contains vertex id and return cols.
spaceName - Nebula graph spacepart - Nebula data partitiontagName - Nebula tag namereturnCols - Nebula tag properties to returnlimit - the data amount of scan operation for each partition in every
iteratorstartTime - the time range's start time of the data to be scanned, if
data was insert
before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data
was insert
after end time, then it will not be return.allowPartSuccess - if allow part successallowReadFromFollower - if allow read from followerScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, String tagName, int limit, long startTime, long endTime, boolean allowPartSuccess, boolean allowReadFromFollower)
the result only contains vertex id.
spaceName - Nebula graph spacetagName - Nebula tag namelimit - the data amount of scan operation for each partition in every
iteratorstartTime - the time range's start time of the data to be scanned, if
data was insert
before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data
was insert
after end time, then it will not be return.allowPartSuccess - if allow part successallowReadFromFollower - if allow read from followerScanVertexResultIterator.next()public ScanVertexResultIterator scanVertex(String spaceName, int part, String tagName, int limit, long startTime, long endTime, boolean allowPartSuccess, boolean allowReadFromFollower)
the result only contains vertex id.
spaceName - Nebula graph spacepart - Nebula data partitiontagName - Nebula tag namelimit - the data amount of scan operation for each partition in every
iteratorstartTime - the time range's start time of the data to be scanned, if
data was insert
before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data
was insert after end time, then it will not be return.allowPartSuccess - if allow part successallowReadFromFollower - if allow read from followerScanVertexResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, String edgeName, List<String> returnCols)
the result contains edge src id, dst id, rank and return cols.
spaceName - Nebula space nameedgeName - Nebula edge type namereturnCols - Nebula edge properties to returnScanVertexResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, int part, String edgeName, List<String> returnCols)
the result contains edge src id, dst id, rank and return cols.
spaceName - Nebula space namepart - Nebula data partitionedgeName - Nebula edge type namereturnCols - Nebula edge properties to returnScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, String edgeName)
the result only contains edge src id, dst id, rank.
spaceName - Nebula space nameedgeName - Nebula edge type nameScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, int part, String edgeName)
the result only contains edge src id, dst id, rank.
spaceName - Nebula space namepart - Nebula data partitionedgeName - Nebula edge type nameScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, String edgeName, List<String> returnCols, int limit)
the result contains edge src id, dst id, rank and return cols.
spaceName - Nebula space nameedgeName - Nebula edge type namereturnCols - Nebula edge properties to returnlimit - the data amount of scan operation for each partition in every
iteratorScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, int part, String edgeName, List<String> returnCols, int limit)
the result contains edge src id, dst id, rank and return cols.
spaceName - Nebula space nameedgeName - Nebula edge type namereturnCols - Nebula edge properties to returnlimit - the data amount of scan operation for each partition in every
iteratorScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, String edgeName, int limit)
the result only contains edge src id, dst id, rank.
spaceName - Nebula space nameedgeName - Nebula edge type namelimit - the data amount of scan operation for each partition in every
iteratorScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, int part, String edgeName, int limit)
the result only contains edge src id, dst id, rank.
spaceName - Nebula space namepart - Nebula data partitionedgeName - Nebula edge type namelimit - the data amount of scan operation for each partition in every
iteratorScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, String edgeName, List<String> returnCols, int limit, long startTime, long endTime)
the result only contains edge src id, dst id, rank and return cols.
spaceName - Nebula space nameedgeName - Nebula edge type namereturnCols - Nebula edge properties to returnlimit - the data amount of scan operation for each partition in every
iteratorScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, int part, String edgeName, List<String> returnCols, int limit, long startTime, long endTime)
the result contains edge src id, dst id, rank and return cols.
spaceName - Nebula space namepart - Nebula data partitionedgeName - Nebula edge type namereturnCols - Nebula edge properties to returnlimit - the data amount of scan operation for each partition in every
iteratorstartTime - the time range's start time of the data to be scanned, if
data was insert before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data
was insert after end time, then it will not be return.ScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, String edgeName, int limit, long startTime, long endTime)
the result only contains edge src id, dst id, rank.
spaceName - Nebula space nameedgeName - Nebula edge type namelimit - the data amount of scan operation for each partition in every
iteratorstartTime - the time range's start time of the data to be scanned, if
data was insert before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data
was insert after end time, then it will not be return.ScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, int part, String edgeName, int limit, long startTime, long endTime)
the result only contains edge src id, dst id, rank.
spaceName - Nebula space namepart - Nebula data partitionedgeName - Nebula edge type namelimit - the data amount of scan operation for each partition in every
iteratorstartTime - the time range's start time of the data to be scanned, if
data was insert before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data
was insert after end time, then it will not be return.ScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, String edgeName, List<String> returnCols, int limit, long startTime, long endTime, boolean allowPartSuccess, boolean allowReadFromFollower)
the result contains edge src id, dst id, rank and return cols.
spaceName - Nebula space nameedgeName - Nebula edge type namelimit - the data amount of scan operation for each partition in every
iteratorstartTime - the time range's start time of the data to be scanned, if
data was insert before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data
was insert after end time, then it will not be return.allowPartSuccess - if allow part successallowReadFromFollower - if allow read from followerScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, int part, String edgeName, List<String> returnCols, int limit, long startTime, long endTime, boolean allowPartSuccess, boolean allowReadFromFollower)
the result contains edge src id, dst id, rank and return cols.
spaceName - Nebula space namepart - Nebula data partitionedgeName - Nebula edge type namelimit - the data amount of scan operation for each partition in every
iteratorstartTime - the time range's start time of the data to be scanned, if
data was insert before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data
was insert after end time, then it will not be return.allowPartSuccess - if allow part successallowReadFromFollower - if allow read from followerScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, String edgeName, int limit, long startTime, long endTime, boolean allowPartSuccess, boolean allowReadFromFollower)
the result only contains edge src id, dst id, rank.
spaceName - Nebula space nameedgeName - Nebula edge type namelimit - the data amount of scan operation for each partition in every
iteratorstartTime - the time range's start time of the data to be scanned, if
data was insert before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data
was insert after end time, then it will not be return.allowPartSuccess - if allow part successallowReadFromFollower - if allow read from followerScanEdgeResultIterator.next()public ScanEdgeResultIterator scanEdge(String spaceName, int part, String edgeName, int limit, long startTime, long endTime, boolean allowPartSuccess, boolean allowReadFromFollower)
the result only contains edge src id, dst id, rank.
spaceName - Nebula space nameedgeName - Nebula edge type namepart - Nebula data partitionlimit - the data amount of scan operation for each partition in every
iteratorstartTime - the time range's start time of the data to be scanned, if
data was insert before start time, then it will not be return.endTime - the time range's end time of the data to be scanned, if data
was insert after end time, then it will not be return.allowPartSuccess - if allow part successallowReadFromFollower - if allow read from followerScanEdgeResultIterator.next()public void close()
protected GraphStorageConnection getConnection()
Copyright © 2022. All rights reserved.