cloudera/cdk-examples — pull request #10 by tomwheeler (2013-11-14 20:58:52+00:00)
Title: Updated to add 'invalidate metadata' step (and change checkout -> clone)

The first change simply corrects the git command on line 22 from 'checkout' to 'clone'.

The more substantial change relates to an error I encountered while running this today. Without invalidating the metadata, queries executed via the JSP or impala-shell failed. This was on the 4.3.0 Quickstart VM with Impala 1.1.1 (though I don't claim the problem is limited to that environment). Here's a stacktrace from all_sessions.jsp:

org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException:
refresh sessions
: AnalysisException: Table does not exist: default.sessions
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

I also tried to refresh that specific table from the impala-shell, but it wasn't enough:

[cloudera@localhost demo]$ impala-shell -q 'refresh sessions'
Starting Impala Shell in unsecure mode
Connected to localhost.localdomain:21000
Server version: impalad version 1.1.1 RELEASE (build 83d5868f005966883a918a819a449f636a5b3d5f)
Query: refresh sessions
ERROR: AnalysisException: Table does not exist: default.sessions
Could not execute command: refresh sessions

Once I invalidated the metadata as noted here, refreshing the page for all_sessions.jsp showed the expected results. I was also able to query the sessions table using impala-shell.