private void printMetaMasterInfo() throws IOException {
    mIndentationLevel++;
    Set<MasterInfoField> masterInfoFilter = new HashSet<>(Arrays
        .asList(MasterInfoField.LEADER_MASTER_ADDRESS, MasterInfoField.WEB_PORT,
            MasterInfoField.RPC_PORT, MasterInfoField.START_TIME_MS,
            MasterInfoField.UP_TIME_MS, MasterInfoField.VERSION,
            MasterInfoField.SAFE_MODE, MasterInfoField.ZOOKEEPER_ADDRESSES));
    MasterInfo masterInfo = mMetaMasterClient.getMasterInfo(masterInfoFilter);

    print("Master Address: " + masterInfo.getLeaderMasterAddress());
    print("Web Port: " + masterInfo.getWebPort());
    print("Rpc Port: " + masterInfo.getRpcPort());
    print("Started: " + CommonUtils.convertMsToDate(masterInfo.getStartTimeMs(),
        mDateFormatPattern));
    print("Uptime: " + CommonUtils.convertMsToClockTime(masterInfo.getUpTimeMs()));
    print("Version: " + masterInfo.getVersion());
    print("Safe Mode: " + masterInfo.getSafeMode());

    List<String> zookeeperAddresses = masterInfo.getZookeeperAddressesList();
    if (zookeeperAddresses == null || zookeeperAddresses.isEmpty()) {
      print("Zookeeper Enabled: false");
    } else {
      print("Zookeeper Enabled: true");
      print("Zookeeper Addresses: ");
      mIndentationLevel++;
      for (String zkAddress : zookeeperAddresses) {
        print(zkAddress);
      }
      mIndentationLevel--;
    }
  }
private void printMetaMasterInfo ( ) throws IOException { mIndentationLevel ++ ; Set < MasterInfoField > masterInfoFilter = new HashSet < > ( Arrays . asList ( MasterInfoField . LEADER_MASTER_ADDRESS , MasterInfoField . WEB_PORT , MasterInfoField . RPC_PORT , MasterInfoField . START_TIME_MS , MasterInfoField . UP_TIME_MS , MasterInfoField . VERSION , MasterInfoField . SAFE_MODE , MasterInfoField . ZOOKEEPER_ADDRESSES ) ) ; MasterInfo masterInfo = mMetaMasterClient . getMasterInfo ( masterInfoFilter ) ; print ( "Master Address: " + masterInfo . getLeaderMasterAddress ( ) ) ; print ( "Web Port: " + masterInfo . getWebPort ( ) ) ; print ( "Rpc Port: " + masterInfo . getRpcPort ( ) ) ; print ( "Started: " + CommonUtils . convertMsToDate ( masterInfo . getStartTimeMs ( ) , mDateFormatPattern ) ) ; print ( "Uptime: " + CommonUtils . convertMsToClockTime ( masterInfo . getUpTimeMs ( ) ) ) ; print ( "Version: " + masterInfo . getVersion ( ) ) ; print ( "Safe Mode: " + masterInfo . getSafeMode ( ) ) ; List < String > zookeeperAddresses = masterInfo . getZookeeperAddressesList ( ) ; if ( zookeeperAddresses == null || zookeeperAddresses . isEmpty ( ) ) { print ( "Zookeeper Enabled: false" ) ; } else { print ( "Zookeeper Enabled: true" ) ; print ( "Zookeeper Addresses: " ) ; mIndentationLevel ++ ; for ( String zkAddress : zookeeperAddresses ) { print ( zkAddress ) ; } mIndentationLevel -- ; } }
Prints Alluxio meta master information.