Sunday, September 29, 2024

Correlating Graph ID's with Graph name in Tigergraph DB

config.yaml is the main file in Tigergraph DB where, all details regarding Graph, vertex, edges reside and is consistent across all nodes.


$ view $(gadmin config get System.DataRoot)/gstore/0/part/config.yaml


In above file all will have ID's and its hard to correlate with corresponding names.

So, check in latest catalog.


$ grun_p all "ls -l $(gadmin config get System.DataRoot)/gsql/backup"


Now, copy latest catalog to some temporary location and unzip.


GraphCatalog.yaml has Graph name corresponding to Graph ID

VertexCatalog.yaml has Vertex name corresponding to Vertex ID

EdgeCatalog.yaml has Edge name corresponding to Edge ID


***

Finding recent files in Linux with "find" command

The command "find * -type f -mtime -7" is used to search for files that have been modified within the last 7 days in the current directory. Here's a breakdown:

  • find *: Starts the search in the current directory (* represents all files and directories).
  • -type f: Limits the search to files only (excluding directories).
  • -mtime -7: Finds files modified within the last 7 days.

In summary, this command locates files in the current directory that have been changed in the last week.

***

Compress files in Linux for certain date range

Compress log files modified between August 1, 2024, and September 21, 2024, in the /tigergraph/logs/gsql directory into a ZIP archive named gsqlfilesm1.zip


$ zip -r /tmp/gsqlfilesm1.zip $(find /tigergraph/logs/gsql -type f -newermt 2024-08-01 ! -newermt 2024-09-21)


  • find /tigergraph/logs/gsql -type f -newermt 2024-08-01 ! -newermt 2024-09-21: Finds all files in /tigergraph/logs/gsql that were modified between August 1, 2024, and September 21, 2024.

  • zip -r /tmp/gsqlfilesm1.zip: Recursively adds these files to a ZIP archive located at /tmp/gsqlfilesm1.zip.
In Tigergraph DB run on all nodes by running "grun_p" command.

$ grun_p all "zip -r /tmp/gsqlfilesm1.zip $(find /tigergraph/logs/gsql -type f -newermt 2024-08-01 ! -newermt 2024-09-21)"


***

Wednesday, September 11, 2024

My Database issues debugging style

 

  1. What changed?

    1. Settings

    2. Application code

    3. Read/Write load

    4. Data Volume

    5. Hardware changes

    6. Network Bandwidth and Latency

    7. Software versions

      1. Database Components

      2. Linux Kernel

      3. Java Virtual Machine

      4. Client Drivers


***