{"action":"created","issue":{"url":"https://api.github.com/repos/apache/kafka/issues/1379","repository_url":"https://api.github.com/repos/apache/kafka","labels_url":"https://api.github.com/repos/apache/kafka/issues/1379/labels{/name}","comments_url":"https://api.github.com/repos/apache/kafka/issues/1379/comments","events_url":"https://api.github.com/repos/apache/kafka/issues/1379/events","html_url":"https://github.com/apache/kafka/pull/1379","id":154523638,"number":1379,"title":"MINOR: Fix bugs in KafkaStreams.close()","user":{"login":"jklukas","id":691060,"avatar_url":"https://avatars.githubusercontent.com/u/691060?v=3","gravatar_id":"","url":"https://api.github.com/users/jklukas","html_url":"https://github.com/jklukas","followers_url":"https://api.github.com/users/jklukas/followers","following_url":"https://api.github.com/users/jklukas/following{/other_user}","gists_url":"https://api.github.com/users/jklukas/gists{/gist_id}","starred_url":"https://api.github.com/users/jklukas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jklukas/subscriptions","organizations_url":"https://api.github.com/users/jklukas/orgs","repos_url":"https://api.github.com/users/jklukas/repos","events_url":"https://api.github.com/users/jklukas/events{/privacy}","received_events_url":"https://api.github.com/users/jklukas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-05-12T16:18:04Z","updated_at":"2016-05-12T18:21:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/1379","html_url":"https://github.com/apache/kafka/pull/1379","diff_url":"https://github.com/apache/kafka/pull/1379.diff","patch_url":"https://github.com/apache/kafka/pull/1379.patch"},"body":"Initially proposed by @ijuma in https://github.com/apache/kafka/pull/1362#issuecomment-218293662\r\n\r\n@mjsax commented:\r\n\r\n> StreamThread.close() should be extended to call metrics.close() (the class need a private member to reference the Metrics object, too)\r\n\r\nThe `Metrics` instance is created in the `KafkaStreams` constructor and shared between all threads, so closing it within the threads doesn't seem like the right approach. This PR calls `Metrics.close()` in `KafkaStreams.close()` instead.\r\n\r\ncc @guozhangwang "},"comment":{"url":"https://api.github.com/repos/apache/kafka/issues/comments/218842602","html_url":"https://github.com/apache/kafka/pull/1379#issuecomment-218842602","issue_url":"https://api.github.com/repos/apache/kafka/issues/1379","id":218842602,"user":{"login":"miguno","id":294849,"avatar_url":"https://avatars.githubusercontent.com/u/294849?v=3","gravatar_id":"","url":"https://api.github.com/users/miguno","html_url":"https://github.com/miguno","followers_url":"https://api.github.com/users/miguno/followers","following_url":"https://api.github.com/users/miguno/following{/other_user}","gists_url":"https://api.github.com/users/miguno/gists{/gist_id}","starred_url":"https://api.github.com/users/miguno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguno/subscriptions","organizations_url":"https://api.github.com/users/miguno/orgs","repos_url":"https://api.github.com/users/miguno/repos","events_url":"https://api.github.com/users/miguno/events{/privacy}","received_events_url":"https://api.github.com/users/miguno/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T18:21:13Z","updated_at":"2016-05-12T18:21:13Z","body":"> :streams:processTestResources UP-TO-DATE :streams:testClasses :streams:checkstyleTest[ant:checkstyle] /home/jenkins/jenkins-slave/workspace/kafka-trunk-git-pr-jdk7/streams/src/test/java/org/apache/kafka/streams/StreamsConfigTest.java:33:1: Disallowed import - org.hamcrest.CoreMatchers.equalTo. FAILED\r\n\r\nDoh.  What's weird is that we use `equalTo()` elsewhere in the Streams (integration) tests, so I am confused why this is a problem here."}}