You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jd...@apache.org on 2014/08/09 03:21:14 UTC
svn commit: r1616909 -
/hive/trunk/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
Author: jdere
Date: Sat Aug 9 01:21:13 2014
New Revision: 1616909
URL: http://svn.apache.org/r1616909
Log:
HIVE-7637: Change throws clause for Hadoop23Shims.ProxyFileSystem23.access() (Jason Dere, reviewed by Thejas Nair)
Modified:
hive/trunk/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
Modified: hive/trunk/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
URL: http://svn.apache.org/viewvc/hive/trunk/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java?rev=1616909&r1=1616908&r2=1616909&view=diff
==============================================================================
--- hive/trunk/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java (original)
+++ hive/trunk/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java Sat Aug 9 01:21:13 2014
@@ -664,15 +664,25 @@ public class Hadoop23Shims extends Hadoo
* the version of hadoop used to build Hive.
*/
public void access(Path path, FsAction action) throws AccessControlException,
- FileNotFoundException, IOException, Exception {
+ FileNotFoundException, IOException {
Path underlyingFsPath = swizzleParamPath(path);
FileStatus underlyingFsStatus = fs.getFileStatus(underlyingFsPath);
- if (accessMethod != null) {
- accessMethod.invoke(fs, underlyingFsPath, action);
- } else {
- // If the FS has no access() method, we can try DefaultFileAccess ..
- UserGroupInformation ugi = getUGIForConf(getConf());
- DefaultFileAccess.checkFileAccess(fs, underlyingFsStatus, action);
+ try {
+ if (accessMethod != null) {
+ accessMethod.invoke(fs, underlyingFsPath, action);
+ } else {
+ // If the FS has no access() method, we can try DefaultFileAccess ..
+ UserGroupInformation ugi = getUGIForConf(getConf());
+ DefaultFileAccess.checkFileAccess(fs, underlyingFsStatus, action);
+ }
+ } catch (AccessControlException err) {
+ throw err;
+ } catch (FileNotFoundException err) {
+ throw err;
+ } catch (IOException err) {
+ throw err;
+ } catch (Exception err) {
+ throw new RuntimeException(err.getMessage(), err);
}
}
}