Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-1167

LP Bug: 1443597 - DcsServer should generate INFO event to log when waiting on DcsMaster start

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0-incubating
    • connectivity-dcs
    • None

    Description

      DcsMaster and DcsServers are started independently by the bin/dcs-start.sh script. DcsServers always check that DcsMaster is started in the getMaster() method shown below. A LOG.info event should be added so that user can see that DcsServers are waiting on Dcsmaster to start.

      private void getMaster() {
      boolean found = false;

      while (!found) {
      try {
      Stat stat = zkc.exists(parentZnode
      + Constants.DEFAULT_ZOOKEEPER_ZNODE_MASTER, false);
      if (stat != null) {
      List<String> nodes = zkc.getChildren(parentZnode
      + Constants.DEFAULT_ZOOKEEPER_ZNODE_MASTER, null);
      if (!nodes.isEmpty()) {
      StringTokenizer st = new StringTokenizer(nodes.get(0),
      ":");
      while (st.hasMoreTokens())

      { masterHostName = st.nextToken(); port = Integer.parseInt(st.nextToken()); portRange = Integer.parseInt(st.nextToken()); masterStartTime = Long.parseLong(st.nextToken()); }

      found = true;
      }
      }

      if (!found) {
      try

      { Thread.sleep(5000); }

      catch (InterruptedException e) {
      }
      }

      } catch (Exception e)

      { e.printStackTrace(); LOG.error(e); }

      }
      }

      Attachments

        Activity

          People

            matbrown Matt Brown
            matbrown Matt Brown
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: