Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

REST API command to upload Tez tar files

avatar
New Contributor

Hello, 

I'm trying to upload the tez tar files using a rest api command, but I'm not able to find any in the swagger documentation (maybe I just missed it..)

I've tried replicating the url that is pointed at when using the button through the UI, but I require the Tez service ID for it, and I couldn't find an API call to get that neither.. 

Is there an easier way to do this perhaps? Or if you know about one of the api calls I'm missing from the swagger docs mentioned above, that would help me as well. 

Thanks!

1 ACCEPTED SOLUTION

avatar
New Contributor
tez_version="0.9.1.7.1.3.0-100"                                                              
export HADOOP_USER_NAME=hdfs                                                                 
hdfs dfs -mkdir -p /user/tez/$tez_version                                                    
hdfs dfs -chown tez:hadoop /user/tez/$tez_version                                            
hdfs dfs -chmod 0755 /user/tez/$tez_version                                                  
hdfs dfs -put /opt/cloudera/parcels/CDH/lib/tez/tez.tar.gz /user/tez/$tez_version/tez.tar.gz 
hdfs dfs -chown tez:hadoop /user/tez/$tez_version/tez.tar.gz                                 
hdfs dfs -chmod 0644 /user/tez/$tez_version/tez.tar.gz                                       

These are the commands I ended up using. 

View solution in original post

3 REPLIES 3

avatar
Community Manager

@aggo Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our Tez experts @Shmoo @cravani  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
New Contributor

After looking some more in the forums, I realise that to do this I can enable WebHDFS and use the Snakebite library. However, that's not how i will go about this.
I'm trying to get it working using hdfs in the command line, but so far I'm not being able to replicate what the UI does. I will report back when I have a working solution. (sorry for the edits)

avatar
New Contributor
tez_version="0.9.1.7.1.3.0-100"                                                              
export HADOOP_USER_NAME=hdfs                                                                 
hdfs dfs -mkdir -p /user/tez/$tez_version                                                    
hdfs dfs -chown tez:hadoop /user/tez/$tez_version                                            
hdfs dfs -chmod 0755 /user/tez/$tez_version                                                  
hdfs dfs -put /opt/cloudera/parcels/CDH/lib/tez/tez.tar.gz /user/tez/$tez_version/tez.tar.gz 
hdfs dfs -chown tez:hadoop /user/tez/$tez_version/tez.tar.gz                                 
hdfs dfs -chmod 0644 /user/tez/$tez_version/tez.tar.gz                                       

These are the commands I ended up using.