001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.apache.hadoop.hdfs.server.datanode;
019
020import org.apache.hadoop.classification.InterfaceAudience;
021import org.apache.hadoop.classification.InterfaceStability;
022
023import java.util.Map;
024
025/**
026 * 
027 * This is the JMX management interface for data node information
028 */
029@InterfaceAudience.Public
030@InterfaceStability.Stable
031public interface DataNodeMXBean {
032  
033  /**
034   * Gets the version of Hadoop.
035   * 
036   * @return the version of Hadoop
037   */
038  public String getVersion();
039
040  /**
041   * Get the version of software running on the DataNode
042   *
043   * @return a string representing the version
044   */
045  public String getSoftwareVersion();
046
047  /**
048   * Gets the rpc port.
049   * 
050   * @return the rpc port
051   */
052  public String getRpcPort();
053  
054  /**
055   * Gets the http port.
056   * 
057   * @return the http port
058   */
059  public String getHttpPort();
060
061  /**
062   * Gets the data port.
063   *
064   * @return the data port
065   */
066  String getDataPort();
067
068  /**
069   * Gets the namenode IP addresses.
070   * 
071   * @return the namenode IP addresses that the datanode is talking to
072   */
073  public String getNamenodeAddresses();
074
075  /**
076   * Gets information of the block pool service actors.
077   *
078   * @return block pool service actors info
079   */
080  String getBPServiceActorInfo();
081
082  /**
083   * Gets the information of each volume on the Datanode. Please
084   * see the implementation for the format of returned information.
085   * 
086   * @return the volume info
087   */
088  public String getVolumeInfo();
089  
090  /**
091   * Gets the cluster id.
092   * 
093   * @return the cluster id
094   */
095  public String getClusterId();
096
097  /**
098   * Returns an estimate of the number of Datanode threads
099   * actively transferring blocks.
100   */
101  public int getXceiverCount();
102
103  /**
104   * Gets the network error counts on a per-Datanode basis.
105   */
106  public Map<String, Map<String, Long>> getDatanodeNetworkCounts();
107
108  /**
109   * Gets the diskBalancer Status.
110   * Please see implementation for the format of the returned information.
111   *
112   * @return  DiskBalancer Status
113   */
114  String getDiskBalancerStatus();
115}