Return-Path: Delivered-To: apmail-incubator-chukwa-dev-archive@www.apache.org Received: (qmail 88069 invoked from network); 4 Nov 2010 23:56:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Nov 2010 23:56:32 -0000 Received: (qmail 32135 invoked by uid 500); 4 Nov 2010 23:57:03 -0000 Delivered-To: apmail-incubator-chukwa-dev-archive@incubator.apache.org Received: (qmail 32110 invoked by uid 500); 4 Nov 2010 23:57:02 -0000 Mailing-List: contact chukwa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chukwa-dev@incubator.apache.org Delivered-To: mailing list chukwa-dev@incubator.apache.org Received: (qmail 32099 invoked by uid 99); 4 Nov 2010 23:57:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Nov 2010 23:57:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Nov 2010 23:57:02 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oA4NufD2026465 for ; Thu, 4 Nov 2010 23:56:41 GMT Message-ID: <33159195.20601288915001538.JavaMail.jira@thor> Date: Thu, 4 Nov 2010 19:56:41 -0400 (EDT) From: "Eric Yang (JIRA)" To: chukwa-dev@incubator.apache.org Subject: [jira] Created: (CHUKWA-543) JSONException in hicc.log file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 JSONException in hicc.log file ------------------------------ Key: CHUKWA-543 URL: https://issues.apache.org/jira/browse/CHUKWA-543 Project: Chukwa Issue Type: Bug Components: User Interface Affects Versions: 0.4.0 Reporter: Eric Yang Assignee: Eric Yang Quote from mailing list: Hi all, We deployed chukwa on a 5 nodescluster where hadoop's version is hadoop 0.20.2 and chukwa's is 0.4.0. After some logs of NameNode were successfully collectected and processed by chukwa, we started hicc server. The hicc produced files listed below on HDFS, # bin/hadoop dfs -lsr /chukwa/hicc/views/ drwxr-xr-x - root supergroup 0 2010-11-04 13:01 /chukwa/hicc/views/public -rw-r--r-- 2 root supergroup 22177 2010-11-04 13:01 /chukwa/hicc/views/public/default.view -rw-r--r-- 2 root supergroup 236 2010-11-04 13:01 /chukwa/hicc/views/public/newview.tpl -rw-r--r-- 2 root supergroup 46 2010-11-04 13:01 /chukwa/hicc/views/public/view.permission -rw-r--r-- 2 root supergroup 103 2010-11-04 13:01 /chukwa/hicc/views/public/workspace_view_list.cache drwxr-xr-x - root supergroup 0 2010-11-04 13:01 /chukwa/hicc/views/users We digged into the hicc.log and found that it encountered some exceptions about JSON. 2010-11-04 14:00:16,954 ERROR btpool0-3 ViewBean - org.json.JSONException: JSONObject["owner"] not found. at org.json.JSONObject.get(JSONObject.java:283) at org.json.JSONObject.getString(JSONObject.java:409) at org.apache.hadoop.chukwa.rest.bean.ViewBean.(ViewBean.java:62) at org.apache.hadoop.chukwa.datastore.ViewStore.list(ViewStore.java:217) at org.apache.hadoop.chukwa.rest.resource.ViewResource.getUserViewList(ViewResource.java:159) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:156) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:166) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:114) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:74) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:114) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:66) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:658) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:616) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:607) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:309) /pathList at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) After further analysis, we found the problem is caused by at lines in ViewStore.list() String[] pathList = new String[2]; pathList[0]=viewPath.toString(); pathList[1]=publicViewPath; JSONArray list = new JSONArray(); for(String path : pathList) { Path viewFile = new Path(path); try { FileSystem fs = FileSystem.get(config); FileStatus[] fstatus = fs.listStatus(viewFile); if(fstatus!=null) { for(int i=0;i