Class: HBase::Request::TableRequest
- Inherits:
-
BasicRequest
- Object
- BasicRequest
- HBase::Request::TableRequest
- Defined in:
- lib/hbase/request/table_request.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from BasicRequest
Instance Method Summary collapse
- #create ⇒ Object
- #delete(columns = nil) ⇒ Object
- #disable ⇒ Object
- #enable ⇒ Object
-
#initialize(name) ⇒ TableRequest
constructor
A new instance of TableRequest.
- #regions(start_row = nil, end_row = nil) ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize(name) ⇒ TableRequest
Returns a new instance of TableRequest.
7 8 9 10 |
# File 'lib/hbase/request/table_request.rb', line 7 def initialize(name) super("") @name = CGI.escape(name) if name end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/hbase/request/table_request.rb', line 5 def body @body end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/hbase/request/table_request.rb', line 4 def name @name end |
Instance Method Details
#create ⇒ Object
21 22 23 |
# File 'lib/hbase/request/table_request.rb', line 21 def create @path << "/" end |
#delete(columns = nil) ⇒ Object
37 38 39 40 41 |
# File 'lib/hbase/request/table_request.rb', line 37 def delete(columns = nil) @path << "/#{name}" @path << "?#{pack_params(columns)}" if columns @path end |
#disable ⇒ Object
33 34 35 |
# File 'lib/hbase/request/table_request.rb', line 33 def disable @path << "/#{name}/disable" end |
#enable ⇒ Object
29 30 31 |
# File 'lib/hbase/request/table_request.rb', line 29 def enable @path << "/#{name}/enable" end |
#regions(start_row = nil, end_row = nil) ⇒ Object
16 17 18 19 |
# File 'lib/hbase/request/table_request.rb', line 16 def regions(start_row = nil, end_row = nil) #TODO no handle the args! @path << "/#{name}/regions" end |
#show ⇒ Object
12 13 14 |
# File 'lib/hbase/request/table_request.rb', line 12 def show @path << "/#{name}" end |
#update ⇒ Object
25 26 27 |
# File 'lib/hbase/request/table_request.rb', line 25 def update @path << "/#{name}" end |