Class: Chef::Knife::HadoopSetup

Inherits:
Chef::Knife show all
Includes:
HadoopBase
Defined in:
lib/chef/knife/hadoop_setup.rb

Instance Method Summary collapse

Methods included from HadoopBase

#db_connection, #hdfs_connection, included, #locate_config_value, #msg_pair

Instance Method Details

#runObject



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/chef/knife/hadoop_setup.rb', line 47

def run
  $stdout.sync = true
    
  type = "#{Chef::Config[:knife][:type]}".downcase
  case type
  when 'db'
    ui.msg("Creating table #{Chef::Config[:knife][:table]}")
    db_connection.create_table "#{Chef::Config[:knife][:table]}" do
       String :directory
       String :accessTime
       String :blockSize
       String :group
       String :length
       String :modificationTime
       String :owner
       String :pathSuffix
       String :permission
       String :replication
       String :type
       DateTime :created_at      
    end          
  end
end