Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setStorageAddresses support to optionally override storage addresses #451

Closed
wants to merge 2 commits into from

Conversation

wey-gu
Copy link
Contributor

@wey-gu wey-gu commented May 6, 2022

This enables vesoft-inc/nebula-spark-connector#39 , where we could make spark projects(spark-c, exchange, algorithm) running outside namespace/cluster of Nebula Graph Cluster in K8s being work together with Nebula(including the DBaaS).

@codecov-commenter
Copy link

Codecov Report

Merging #451 (602a904) into master (a8329e2) will decrease coverage by 0.44%.
The diff coverage is 66.66%.

@@             Coverage Diff              @@
##             master     #451      +/-   ##
============================================
- Coverage     63.75%   63.30%   -0.45%     
+ Complexity      736      729       -7     
============================================
  Files            66       66              
  Lines          3479     3483       +4     
  Branches        507      506       -1     
============================================
- Hits           2218     2205      -13     
- Misses          920      931      +11     
- Partials        341      347       +6     
Impacted Files Coverage Δ
...om/vesoft/nebula/client/storage/StorageClient.java 73.73% <66.66%> (-1.53%) ⬇️
...java/com/vesoft/nebula/client/meta/MetaClient.java 52.88% <0.00%> (-4.81%) ⬇️
.../client/storage/scan/ScanVertexResultIterator.java 62.63% <0.00%> (-2.20%) ⬇️
...t/nebula/client/storage/scan/ScanVertexResult.java 64.61% <0.00%> (-1.54%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8329e2...602a904. Read the comment docs.

@HarrisChu
Copy link
Contributor

I don't think so.
If this way, how to verify if the host is valid?

the same question:

when deploy HDFS in k8s, how to use spark outside k8s?

@HarrisChu
Copy link
Contributor

another question, when scan data from storage, we must know which host the leader in

if user provides the hosts, we cannot map the partitions in meta.

@wey-gu
Copy link
Contributor Author

wey-gu commented May 7, 2022

Thanks @HarrisChu !

I didn't realized that we actually need the mapping of meta-storage in many spark cases, was just consider it's feasible as we have similar interfaces of storage client in nebula-python.

In this case, to make Nebula in k8s work with Spark, when the spark is not running inside of the NebulaCluster Namespace, the only way is to hack on:

a.

  • expose meta/storage endpoint and remaining same port
  • use dns to enable same domain name to be resolved to it

b.
use reverse proxy to mock the endpoints with same domain name and port(this decouple the requirement of same port).

I'll try b. first as a poc/reference then.
PoC here: https://gist.github.com/wey-gu/699b9a2ef5dff5f0fb5f288d692ddfd5

Thanks!

@HarrisChu
Copy link
Contributor

@MegaByte875
CC, may be a feature in operator

@wey-gu
Copy link
Contributor Author

wey-gu commented May 9, 2022

Or, we should introduce withStorageAddress in map instead of list(current implementation), where the specified storage address and its actually address in metad's mapping relationship should be provided.

@Nicole00
Copy link
Contributor

close for more discuss for exposing the storaged address.

@Nicole00 Nicole00 closed this Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants