ไฟล์ไดเร็กทอรีไม่ได้คัดลอกไปยัง HDFS ด้วยคำสั่ง 'hadoop fs -put ‹my local path› ‹hdfs path›

ฉันกำลังคัดลอกไฟล์ประมวลผล pig ในระบบโลคัลไปยังเส้นทาง HDFS (ซึ่งเชื่อมโยงกับตาราง HIVE) โดยให้คำสั่งด้านล่าง แต่ไม่ได้คัดลอก

ขั้นตอนที่ 1: ข้อมูลอยู่ในเส้นทางในเครื่องของฉัน

[root@quickstart plantoutput]# ll
total 4

-rw-r--r-- 1 root root 1469 Dec  3 02:37 part-m-00000

-rw-r--r-- 1 root root    0 Dec  3 02:37 _SUCCESS

[root@quickstart plantoutput]# pwd

/home/cloudera/Desktop/dealer/plantoutput

Step2: หลังจากใช้คำสั่งแล้วจะเป็นเช่นนี้

[root@quickstart plantoutput]# hadoop fs -put '/home/cloudera/Desktop/dealer/plantoutput' /tabplant

[root@quickstart plantoutput]# hadoop fs -ls /tabplant

พบสินค้า 1 รายการ

drwxr-xr-x - รูทซูเปอร์กรุ๊ป 0 2018-12-04 21:52 /tabplant/plantoutput

ที่จริงแล้วในเป้าหมายของฉัน hdfs เส้นทางไม่มี part-m-00000 และ _SUCCESS

ใครสามารถบอกฉันว่าฉันทำอะไรผิด? มันเป็นคำพูดหรือไม่?


person Sekhar    schedule 05.12.2018    source แหล่งที่มา
comment
คุณได้ตรวจสอบในเส้นทางนี้แล้ว hadoop fs -ls /tabplant/plantoutput/ หรือไม่?   -  person Sathiyan S    schedule 05.12.2018
comment
เรียนคุณเสถียร ฉันได้ตรวจสอบแล้วและ part-m-00000 และ _SUCCESS อยู่ที่นั่นแล้ว แต่ข้อกำหนดของฉันคือการคัดลอก part-m-00000 และ _SUCCESS ไปยัง /tabplant ไม่ใช่ /tabplant/plantoutput เนื่องจากตาราง HIVE ของฉันถูกแมปกับตำแหน่ง /tabplant ใน DHFS แก้ไขฉันถ้าฉันได้ทำผิดพลาดใด ๆ   -  person Sekhar    schedule 05.12.2018


คำตอบ (1)


@เซคาร์

หากต้องการคัดลอกเฉพาะไฟล์ที่อยู่ใน /home/cloudera/Desktop/dealer/plantoutput

คุณควรพูดถึงพา ธ ของไฟล์ที่แน่นอน คุณสามารถใช้ได้เหมือนด้านล่าง

hadoop fs -put /home/cloudera/Desktop/dealer/plantoutput/* /tabplant

เมื่อคุณพูดถึงไดเร็กทอรี มันจะคัดลอกเป็นไดเร็กทอรีในชื่อพาเรนต์

person Sathiyan S    schedule 05.12.2018
comment
เรียนคุณสาธิยา ฉันใช้ * แต่ไม่มีโชค ตอนนี้ฉันได้รับ '/home/cloudera/Desktop/dealer/plantoutput/*': ไม่มีไฟล์หรือไดเรกทอรีดังกล่าว - person Sekhar; 05.12.2018
comment
เรียนคุณสาธิยา ใช่ มันใช้งานได้แล้ว ขอบคุณมากสำหรับการสนับสนุนของคุณ - person Sekhar; 05.12.2018
comment
ยินดีต้อนรับ :) คุณยังสามารถลงคะแนนและยอมรับได้;) - person Sathiyan S; 05.12.2018
comment
หากนี่เป็นการแก้ปัญหาของคุณ - person Sathiyan S; 05.12.2018