public static HiveSession getProxy(HiveSession hiveSession, UserGroupInformation ugi) throws IllegalArgumentException, HiveSQLException { return (HiveSession)Proxy.newProxyInstance(HiveSession.class.getClassLoader(), new Class<?>[] {HiveSession.class}, new HiveSessionProxy(hiveSession, ugi)); }
session = HiveSessionProxy.getProxy(hiveSessionUgi, hiveSessionUgi.getSessionUgi()); hiveSessionUgi.setProxySession(session); } else {
@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object> () { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }
public static HiveSession getProxy(HiveSession hiveSession, UserGroupInformation ugi) throws IllegalArgumentException, HiveSQLException { return (HiveSession)Proxy.newProxyInstance(HiveSession.class.getClassLoader(), new Class<?>[] {HiveSession.class}, new HiveSessionProxy(hiveSession, ugi)); }
@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object>() { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }
session = HiveSessionProxy.getProxy(hiveSessionUgi, hiveSessionUgi.getSessionUgi()); hiveSessionUgi.setProxySession(session); } else {
public static HiveSession getProxy(HiveSession hiveSession, UserGroupInformation ugi) throws IllegalArgumentException, HiveSQLException { return (HiveSession)Proxy.newProxyInstance(HiveSession.class.getClassLoader(), new Class<?>[] {HiveSession.class}, new HiveSessionProxy(hiveSession, ugi)); }
@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object> () { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }
HiveSessionImplwithUGI sessionWithUGI = new HiveSessionImplwithUGI(protocol, username, password, hiveConf, ipAddress, delegationToken); session = HiveSessionProxy.getProxy(sessionWithUGI, sessionWithUGI.getSessionUgi()); sessionWithUGI.setProxySession(session); } else {
public static HiveSession getProxy(HiveSession hiveSession, UserGroupInformation ugi) throws IllegalArgumentException, HiveSQLException { return (HiveSession)Proxy.newProxyInstance(HiveSession.class.getClassLoader(), new Class<?>[] {HiveSession.class}, new HiveSessionProxy(hiveSession, ugi)); }
@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object> () { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }
HiveSessionImplwithUGI sessionWithUGI = new HiveSessionImplwithUGI(protocol, username, password, hiveConf, ipAddress, delegationToken); session = HiveSessionProxy.getProxy(sessionWithUGI, sessionWithUGI.getSessionUgi()); sessionWithUGI.setProxySession(session); } else {
public static HiveSession getProxy(HiveSession hiveSession, UserGroupInformation ugi) throws IllegalArgumentException, HiveSQLException { return (HiveSession)Proxy.newProxyInstance(HiveSession.class.getClassLoader(), new Class<?>[] {HiveSession.class}, new HiveSessionProxy(hiveSession, ugi)); }
@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object>() { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }
HiveSessionImplwithUGI sessionWithUGI = new HiveSessionImplwithUGI(protocol, username, password, hiveConf, ipAddress, delegationToken); session = HiveSessionProxy.getProxy(sessionWithUGI, sessionWithUGI.getSessionUgi()); sessionWithUGI.setProxySession(session); } else {
public static HiveSession getProxy(HiveSession hiveSession, UserGroupInformation ugi) throws IllegalArgumentException, HiveSQLException { return (HiveSession)Proxy.newProxyInstance(HiveSession.class.getClassLoader(), new Class<?>[] {HiveSession.class}, new HiveSessionProxy(hiveSession, ugi)); }
@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object> () { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }
HiveSessionImplwithUGI sessionWithUGI = new HiveSessionImplwithUGI(protocol, username, password, hiveConf, ipAddress, delegationToken); session = HiveSessionProxy.getProxy(sessionWithUGI, sessionWithUGI.getSessionUgi()); sessionWithUGI.setProxySession(session); } else {