String loc(String res, Object[] params) {
    try {
      return MessageFormat.format(resourceBundle.getString(res), params);
    } catch (Exception e) {
      e.printStackTrace(getErrorStream());
      try {
        return res + ": " + Arrays.asList(params);
      } catch (Exception e2) {
        return res;
      }
    }
  }
A console SQL shell with command completion.
<p>
TODO:
<ul>
<li>User-friendly connection prompts</li>
<li>Page results</li>
<li>Handle binary data (blob fields)</li>
<li>Implement command aliases</li>
<li>Stored procedure execution</li>
<li>Binding parameters to prepared statements</li>
<li>Scripting language</li>
<li>XA transactions</li>
</ul>
beeline/src/java/org/apache/hive/beeline/BeeLine.java