remoteHadoopGem 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/remoteHadoopGem.rb +10 -3
  2. metadata +1 -1
@@ -26,9 +26,7 @@ class RemoteHadoopGem
26
26
  # 2) host (IP of the hadoop machine)
27
27
  # 3) keyPathFile (path of the private key to access the machine)
28
28
  # 4) command to execute
29
- def self.tryOne()
30
- return "yO!"
31
- end
29
+
32
30
  def self.commandToHadoopJobID(username, host, keyPathFile, command)
33
31
  # create a file with a random name to obtained the jobID
34
32
  filename="tempJobID_"+UUIDTools::UUID.random_create.to_s
@@ -103,6 +101,15 @@ class RemoteHadoopGem
103
101
  return "#{res}"
104
102
  end
105
103
 
104
+ #
105
+ # ****** cleanTempFiles ******
106
+ #
107
+ # function to clean all the temporary files created by commandToHadoopJobID
108
+ # require:
109
+ # 1) username (to access the machine via ssh)
110
+ # 2) host (IP of the hadoop machine)
111
+ # 3) keyPathFile (path of the private key to access the machine)
112
+ #
106
113
 
107
114
  def self.cleanTempFiles(username, host, keyPathFile)
108
115
  `ssh -i "#{keyPathFile}" -o StrictHostKeyChecking=no "#{username}"@"#{host}" "export PATH=/hadoop/bin/:$PATH; cd /hadoop/; rm ./tempJobID_* "`
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remoteHadoopGem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: