accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ACCUMULO-2210) socket should be closed in MiniAccumuloClusterImpl#start()
Date Thu, 16 Jan 2014 22:35:20 GMT
Ted Yu created ACCUMULO-2210:
--------------------------------

             Summary: socket should be closed in MiniAccumuloClusterImpl#start()
                 Key: ACCUMULO-2210
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2210
             Project: Accumulo
          Issue Type: Bug
            Reporter: Ted Yu
            Priority: Minor


Here is related code:
{code}
      while (true) {
        try {
          Socket s = new Socket("localhost", config.getZooKeeperPort());
          s.getOutputStream().write("ruok\n".getBytes());
          s.getOutputStream().flush();
          byte buffer[] = new byte[100];
          int n = s.getInputStream().read(buffer);
          if (n == 4 && new String(buffer, 0, n).equals("imok"))
            break;
{code}
Socket s should be closed coming out of the loop.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message