Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection.close()方法阻塞 #15

Open
ihadoop opened this issue Aug 12, 2013 · 2 comments
Open

connection.close()方法阻塞 #15

ihadoop opened this issue Aug 12, 2013 · 2 comments

Comments

@ihadoop
Copy link

ihadoop commented Aug 12, 2013

名称: main-SendThread(hx2:2181)
状态: RUNNABLE
总阻止数: 5, 总等待数: 0

堆栈跟踪:
sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)

  • 已锁定sun.nio.ch.Util$2@74d6041c
  • 已锁定java.util.Collections$UnmodifiableSet@ea80631
  • 已锁定sun.nio.ch.WindowsSelectorImpl@392e827b
    sun.nio.ch.SelectorImpl.select(Unknown Source)
    org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:338)
    org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
@jaywong85
Copy link
Contributor

代码怎么写的呢。我试了下没这种情况

@ihadoop
Copy link
Author

ihadoop commented Sep 2, 2013

Properties prop = new Properties();

    prop.setProperty("wasp.zookeeper.quorum", "192.168.6.152,192.168.6.154,192.168.6.155,192.168.6.156");

    prop.setProperty("wasp.zookeeper.property.clientPort","2181");

    com.alibaba.wasp.jdbc.Driver.load();
    Connection conn = DriverManager.getConnection("jdbc:wasp:", prop);
    conn.setAutoCommit(false);


    Statement  stat = conn.createStatement();

    ResultSet rs = stat.executeQuery("select *   from WP_T_PASSCAR_YYYY_MM  where   WK_KKID='1398000004' AND WP_CAPTIME>1 and WP_CAPTIME<1376292466807");

    long l = System.currentTimeMillis();
    int k=0;
    while(rs.next())
    {
        System.out.println(rs.getString("WP_CARPLATE"));
        k++;
    }

    System.out.println(System.currentTimeMillis()-l);
    System.out.println(k);
    stat.close();
    conn.close();

------------------ 原始邮件 ------------------
发件人: "jaywong"[email protected];
发送时间: 2013年9月2日(星期一) 下午3:25
收件人: "alibaba/wasp"[email protected];
抄送: "sunshine"[email protected];
主题: Re: [wasp] connection.close()方法阻塞 (#15)

代码怎么写的呢。我试了下没这种情况


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants