diff --git a/NetworkClient.java b/NetworkClient.java deleted file mode 100644 index 1c78637..0000000 --- a/NetworkClient.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * NetworkClient class that handles network operations. - */ -public class NetworkClient { - - /** - * Private instance of NetworkService. - */ - private NetworkService networkService; - - /** - * Constructor for NetworkClient that takes a NetworkService object as an argument. - * - * @param networkService The network service to be used with this client. - */ - public NetworkClient(NetworkService networkService) { - // Assigning the networkService argument to the instance variable - this.networkService = networkService; - } - - /** - * Fetches data from a specified URL and prints it. - * - * @param url The URL from which data is fetched. - */ - public void fetchDataAndPrint(String url) { - // Printing the URL from which data is being fetched - System.out.println("Fetching data from: " + url); - // Fetching the data and storing it in a string - String result = networkService.fetchData(url); - // Printing the fetched data - System.out.println("Received: " + result); - } - - /** - * Main method to run the NetworkClient example. - * - * @param args Command line arguments (not used). - */ - public static void main(String[] args) { - // Creating a new instance of SimpleNetworkService - NetworkService service = new SimpleNetworkService(); - // Creating a new instance of NetworkClient and passing the service object to its constructor - NetworkClient client = new NetworkClient(service); - // Fetching and printing data from a specific URL - client.fetchDataAndPrint("http://example.com/api/data"); - } -} diff --git a/nebula-docker-compose.yaml b/nebula-docker-compose.yaml deleted file mode 100755 index 0cc776d..0000000 --- a/nebula-docker-compose.yaml +++ /dev/null @@ -1,349 +0,0 @@ -version: '3.4' -services: - metad0: - image: docker.io/vesoft/nebula-metad:v3.6.0 - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559 - - --local_ip=metad0 - - --ws_ip=metad0 - - --port=9559 - - --ws_http_port=19559 - - --data_path=/data/meta - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - healthcheck: - test: ["CMD", "curl", "-sf", "http://metad0:19559/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - 9559 - - 19559 - - 19560 - volumes: - - ./data/meta0:/data/meta - - ./logs/meta0:/logs - networks: - - nebula-net - restart: on-failure - cap_add: - - SYS_PTRACE - - metad1: - image: docker.io/vesoft/nebula-metad:v3.6.0 - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559 - - --local_ip=metad1 - - --ws_ip=metad1 - - --port=9559 - - --ws_http_port=19559 - - --data_path=/data/meta - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - healthcheck: - test: ["CMD", "curl", "-sf", "http://metad1:19559/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - 9559 - - 19559 - - 19560 - volumes: - - ./data/meta1:/data/meta - - ./logs/meta1:/logs - networks: - - nebula-net - restart: on-failure - cap_add: - - SYS_PTRACE - - metad2: - image: docker.io/vesoft/nebula-metad:v3.6.0 - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559 - - --local_ip=metad2 - - --ws_ip=metad2 - - --port=9559 - - --ws_http_port=19559 - - --data_path=/data/meta - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - healthcheck: - test: ["CMD", "curl", "-sf", "http://metad2:19559/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - 9559 - - 19559 - - 19560 - volumes: - - ./data/meta2:/data/meta - - ./logs/meta2:/logs - networks: - - nebula-net - restart: on-failure - cap_add: - - SYS_PTRACE - - storaged0: - image: docker.io/vesoft/nebula-storaged:v3.6.0 - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559 - - --local_ip=storaged0 - - --ws_ip=storaged0 - - --port=9779 - - --ws_http_port=19779 - - --data_path=/data/storage - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - depends_on: - - metad0 - - metad1 - - metad2 - healthcheck: - test: ["CMD", "curl", "-sf", "http://storaged0:19779/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - 9779 - - 19779 - - 19780 - volumes: - - ./data/storage0:/data/storage - - ./logs/storage0:/logs - networks: - - nebula-net - restart: on-failure - cap_add: - - SYS_PTRACE - - storaged1: - image: docker.io/vesoft/nebula-storaged:v3.6.0 - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559 - - --local_ip=storaged1 - - --ws_ip=storaged1 - - --port=9779 - - --ws_http_port=19779 - - --data_path=/data/storage - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - depends_on: - - metad0 - - metad1 - - metad2 - healthcheck: - test: ["CMD", "curl", "-sf", "http://storaged1:19779/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - 9779 - - 19779 - - 19780 - volumes: - - ./data/storage1:/data/storage - - ./logs/storage1:/logs - networks: - - nebula-net - restart: on-failure - cap_add: - - SYS_PTRACE - - storaged2: - image: docker.io/vesoft/nebula-storaged:v3.6.0 - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559 - - --local_ip=storaged2 - - --ws_ip=storaged2 - - --port=9779 - - --ws_http_port=19779 - - --data_path=/data/storage - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - depends_on: - - metad0 - - metad1 - - metad2 - healthcheck: - test: ["CMD", "curl", "-sf", "http://storaged2:19779/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - 9779 - - 19779 - - 19780 - volumes: - - ./data/storage2:/data/storage - - ./logs/storage2:/logs - networks: - - nebula-net - restart: on-failure - cap_add: - - SYS_PTRACE - - graphd: - image: docker.io/vesoft/nebula-graphd:v3.6.0 - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559 - - --port=9669 - - --local_ip=graphd - - --ws_ip=graphd - - --ws_http_port=19669 - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - depends_on: - - storaged0 - - storaged1 - - storaged2 - healthcheck: - test: ["CMD", "curl", "-sf", "http://graphd:19669/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9669:9669" - - 19669 - - 19670 - volumes: - - ./logs/graph:/logs - networks: - - nebula-net - restart: on-failure - cap_add: - - SYS_PTRACE - - graphd1: - image: docker.io/vesoft/nebula-graphd:v3.6.0 - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559 - - --port=9669 - - --local_ip=graphd1 - - --ws_ip=graphd1 - - --ws_http_port=19669 - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - depends_on: - - storaged0 - - storaged1 - - storaged2 - healthcheck: - test: ["CMD", "curl", "-sf", "http://graphd1:19669/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - 9669 - - 19669 - - 19670 - volumes: - - ./logs/graph1:/logs - networks: - - nebula-net - restart: on-failure - cap_add: - - SYS_PTRACE - - graphd2: - image: docker.io/vesoft/nebula-graphd:v3.6.0 - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559 - - --port=9669 - - --local_ip=graphd2 - - --ws_ip=graphd2 - - --ws_http_port=19669 - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - depends_on: - - storaged0 - - storaged1 - - storaged2 - healthcheck: - test: ["CMD", "curl", "-sf", "http://graphd2:19669/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - 9669 - - 19669 - - 19670 - volumes: - - ./logs/graph2:/logs - networks: - - nebula-net - restart: on-failure - cap_add: - - SYS_PTRACE - - console: - image: docker.io/vesoft/nebula-console:v3.5 - entrypoint: "" - command: - - sh - - -c - - | - for i in `seq 1 60`;do - var=`nebula-console -addr graphd -port 9669 -u root -p nebula -e 'ADD HOSTS "storaged0":9779,"storaged1":9779,"storaged2":9779'`; - if [[ $$? == 0 ]];then - break; - fi; - sleep 1; - echo "retry to add hosts."; - done && tail -f /dev/null; - - depends_on: - - graphd - networks: - - nebula-net - -networks: - nebula-net: diff --git a/output.json b/output.json deleted file mode 100644 index 651cad0..0000000 --- a/output.json +++ /dev/null @@ -1,377 +0,0 @@ -{ - "FullName": "NetworkClient.java", - "PackageName": "", - "Imports": [], - "Members": [], - "DataStructures": [ - { - "NodeName": "NetworkClient", - "Module": "", - "Type": "CLASS", - "Package": "", - "FilePath": "NetworkClient.java", - "Fields": [ - { - "TypeType": "NetworkService", - "TypeValue": "", - "TypeKey": "networkService", - "Annotations": [], - "Modifiers": [], - "Calls": [] - } - ], - "MultipleExtend": [], - "Implements": [], - "Extend": "", - "Functions": [ - { - "Name": "NetworkClient", - "FilePath": "", - "Package": "", - "ReturnType": "", - "MultipleReturns": [], - "Parameters": [ - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "networkService", - "TypeType": "NetworkService", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - } - ], - "FunctionCalls": [], - "Annotations": [], - "Override": false, - "Modifiers": [], - "InnerStructures": [], - "InnerFunctions": [], - "Position": { - "StartLine": 11, - "StartLinePosition": 11, - "StopLine": 14, - "StopLinePosition": 4 - }, - "Extension": {}, - "LocalVariables": [], - "IsConstructor": true, - "IsReturnHtml": false, - "BodyHash": 0, - "Type": "Function", - "Content": "", - "extensionMap": {} - }, - { - "Name": "fetchDataAndPrint", - "FilePath": "", - "Package": "", - "ReturnType": "void", - "MultipleReturns": [], - "Parameters": [ - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "url", - "TypeType": "String", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - } - ], - "FunctionCalls": [ - { - "Package": "", - "Type": "FUNCTION", - "NodeName": "System.out", - "FunctionName": "println", - "Parameters": [ - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "\"Fetching data from: \"+url", - "TypeType": "", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - } - ], - "Position": { - "StartLine": 19, - "StartLinePosition": 19, - "StopLine": 19, - "StopLinePosition": 55 - }, - "OriginNodeName": "" - }, - { - "Package": "", - "Type": "FUNCTION", - "NodeName": "NetworkService", - "FunctionName": "fetchData", - "Parameters": [ - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "url", - "TypeType": "", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - } - ], - "Position": { - "StartLine": 21, - "StartLinePosition": 39, - "StopLine": 21, - "StopLinePosition": 52 - }, - "OriginNodeName": "" - }, - { - "Package": "", - "Type": "FUNCTION", - "NodeName": "System.out", - "FunctionName": "println", - "Parameters": [ - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "\"Received: \"+result", - "TypeType": "", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - } - ], - "Position": { - "StartLine": 23, - "StartLinePosition": 19, - "StopLine": 23, - "StopLinePosition": 48 - }, - "OriginNodeName": "" - } - ], - "Annotations": [], - "Override": false, - "Modifiers": [], - "InnerStructures": [], - "InnerFunctions": [], - "Position": { - "StartLine": 17, - "StartLinePosition": 11, - "StopLine": 24, - "StopLinePosition": 4 - }, - "Extension": {}, - "LocalVariables": [ - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "networkService", - "TypeType": "NetworkService", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - }, - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "url", - "TypeType": "String", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - }, - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "result", - "TypeType": "String", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - } - ], - "IsConstructor": false, - "IsReturnHtml": false, - "BodyHash": 1894490292, - "Type": "Function", - "Content": "", - "extensionMap": {} - }, - { - "Name": "main", - "FilePath": "", - "Package": "", - "ReturnType": "void", - "MultipleReturns": [], - "Parameters": [ - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "args", - "TypeType": "String[]", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - } - ], - "FunctionCalls": [ - { - "Package": "", - "Type": "SELF", - "NodeName": "NetworkClient", - "FunctionName": "fetchDataAndPrint", - "Parameters": [ - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "\"http://example.com/api/data\"", - "TypeType": "", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - } - ], - "Position": { - "StartLine": 33, - "StartLinePosition": 15, - "StopLine": 33, - "StopLinePosition": 62 - }, - "OriginNodeName": "" - } - ], - "Annotations": [], - "Override": false, - "Modifiers": [], - "InnerStructures": [], - "InnerFunctions": [], - "Position": { - "StartLine": 27, - "StartLinePosition": 18, - "StopLine": 34, - "StopLinePosition": 4 - }, - "Extension": {}, - "LocalVariables": [ - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "networkService", - "TypeType": "NetworkService", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - }, - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "url", - "TypeType": "String", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - }, - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "result", - "TypeType": "String", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - }, - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "args", - "TypeType": "String[]", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - }, - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "service", - "TypeType": "NetworkService", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - }, - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "newSimpleNetworkService()", - "TypeType": "SimpleNetworkService", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - }, - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "client", - "TypeType": "NetworkClient", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - }, - { - "Modifiers": [], - "DefaultValue": "", - "TypeValue": "newNetworkClient(service)", - "TypeType": "NetworkClient", - "Annotations": [], - "ObjectValue": [], - "ReturnTypes": [], - "Parameters": [] - } - ], - "IsConstructor": false, - "IsReturnHtml": false, - "BodyHash": -1597084065, - "Type": "Function", - "Content": "", - "extensionMap": {} - } - ], - "InnerStructures": [], - "Annotations": [], - "FunctionCalls": [], - "Parameters": [], - "Imports": [], - "Exports": [], - "Extension": {}, - "Position": { - "StartLine": 5, - "StartLinePosition": 7, - "StopLine": 35, - "StopLinePosition": 0 - }, - "Content": "" - } - ], - "Fields": [], - "Containers": [] -} \ No newline at end of file