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

cannot copy files to hdfs: block under construction #44

Closed
RafalSkolasinski opened this issue Jan 12, 2021 · 5 comments
Closed

cannot copy files to hdfs: block under construction #44

RafalSkolasinski opened this issue Jan 12, 2021 · 5 comments

Comments

@RafalSkolasinski
Copy link

Just tried to deploy hdfs using your helm charts and test it using rclone beta client.

Unfortunately I am unable to copy over files to hdfs. Client hags and in logs I see

2021-01-12 11:57:06,270 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* allocate blk_1073741839_1015{UCState=UNDER_CONSTRUCTION, truncateBlock=null, primaryNodeIndex=-1, replicas=[ReplicaUC[[DISK]DS-1e01efed-b1b9-40bc-adc6-0abf2ae3ca00:NORMAL:10.244.0.25:50010|RBW], ReplicaUC[[DISK]DS-ab65c535-fabb-4e29-ad48-fb15ac3665a9:NORMAL:10.244.0.23:50010|RBW], ReplicaUC[[DISK]DS-52242411-b848-490b-9b28-9de6d5ad63ff:NORMAL:10.244.0.27:50010|RBW]]} for /test-folder/test.txt

hdfs support issue in rclone: rclone/rclone#42

@RafalSkolasinski
Copy link
Author

RafalSkolasinski commented Jan 12, 2021

The problem seems to be present only when coping files over to hdfs: folder creation and listing works fine.

To reproduce:

  1. helm install hdfs gradiant/hdfs in the k8s cluster
  2. Get beta rclone with hdfs support: https://beta.rclone.org/ (I used v1.54.0-beta.5058.35a4de203)
  3. configure rclone with
[hdfs-kind]
type = hdfs
namenode = localhost:8020
username = hdfs
  1. port-forward: kubectl port-forward svc/hdfs-namenode 8020:8020
  2. make folder: /usr/bin/rclone mkdir hdfs-kind:/test-folder.
  3. attempt to copy over file: /usr/bin/rclone copy test.txt hdfs-kind:/test-folder/

@RafalSkolasinski
Copy link
Author

Happy to provide any more info if required.

@cgiraldo
Copy link
Member

hdfs clients must be run inside kubernetes cluster in order to be able to resolve and access datanodes pods (port-forward is not enough though).

Other option to perform operations from outside the kubernetes cluster is to call httpfs rest service.

@RafalSkolasinski
Copy link
Author

Thank you @cgiraldo, I will try from inside the cluster and get back to you 👍

@RafalSkolasinski
Copy link
Author

Just tested and it works fine from inside the cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants