Created
July 17, 2014 18:33
-
-
Save evidanary/593b6c3039545ab73f8f to your computer and use it in GitHub Desktop.
Hive Last modification time of a table using webhdfs gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb> require 'webhdfs' | |
irb> client = WebHDFS::Client.new('hadoop-nn', 50070) | |
irb> fl = client.list('/user/hive/warehouse/database.db/tablename/') | |
irb> DateTime.strptime(fl.collect {|x| x['modificationTime']}.max.to_s, '%M') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment