Case1 :- When data loss is not an issue.

First remove the property.

mgmt.getPropertyKey(‘lat’).remove();

Then add the property with changed data type

mgmt.makePropertyKey(‘lat’).dataType(Double.class).cardinality(Cardinality.SINGLE).make()

Case 2:- When data loss is an issue

first make the property with the changed data type

and then rename the property

and then change with the…

--

--

Step 1: Update you server regularly

apt install unattended-upgrades

Step 2: if you have Newer system, run the following

apt install apt-config-auto-update

if you have older try following

apt install update-notifier-common

Step 3: Configure the upgrades

sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

Step 4. Activate the upgrades

dpkg-reconfigure — priority=low unattended-upgrades

Step 5: Configure the upgrade time

nano /lib/systemd/system/apt-daily.timer

Now, your system will upgrade automatically.

After two days you visit

/var/log/apt/history.log

And verify that updates has been done automatically
adduser sumit
usermod -aG sudo sumit
ssh-keygen -t ed25519
ssh-copy-id username@remote_host
https://www.youtube.com/watch?v=ZhMw53Ud2tY

--

--

--

--

Why we need exports of Graph Databases?

i) Migration between Tinker pop enabled databases

ii) Creating backup copies of graph

There are three way It can be done

i) GraphML:- It is a lossy format

Syntax for writing

graph.io(IoCore.graphml()).writeGraph(“mydata.xml”)

Syntax for reading

graph.io(IoCore.graphml()).readGraph(“mydata.xml”)

ii) GraphSon:- It is a lossless format

Syntax for writing

graph.io(IoCore.graphson()).writeGraph(“mydata.json”)

Syntax for reading

graph.io(IoCore.graphson()).readGraph(“mydata.json”)

iii) Gyro: — Fast, efficient and lossless

Syntax for writing

graph.io(IoCore.gryo()).writeGraph(“mydata.kryo”)

Syntax for reading

graph.io(IoCore.gryo()).readGraph(“mydata.kryo”)

--

--

First step :remote connect tinkerpop.server conf/remote.yaml session

Second Step :remote config timeout none

Third Step :remote console

Fourth Step graph.getOpenTransactions().size();

Fifth Step for(i=0;i<size;i++) {graph.getOpenTransactions().getAt(0).rollback()}

Note:- Replace size with output of fourth step

Sixth Step mgmt = graph.openManagement()

Seventh Step name = mgmt.getPropertyKey(‘name’)

Eighth Step bynameindex=mgmt.buildIndex(‘byNameComposite’, Vertex.class).addKey(name).buildCompositeIndex()

Ninth Step mgmt.commit();

Tenth Step ManagementSystem.awaitGraphIndexStatus(graph, “byNameComposite”).call();

Eleventh Step mgmt = graph.openManagement()

Twelfth Step mgmt.updateIndex(mgmt.getGraphIndex(“byNameComposite”), SchemaAction.REGISTER_INDEX).get();

Thirteenth Step mgmt.commit()

Fourteenth Step mgmt = graph.openManagement()

Fifteenth Step mgmt.updateIndex(mgmt.getGraphIndex(“byNameComposite”), SchemaAction.REINDEX).get()

Sixteenth Step mgmt.commit()

Seventeenth Step prop = mgmt.getPropertyKey(‘name’);

Eighteenth Step idx = mgmt.getGraphIndex(‘byNameComposite’);

Nineteenth Step status = idx.getIndexStatus(prop);

Twentieth Step print(status)

Hurray, You have enabled the property for indexing.

Now, Use it as follows.

g=graph.traversal()

g.V().property(‘name’,’Sumit’)

Now, you will get the result, before you can even blink your eyes, Even if you have billions of nodes.

--

--