Git Product home page Git Product logo

nebula-java's Introduction

nebula-java

star this repo fork this repo

Nebula Java is a Java client for developers to connect their projects to Nebula Graph.

NOTE: Nebula Java is not thread-safe.

Two main branches of this repository

In this repository, you can find two branches for the source code of Nebula Java of different versions.

The master branch

The master branch is for Nebula Java v2.0, which works with Nebula Graph v2.0 nightly.

This README file provides Java developers with instructions on how to connect to Nebula Graph v2.0.

The v1.0 branch

In the v1.0 branch, you can find source code of these:

  • Nebula Java v1.0, which works with Nebula Graph v1.1.0 and earlier versions only.
  • Nebula Graph Exchange, Nebula Spark Connector, Nebula Flink Connector, and nebula-algorithm.

For more information, see README of v1.0.

The v2.0.0-rc branch

The v2.0.0-rc branch works with Nebula Graph v2.0.0-beta and v2.0.0-rc1, but not for the latest nightly Nebula Graph.

Prerequisites

To use this Java client, do a check of these:

Modify pom.xml

If you use Maven to manage your project, add the following dependency to your pom.xml file. Replace 2.0.0-SNAPSHOT with an appropriate Nebula Java v2.x version. For more versions, visit releases.

  <dependency>
    <groupId>com.vesoft</groupId>
    <artifactId>client</artifactId>
    <version>2.0.0-SNAPSHOT</version>
  </dependency>

There are the version correspondence between client and Nebula:

Client version Nebula Version
1.0.0 1.0.0
1.0.1 1.1.0,1.2.0
1.1.0 1.1.0,1.2.0
1.2.0 1.1.0,1.2.0,1.2.1
2.0.0-beta 2.0.0-beta
2.0.0-rc1 2.0.0-rc1
2.0.0 >= 2.0.0
2.0.0-SNAPSHOT 2.0.0-nightly

Graph client example

To connect to the nebula-graphd process of Nebula Graph v2.0:

NebulaPoolConfig nebulaPoolConfig = new NebulaPoolConfig();
nebulaPoolConfig.setMaxConnSize(10);
List<HostAddress> addresses = Arrays.asList(new HostAddress("127.0.0.1", 9669),
        new HostAddress("127.0.0.1", 9670));
NebulaPool pool = new NebulaPool();
pool.init(addresses, nebulaPoolConfig);
Session session = pool.getSession("root", "nebula", false);
session.execute("SHOW HOSTS;");
session.release();
pool.close();

nebula-java's People

Contributors

amber1990zhang avatar anyzm avatar chenxu14 avatar critical27 avatar darionyaphet avatar datian9966 avatar dependabot[bot] avatar dutor avatar firepation avatar guojun85 avatar harrischu avatar ianhhhhhhhhe avatar importmengjie avatar jabinst avatar jude-zhu avatar laura-ding avatar loadingspace avatar nicole00 avatar nildot avatar oldlady344 avatar riverzzz avatar sekingme avatar wfystx avatar whitewum avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.