What is the path to a local variable from hadoop fs, bash?

Finn Maunsell

Windows user here. Will be a really simple answer, it must have been asked but I mustn't know the terminology to find the question here in Stack.

I'm trying to reference any file outside of the hadoop fs (hadoop filesystem?) on my Linux VM. An example is this:

hadoop fs -put home/udacity_training/data/access_logs.txt access_logs.txt

In the above call I'm trying to copy the file from the 'data' folder to my hadoop filesystem. However for every path I try reference I get 'no such file or directory' error. Even when trying to use 'copyFromLocal' like so:

hadoop fs -copyFromLocal access_logs.txt access_logs.txt

It doesn't work!

Any help will be massively appreciated.

Ramesh Maharjan

With the following command

hadoop fs -put home/udacity_training/data/access_logs.txt access_logs.txt

You are telling hadoop to copy access_logs.txt from local file system to access_logs.txt directory in hdfs. What hadoop is doing is trying to find that directory inside home directory of the hadoop user

So you can create home directory of hadoop user with which you are running hadoop commands as

hadoop dfs -mkdir -f /user/Finn

I am assuming Finn is the username

Then you apply

hadoop fs -put home/udacity_training/data/access_logs.txt /user/Finn/

You will see that access_logs.txt should be copied

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

What is the benefit of using a local variable?

分類Dev

Multiple path environment variable setup lines with bash

分類Dev

Iterate Over Files in Variable Path (Bash)

分類Dev

Bash: Combine creating a file and storing the Path in a variable

分類Dev

Run cd with path variable in bash script not working

分類Dev

javascript: modify global variable from local variable

分類Dev

What is the effect of a path separator at the beginning of an environment variable?

分類Dev

Get the current UNC path from a local path in powershell

分類Dev

hadoop fs、bashからローカル変数へのパスは何ですか?

分類Dev

Use data from variable in bash

分類Dev

Hadoop accessing 3rd party libraries from local file system of a Hadoop node

分類Dev

In BASH is there a way to read Variable names from a variable?

分類Dev

undefined local variable or method `createaddress_hotel_users_path'

分類Dev

read a file from Server path - bash

分類Dev

Problems with node path from bash scripts

分類Dev

Handling from json reaponse function to local variable

分類Dev

using local variable from one function to another

分類Dev

delete items from path environment variable

分類Dev

hadoop fs -ls内存不足错误

分類Dev

What is Shadowing outer local variable in rubocop and how do I fix this?

分類Dev

What is the right way to verify if local Storage variable exists? - XAMARIN

分類Dev

Trying to load images from local path fails after restart in iOS

分類Dev

What does asterisk "*" mean in a unix PATH environment variable?

分類Dev

Bash get last line from a variable

分類Dev

Pass a variable from bash into chef template

分類Dev

Getting variable values from variable names listed in array in Bash

分類Dev

What is sequence file in hadoop?

分類Dev

How to assign local variable from observable Angular2

分類Dev

Variable from API not getting passed into local storage in Angular

Related 関連記事

  1. 1

    What is the benefit of using a local variable?

  2. 2

    Multiple path environment variable setup lines with bash

  3. 3

    Iterate Over Files in Variable Path (Bash)

  4. 4

    Bash: Combine creating a file and storing the Path in a variable

  5. 5

    Run cd with path variable in bash script not working

  6. 6

    javascript: modify global variable from local variable

  7. 7

    What is the effect of a path separator at the beginning of an environment variable?

  8. 8

    Get the current UNC path from a local path in powershell

  9. 9

    hadoop fs、bashからローカル変数へのパスは何ですか?

  10. 10

    Use data from variable in bash

  11. 11

    Hadoop accessing 3rd party libraries from local file system of a Hadoop node

  12. 12

    In BASH is there a way to read Variable names from a variable?

  13. 13

    undefined local variable or method `createaddress_hotel_users_path'

  14. 14

    read a file from Server path - bash

  15. 15

    Problems with node path from bash scripts

  16. 16

    Handling from json reaponse function to local variable

  17. 17

    using local variable from one function to another

  18. 18

    delete items from path environment variable

  19. 19

    hadoop fs -ls内存不足错误

  20. 20

    What is Shadowing outer local variable in rubocop and how do I fix this?

  21. 21

    What is the right way to verify if local Storage variable exists? - XAMARIN

  22. 22

    Trying to load images from local path fails after restart in iOS

  23. 23

    What does asterisk "*" mean in a unix PATH environment variable?

  24. 24

    Bash get last line from a variable

  25. 25

    Pass a variable from bash into chef template

  26. 26

    Getting variable values from variable names listed in array in Bash

  27. 27

    What is sequence file in hadoop?

  28. 28

    How to assign local variable from observable Angular2

  29. 29

    Variable from API not getting passed into local storage in Angular

ホットタグ

アーカイブ