{"id":1916,"date":"2018-06-06T16:59:29","date_gmt":"2018-06-06T14:59:29","guid":{"rendered":"http:\/\/van-maanen.com\/?p=1916"},"modified":"2018-06-06T16:59:29","modified_gmt":"2018-06-06T14:59:29","slug":"hbase","status":"publish","type":"post","link":"http:\/\/archief.van-maanen.com\/?p=1916","title":{"rendered":"HBase"},"content":{"rendered":"<p>HBase is a database system that is built on top of HDFS. However the term &#8216;database&#8217; might be a bit misleading. It is not a traditional SQL database that can be accessed by a traditional SQL type client, such as SQL developer.<br \/>\nHBase is a technique that falls in the area of no SQL, &#8211; Not Only SQL. This implies that other techniques must be used as we know from SQL type database.<br \/>\nOne possible way to access this environment is via a shell. This shell can be invoked via &#8220;hbase shell&#8221;. If everything is set up correctly, one sees something like:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/van-maanen.com\/wp-content\/uploads\/2018\/06\/Untitled.png\" alt=\"\" width=\"1208\" height=\"104\" class=\"alignnone size-full wp-image-1920\" \/><\/p>\n<p>A command to see which tables are available is given via &#8220;list&#8221;:<\/p>\n<pre>\nhbase(main):004:0> list\nTABLE                                                                                                                                                        \nemp                                                                                                                                                          \n1 row(s) in 0.1520 seconds\n\n=> [\"emp\"]\n<\/pre>\n<p>Here, we see that a table &#8220;emp&#8221; exists. On may investigate the content via &#8220;scan &#8217;emp'&#8221;:<\/p>\n<pre>\nhbase(main):005:0> scan \"emp\"\nROW                                      COLUMN+CELL                                                                                                         \n 1                                       column=naam:, timestamp=1528294868410, value=tom                                                                    \n 1                                       column=naam:voornaam, timestamp=1528294898266, value=jan                                                            \n 1                                       column=nummer:, timestamp=1528294834043, value=1                                                                    \n 2                                       column=naam:voornaam, timestamp=1528296099663, value=flip                                                           \n2 row(s) in 0.0320 seconds\n\nhbase(main):006:0> \n<\/pre>\n<p>One may subsequently insert new data via a put command. In this command, we must mention the table (here emp), the row (here 2), the field (here naam:voornaam) and the actual value.<\/p>\n<pre>\nhbase(main):002:0> put 'emp',2,'naam:voornaam','flip'\n0 row(s) in 0.0840 seconds\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>HBase is a database system that is built on top of HDFS. However the term &#8216;database&#8217; might be a bit misleading. It is not a traditional SQL database that can be accessed by a traditional SQL type client, such as SQL developer. HBase is a technique that falls in the area of no SQL, &#8211; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1916","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/1916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1916"}],"version-history":[{"count":0,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/1916\/revisions"}],"wp:attachment":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1916"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}