{"id":20779,"date":"2013-05-10T17:51:17","date_gmt":"2013-05-10T12:21:17","guid":{"rendered":"http:\/\/vskills.in\/certification\/tutorial\/?p=20779"},"modified":"2024-04-12T14:19:38","modified_gmt":"2024-04-12T08:49:38","slug":"task-and-node-management-in-cluster","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/","title":{"rendered":"Task and node management in cluster"},"content":{"rendered":"<p>For small clusters, it is recommended designating one node in your cluster as the HBase Master node. On this node, you will typically run the HBase Master and a ZooKeeper quorum peer. These master processes may be collocated with the Hadoop NameNode and JobTracker for small clusters.<\/p>\n<p>Designate the remaining nodes as RegionServer nodes. On each node, runn a RegionServer, which may be collocated with a Hadoop TaskTracker (MRv1) and a DataNode. When co-locating with TaskTrackers, be sure that the resources of the machine are not oversubscribed \u2013 it&#8217;s safest to start with a small number of MapReduce slots and work up slowly.<\/p>\n<p>The HBase Thrift service is light-weight, and can be run on any node in the cluster.<\/p>\n<h3>Class Cluster<\/h3>\n<p>A list of &#8216;host:port&#8217; addresses of HTTP servers operating as a single entity, for example multiple redundant web service gateways.<\/p>\n<p><strong>Field <\/strong><\/p>\n<ul>\n<li>protected String lastHost<\/li>\n<li>protected List&lt;String&gt; nodes<\/li>\n<\/ul>\n<p><strong>Constructor <\/strong><\/p>\n<ul>\n<li>Cluster()<\/li>\n<li>Cluster(List&lt;String&gt; nodes)<\/li>\n<\/ul>\n<p><strong>Method <\/strong><\/p>\n<ul>\n<li>Cluster add(String node)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Add a node to the cluster<\/li>\n<li>Cluster add(String name, int port)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Add a node to the cluster<\/li>\n<li>boolean isEmpty()<\/li>\n<li>Cluster remove(String node)\u00a0\u00a0\u00a0 Remove a node from the cluster<\/li>\n<li>Cluster remove(String name, int port) Remove a node from the cluster<\/li>\n<\/ul>\n<h3>Class ClusterStatus<\/h3>\n<p>As of release 2.0.0, this will be removed in HBase 3.0.0 Use ClusterMetrics instead.<\/p>\n<p>@InterfaceAudience.Public<\/p>\n<p>@Deprecated<\/p>\n<p>public class ClusterStatus<\/p>\n<p>extends Object<\/p>\n<p>implements ClusterMetrics<\/p>\n<p>Status information on the HBase cluster. ClusterStatus provides clients with information such as:<\/p>\n<ul>\n<li>The count and names of region servers in the cluster.<\/li>\n<li>The count and names of dead region servers in the cluster.<\/li>\n<li>The name of the active master for the cluster.<\/li>\n<li>The name(s) of the backup master(s) for the cluster, if they exist.<\/li>\n<li>The average cluster load.<\/li>\n<li>The number of regions deployed on the cluster.<\/li>\n<li>The number of requests since last report.<\/li>\n<li>Detailed region server loading and resource usage information, per server and per region.<\/li>\n<li>Regions in transition at master<\/li>\n<li>The unique cluster ID<\/li>\n<\/ul>\n<p>ClusterMetrics.Option provides a way to get desired ClusterStatus information. The following codes will get all the cluster information.<\/p>\n<p>\/\/ Original version still works<\/p>\n<p>Admin admin = connection.getAdmin();<\/p>\n<p>ClusterStatus status = admin.getClusterStatus();<\/p>\n<p>\/\/ or below, a new version which has the same effects<\/p>\n<p>ClusterStatus status = admin.getClusterStatus(EnumSet.allOf(Option.class));<\/p>\n<p>If information about live servers is the only wanted. then codes in the following way:<\/p>\n<p>Admin admin = connection.getAdmin();<\/p>\n<p>ClusterStatus status = admin.getClusterStatus(EnumSet.of(Option.LIVE_SERVERS));<\/p>\n<p><strong>Method <\/strong><\/p>\n<ul>\n<li>List&lt;ServerName&gt; getBackupMasterNames()<\/li>\n<li>List&lt;ServerName&gt; getBackupMasters() As of release 2.0.0, this will be removed in HBase 3.0.0 Use getBackupMasterNames() instead.<\/li>\n<li>int getBackupMastersSize() As of release 2.0.0, this will be removed in HBase 3.0.0 Use getBackupMasterNames() instead.<\/li>\n<li>Boolean getBalancerOn()<\/li>\n<li>String getClusterId()<\/li>\n<li>List&lt;ServerName&gt; getDeadServerNames()<\/li>\n<li>int getDeadServers() As of release 2.0.0, this will be removed in HBase 3.0.0 (HBASE-13656). Use getDeadServerNames().<\/li>\n<li>int getDeadServersSize() As of release 2.0.0, this will be removed in HBase 3.0.0 Use getDeadServerNames().<\/li>\n<li>String getHBaseVersion()<\/li>\n<li>long getLastMajorCompactionTsForRegion(byte[] region) As of release 2.0.0, this will be removed in HBase 3.0.0 Use ClusterMetrics.getLastMajorCompactionTimestamp(byte[]) instead.<\/li>\n<li>long getLastMajorCompactionTsForTable(TableName table) As of release 2.0.0, this will be removed in HBase 3.0.0 Use ClusterMetrics.getLastMajorCompactionTimestamp(TableName) instead.<\/li>\n<li>Map&lt;ServerName,ServerMetrics&gt; getLiveServerMetrics()<\/li>\n<li>ServerLoad getLoad(ServerName sn) As of release 2.0.0, this will be removed in HBase 3.0.0 Use getLiveServerMetrics() instead.<\/li>\n<li>ServerName getMaster() As of release 2.0.0, this will be removed in HBase 3.0.0 Use getMasterName() instead.<\/li>\n<li>List&lt;String&gt; getMasterCoprocessorNames()<\/li>\n<li>String[] getMasterCoprocessors()\u00a0\u00a0 As of release 2.0.0, this will be removed in HBase 3.0.0 Use getMasterCoprocessorNames() instead.<\/li>\n<li>int getMasterInfoPort()<\/li>\n<li>ServerName getMasterName() Returns detailed information about the current master ServerName.<\/li>\n<li>int getRegionsCount() As of release 2.0.0, this will be removed in HBase 3.0.0 Use ClusterMetrics.getRegionCount().<\/li>\n<li>List&lt;org.apache.hadoop.hbase.master.RegionState&gt; getRegionStatesInTransition()<\/li>\n<li>int getRequestsCount() As of release 2.0.0, this will be removed in HBase 3.0.0 Use ClusterMetrics.getRequestCount() instead.<\/li>\n<li>Collection&lt;ServerName&gt; getServers() As of release 2.0.0, this will be removed in HBase 3.0.0 Use getLiveServerMetrics() instead.<\/li>\n<li>List&lt;ServerName&gt; getServersName()<\/li>\n<li>int getServersSize() As of release 2.0.0, this will be removed in HBase 3.0.0 Use getLiveServerMetrics().<\/li>\n<li>byte getVersion()\u00a0\u00a0 As of release 2.0.0, this will be removed in HBase 3.0.0<\/li>\n<li>int hashCode()<\/li>\n<li>boolean isBalancerOn() As of release 2.0.0, this will be removed in HBase 3.0.0 No flag in 2.0<\/li>\n<\/ul>\n<div class=\"apply\">\n<h3>Apply for HBase Certification Now!!<\/h3>\n<p><a href=\"http:\/\/www.vskills.in\/certification\/Certified-HBase-Professional\">http:\/\/www.vskills.in\/certification\/Certified-HBase-Professional<\/a><\/p>\n<h5>Go To- <a href=\"https:\/\/www.vskills.in\/certification\/tutorial\/certified-hbase-professional\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Certified HBase Professional Tutorial<\/strong><\/a><\/h5>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>For small clusters, it is recommended designating one node in your cluster as the HBase Master node. On this node, you will typically run the HBase Master and a ZooKeeper quorum peer. These master processes may be collocated with the Hadoop NameNode and JobTracker for small clusters. Designate the remaining nodes as RegionServer nodes. On&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[69],"tags":[],"class_list":["post-20779","page","type-page","status-publish","hentry","category-hbase"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Task and node management in cluster - Tutorial<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Task and node management in cluster - Tutorial\" \/>\n<meta property=\"og:description\" content=\"For small clusters, it is recommended designating one node in your cluster as the HBase Master node. On this node, you will typically run the HBase Master and a ZooKeeper quorum peer. These master processes may be collocated with the Hadoop NameNode and JobTracker for small clusters. Designate the remaining nodes as RegionServer nodes. On...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vskills.in\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-12T08:49:38+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/\",\"name\":\"Task and node management in cluster - Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"datePublished\":\"2013-05-10T12:21:17+00:00\",\"dateModified\":\"2024-04-12T08:49:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Task and node management in cluster\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"name\":\"Tutorial\",\"description\":\"Vskills - A initiative in elearning and certification\",\"publisher\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\",\"name\":\"Vskills\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"contentUrl\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"width\":73,\"height\":55,\"caption\":\"Vskills\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vskills.in\/\",\"https:\/\/x.com\/vskills_in\",\"https:\/\/www.linkedin.com\/company-beta\/1371554\/\",\"https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Task and node management in cluster - Tutorial","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/","og_locale":"en_US","og_type":"article","og_title":"Task and node management in cluster - Tutorial","og_description":"For small clusters, it is recommended designating one node in your cluster as the HBase Master node. On this node, you will typically run the HBase Master and a ZooKeeper quorum peer. These master processes may be collocated with the Hadoop NameNode and JobTracker for small clusters. Designate the remaining nodes as RegionServer nodes. On...","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T08:49:38+00:00","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/","name":"Task and node management in cluster - Tutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"datePublished":"2013-05-10T12:21:17+00:00","dateModified":"2024-04-12T08:49:38+00:00","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/task-and-node-management-in-cluster\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Task and node management in cluster"}]},{"@type":"WebSite","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","name":"Tutorial","description":"Vskills - A initiative in elearning and certification","publisher":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization","name":"Vskills","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","contentUrl":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","width":73,"height":55,"caption":"Vskills"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vskills.in\/","https:\/\/x.com\/vskills_in","https:\/\/www.linkedin.com\/company-beta\/1371554\/","https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw"]}]}},"_links":{"self":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/20779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/comments?post=20779"}],"version-history":[{"count":7,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/20779\/revisions"}],"predecessor-version":[{"id":127357,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/20779\/revisions\/127357"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=20779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=20779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=20779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}