|
1 | | -# Java SDK Reference |
2 | | - |
3 | | -The Interactive Java SDK Reference is a comprehensive guide for developers looking to integrate the Interactive service into their Java applications. This SDK allows users to seamlessly connect to Interactive and leverage its powerful features for graph management, stored procedure management, and query execution. |
| 1 | +# Java Client |
| 2 | +This a practical guide for developers looking to integrate the Interactive service into their Java applications. The Java Client allows users to seamlessly connect to Interactive and leverage its powerful features for graph management, stored procedure management, and query execution. |
4 | 3 |
|
5 | 4 |
|
6 | 5 | ## Requirements |
@@ -66,9 +65,7 @@ You can connect to Interactive service with Interactive SDK, with following envi |
66 | 65 | ############################################################################################ |
67 | 66 | ``` |
68 | 67 |
|
69 | | -```{note} |
70 | | -If you have customized the ports when deploying Interactive, remember to replace the default ports with your customized ports. |
71 | | -``` |
| 68 | +> **Note**: If you have customized the ports when deploying Interactive, remember to replace the default ports with your customized ports. |
72 | 69 |
|
73 | 70 | Remember to export these environment variables. |
74 | 71 |
|
@@ -102,7 +99,7 @@ public class GettingStarted { |
102 | 99 | ### Create a new graph |
103 | 100 |
|
104 | 101 | To create a new graph, user need to specify the name, description, vertex types and edges types. |
105 | | -For the detail data model of the graph, please refer to [Data Model](../../data_model). |
| 102 | +For the detail data model of the graph, please refer to [Data Model](../../data_model). |
106 | 103 |
|
107 | 104 | In this example, we will create a simple graph with only one vertex type `persson`, and one edge type named `knows`. |
108 | 105 |
|
@@ -181,7 +178,7 @@ In the above example, a graph with name `test_graph` is defined via a json strin |
181 | 178 |
|
182 | 179 | ### Import data to the graph |
183 | 180 |
|
184 | | -After a new graph is created, you may want to import data into the newly created graph. |
| 181 | +After a new graph is created, you may want to import data into the newly created graph. |
185 | 182 | For the detail configuration of data import, please refer to [Data Import Configuration](../../data_import). |
186 | 183 |
|
187 | 184 | For example, you can import the local csv files into the `test_graph`. Note that, currently only csv files are supported now. Remember to replase `/path/to/person.csv` and `/path/to/person_knows_person.csv` with the actual local path. You can download them from [GraphScope Interactive Github reop](https://github.com/alibaba/GraphScope/tree/main/flex/interactive/examples/modern_graph). |
@@ -266,12 +263,12 @@ public class GettingStarted { |
266 | 263 | ``` |
267 | 264 |
|
268 | 265 | For each vertex/edge types, you need to provide the input data source and column mapping infomation. |
269 | | -Remember to add `@` at the begining of the local file path. |
| 266 | +Remember to add `@` at the begining of the local file path. |
270 | 267 | `Session.bulkLoading()` will submit an dataloading job to the service, and we can query the status of the job via `Session.getJobStatus()`, and wait until the job has compleleted successfully. |
271 | 268 |
|
272 | 269 | ### Create a stored procedure |
273 | 270 |
|
274 | | -Stored procedures can be registered into GraphScope Interactive to encapsulate and reuse complex graph operations. Interactive support both `cypher` and `c++` queries as stored procedures. |
| 271 | +Stored procedures can be registered into GraphScope Interactive to encapsulate and reuse complex graph operations. Interactive support both `cypher` and `c++` queries as stored procedures. |
275 | 272 | With the following code, you will create a procedure named `testProcedure` which is definied via a `cypher` query. |
276 | 273 |
|
277 | 274 | ```java |
@@ -411,142 +408,3 @@ public class GettingStarted{ |
411 | 408 | ``` |
412 | 409 |
|
413 | 410 | For the full example, please refer to [Java SDK Example](https://github.com/alibaba/GraphScope/tree/main/flex/interactive/sdk/examples/java/interactive-example) |
414 | | - |
415 | | -## Documentation for Service APIs |
416 | | - |
417 | | -The APIs in interactive SDK are divided into five categories. |
418 | | -- GraphManagementApi |
419 | | -- ProcedureManagementApi |
420 | | -- JobManagementApi |
421 | | -- ServiceManagementApi |
422 | | -- QueryServiceApi |
423 | | -- VertexApi |
424 | | -- EdgeApi |
425 | | - |
426 | | - |
427 | | - |
428 | | -All URIs are relative to `${INTERACTIVE_ADMIN_ENDPOINT}` |
429 | | - |
430 | | -Class | Method | HTTP request | Description |
431 | | ------------- | ------------- | ------------- | ------------- |
432 | | -*GraphManagementApi* | [**BulkLoading**](./GraphManagementApi.md#Bulkloading) | **POST** /v1/graph/{graph_id}/dataloading | |
433 | | -*GraphManagementApi* | [**CreateGraph**](./GraphManagementApi.md#CreateGraph) | **POST** /v1/graph | |
434 | | -*GraphManagementApi* | [**DeleteGraph**](./GraphManagementApi.md#DeleteGraph) | **DELETE** /v1/graph/{graph_id} | |
435 | | -*GraphManagementApi* | [**GetGraphMeta**](./GraphManagementApi.md#GetGraphMeta) | **GET** /v1/graph/{graph_id} | |
436 | | -*GraphManagementApi* | [**GetGraphSchema**](./GraphManagementApi.md#GetGraphSchema) | **GET** /v1/graph/{graph_id}/schema | |
437 | | -*GraphManagementApi* | [**ListGraphs**](./GraphManagementApi.md#ListGraphs) | **GET** /v1/graph | |
438 | | -*JobManagementApi* | [**CancelJob**](./JobManagementApi.md#CancelJob) | **DELETE** /v1/job/{job_id} | |
439 | | -*JobManagementApi* | [**GetJobById**](./JobManagementApi.md#GetJobById) | **GET** /v1/job/{job_id} | |
440 | | -*JobManagementApi* | [**ListJobs**](./JobManagementApi.md#ListJobs) | **GET** /v1/job | |
441 | | -*ProcedureManagementApi* | [**CreateProcedure**](./ProcedureManagementApi.md#CreateProcedure) | **POST** /v1/graph/{graph_id}/procedure | |
442 | | -*ProcedureManagementApi* | [**DeleteProcedure**](./ProcedureManagementApi.md#DeleteProcedure) | **DELETE** /v1/graph/{graph_id}/procedure/{procedure_id} | |
443 | | -*ProcedureManagementApi* | [**GetProcedure**](./ProcedureManagementApi.md#GetProcedure) | **GET** /v1/graph/{graph_id}/procedure/{procedure_id} | |
444 | | -*ProcedureManagementApi* | [**ListProcedures**](./ProcedureManagementApi.md#ListProcedures) | **GET** /v1/graph/{graph_id}/procedure | |
445 | | -*ProcedureManagementApi* | [**UpdateProcedure**](./ProcedureManagementApi.md#UpdateProcedure) | **PUT** /v1/graph/{graph_id}/procedure/{procedure_id} | |
446 | | -*ServiceManagementApi* | [**GetServiceStatus**](./ServiceManagementApi.md#GetServiceStatus) | **GET** /v1/service/status | |
447 | | -*ServiceManagementApi* | [**RestartService**](./ServiceManagementApi.md#RestartService) | **POST** /v1/service/restart | |
448 | | -*ServiceManagementApi* | [**StartService**](./ServiceManagementApi.md#StartService) | **POST** /v1/service/start | |
449 | | -*ServiceManagementApi* | [**StopService**](./ServiceManagementApi.md#StopService) | **POST** /v1/service/stop | |
450 | | -*QueryServiceApi* | [**CallProcedure**](./QueryServiceApi.md#CallProcedure) | **POST** /v1/graph/{graph_id}/query | |
451 | | -*QueryServiceApi* | [**CallProcedureOnCurrentGraph**](./QueryServiceApi.md#CallProcedureOnCurrentGraph) | **POST** /v1/graph/current/query | |
452 | | -*VertexApi* | [**addVertex**](./VertexApi.md#addVertex) | **POST** /v1/graph/{graph_id}/vertex | Add vertex to the graph |
453 | | -*VertexApi* | [**getVertex**](./VertexApi.md#getVertex) | **GET** /v1/graph/{graph_id}/vertex | Get the vertex's properties with vertex primary key. |
454 | | -*VertexApi* | [**updateVertex**](./VertexApi.md#updateVertex) | **PUT** /v1/graph/{graph_id}/vertex | Update vertex's property |
455 | | -*EdgeApi* | [**addEdge**](./EdgeApi.md#addEdge) | **POST** /v1/graph/{graph_id}/edge | Add edge to the graph |
456 | | -*EdgeApi* | [**getEdge**](./EdgeApi.md#getEdge) | **GET** /v1/graph/{graph_id}/edge | Get the edge's properties with src and dst vertex primary keys. |
457 | | -*EdgeApi* | [**updateEdge**](./EdgeApi.md#updateEdge) | **PUT** /v1/graph/{graph_id}/edge | Update edge's property |
458 | | - |
459 | | - |
460 | | -```{note} |
461 | | -Delete Vertex/Edge is currently not supported by Interactive. |
462 | | -``` |
463 | | - |
464 | | -## Documentation for Utilities APIs |
465 | | - |
466 | | -In addition to the documentation for service APIs, we also offer documentation for [Utility APIs](./reference/index.rst). |
467 | | - |
468 | | -- [Driver](./reference/com/alibaba/graphscope/interactive/client/Driver.rst) |
469 | | -- [Session](./reference/com/alibaba/graphscope/interactive/client/Session.rst) |
470 | | -- [DefaultSession](./reference/com/alibaba/graphscope/interactive/client/impl/DefaultSession.rst) |
471 | | -- [Status](./reference/com/alibaba/graphscope/interactive/client/common/Status.rst) |
472 | | -- [Result](./reference/com/alibaba/graphscope/interactive/client/common/Result.rst) |
473 | | -- [Encoder](./reference/com/alibaba/graphscope/interactive/client/utils/Encoder.rst) |
474 | | -- [Decoder](./reference/com/alibaba/graphscope/interactive/client/utils/Encoder.rst) |
475 | | - |
476 | | - |
477 | | -## Documentation for Data Structures |
478 | | - |
479 | | - - [APIResponseWithCode](./APIResponseWithCode.md) |
480 | | - - [BaseEdgeType](./BaseEdgeType.md) |
481 | | - - [BaseEdgeTypeVertexTypePairRelationsInner](./BaseEdgeTypeVertexTypePairRelationsInner.md) |
482 | | - - [BaseEdgeTypeVertexTypePairRelationsInnerXCsrParams](./BaseEdgeTypeVertexTypePairRelationsInnerXCsrParams.md) |
483 | | - - [BasePropertyMeta](./BasePropertyMeta.md) |
484 | | - - [BaseVertexType](./BaseVertexType.md) |
485 | | - - [BaseVertexTypeXCsrParams](./BaseVertexTypeXCsrParams.md) |
486 | | - - [ColumnMapping](./ColumnMapping.md) |
487 | | - - [CreateEdgeType](./CreateEdgeType.md) |
488 | | - - [CreateGraphRequest](./CreateGraphRequest.md) |
489 | | - - [CreateGraphResponse](./CreateGraphResponse.md) |
490 | | - - [CreateGraphSchemaRequest](./CreateGraphSchemaRequest.md) |
491 | | - - [CreateProcedureRequest](./CreateProcedureRequest.md) |
492 | | - - [CreateProcedureResponse](./CreateProcedureResponse.md) |
493 | | - - [CreatePropertyMeta](./CreatePropertyMeta.md) |
494 | | - - [CreateVertexType](./CreateVertexType.md) |
495 | | - - [DateType](./DateType.md) |
496 | | - - [EdgeData](./EdgeData.md) |
497 | | - - [EdgeMapping](./EdgeMapping.md) |
498 | | - - [EdgeMappingDestinationVertexMappingsInner](./EdgeMappingDestinationVertexMappingsInner.md) |
499 | | - - [EdgeMappingSourceVertexMappingsInner](./EdgeMappingSourceVertexMappingsInner.md) |
500 | | - - [EdgeMappingSourceVertexMappingsInnerColumn](./EdgeMappingSourceVertexMappingsInnerColumn.md) |
501 | | - - [EdgeMappingTypeTriplet](./EdgeMappingTypeTriplet.md) |
502 | | - - [EdgeRequest](./EdgeRequest.md) |
503 | | - - [EdgeStatistics](./EdgeStatistics.md) |
504 | | - - [FixedChar](./FixedChar.md) |
505 | | - - [FixedCharChar](./FixedCharChar.md) |
506 | | - - [GSDataType](./GSDataType.md) |
507 | | - - [GetEdgeType](./GetEdgeType.md) |
508 | | - - [GetGraphResponse](./GetGraphResponse.md) |
509 | | - - [GetGraphSchemaResponse](./GetGraphSchemaResponse.md) |
510 | | - - [GetGraphStatisticsResponse](./GetGraphStatisticsResponse.md) |
511 | | - - [GetProcedureResponse](./GetProcedureResponse.md) |
512 | | - - [GetPropertyMeta](./GetPropertyMeta.md) |
513 | | - - [GetVertexType](./GetVertexType.md) |
514 | | - - [JobResponse](./JobResponse.md) |
515 | | - - [JobStatus](./JobStatus.md) |
516 | | - - [LongText](./LongText.md) |
517 | | - - [Parameter](./Parameter.md) |
518 | | - - [PrimitiveType](./PrimitiveType.md) |
519 | | - - [Property](./Property.md) |
520 | | - - [QueryRequest](./QueryRequest.md) |
521 | | - - [SchemaMapping](./SchemaMapping.md) |
522 | | - - [SchemaMappingLoadingConfig](./SchemaMappingLoadingConfig.md) |
523 | | - - [SchemaMappingLoadingConfigDataSource](./SchemaMappingLoadingConfigDataSource.md) |
524 | | - - [SchemaMappingLoadingConfigFormat](./SchemaMappingLoadingConfigFormat.md) |
525 | | - - [SchemaMappingLoadingConfigXCsrParams](./SchemaMappingLoadingConfigXCsrParams.md) |
526 | | - - [ServiceStatus](./ServiceStatus.md) |
527 | | - - [StartServiceRequest](./StartServiceRequest.md) |
528 | | - - [StoredProcedureMeta](./StoredProcedureMeta.md) |
529 | | - - [StringType](./StringType.md) |
530 | | - - [StringTypeString](./StringTypeString.md) |
531 | | - - [TemporalType](./TemporalType.md) |
532 | | - - [TemporalTypeTemporal](./TemporalTypeTemporal.md) |
533 | | - - [TimeStampType](./TimeStampType.md) |
534 | | - - [TypedValue](./TypedValue.md) |
535 | | - - [UpdateProcedureRequest](./UpdateProcedureRequest.md) |
536 | | - - [UploadFileResponse](./UploadFileResponse.md) |
537 | | - - [VarChar](./VarChar.md) |
538 | | - - [VarCharVarChar](./VarCharVarChar.md) |
539 | | - - [VertexData](./VertexData.md) |
540 | | - - [VertexEdgeRequest](./VertexEdgeRequest.md) |
541 | | - - [VertexMapping](./VertexMapping.md) |
542 | | - - [VertexRequest](./VertexRequest.md) |
543 | | - - [VertexStatistics](./VertexStatistics.md) |
544 | | - - [VertexTypePairStatistics](./VertexTypePairStatistics.md) |
545 | | - |
546 | | - |
547 | | -<a id="documentation-for-authorization"></a> |
548 | | -## Documentation for Authorization |
549 | | - |
550 | | -Authentication is not supported yet, and we will be introducing authorization-related implementation in the near future. |
551 | | - |
552 | | - |
0 commit comments