hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Szehon Ho" <sze...@cloudera.com>
Subject Review Request 15212: HIVE-5730: Beeline throws non-terminal NPE upon starting, after mavenization
Date Mon, 04 Nov 2013 21:19:57 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15212/
-----------------------------------------------------------

Review request for hive.


Repository: hive-git


Description
-------

This issue was found after building the assembly bin.  The issue was, sql-keyword.properties
was moved after mavenization from src/main/java/org/apache/hive/beeline/sql-keyword.properties
to src/main/resources/sql-keyword.properties.

According to Class.getResourceAsStream javadoc:

"This method delegates to this object's class loader. If this object was loaded by the bootstrap
class loader, the method delegates to ClassLoader.getSystemResourceAsStream.

Before delegation, an absolute resource name is constructed from the given resource name using
this algorithm:

If the name begins with a '/' ('\u002f'), then the absolute name of the resource is the portion
of the name following the '/'.
Otherwise, the absolute name is of the following form:
modified_package_name/name

Where the modified_package_name is the package name of this object with '/' substituted for
'.' ('\u002e')."

So now I am putting a '/' in front of the resource-name so classloader looks in the new location
(without package name).


Diffs
-----

  beeline/src/java/org/apache/hive/beeline/SQLCompletor.java 916c7fc 

Diff: https://reviews.apache.org/r/15212/diff/


Testing
-------

Manually verified by starting assembly bin Beeline, and seeing that no NPE is thrown, and
that SQLCompletion works.


Thanks,

Szehon Ho


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message