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 namenode IP addresses
063   * 
064   * @return the namenode IP addresses that the datanode is talking to
065   */
066  public String getNamenodeAddresses();
067  
068  /**
069   * Gets the information of each volume on the Datanode. Please
070   * see the implementation for the format of returned information.
071   * 
072   * @return the volume info
073   */
074  public String getVolumeInfo();
075  
076  /**
077   * Gets the cluster id.
078   * 
079   * @return the cluster id
080   */
081  public String getClusterId();
082
083  /**
084   * Returns an estimate of the number of Datanode threads
085   * actively transferring blocks.
086   */
087  public int getXceiverCount();
088
089  /**
090   * Gets the network error counts on a per-Datanode basis.
091   */
092  public Map<String, Map<String, Long>> getDatanodeNetworkCounts();
093}