Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. from pprint import pprint
  2. from pywebhdfs.webhdfs import PyWebHdfsClient
  3.  
  4. hdfs = PyWebHdfsClient(host='localhost', port='50070', user_name='user')
  5. if 'ls' == words[0]:
  6. data = hdfs.list_dir("user/user")
  7. file_statuses = data["FileStatuses"]
  8. pprint(file_statuses)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement