/** * Constructor. We do not automatically connect, because we only want to * load tez classes when the user has tez installed. */ public TezSessionState(String sessionId, HiveConf conf) { this(DagUtils.getInstance(), conf); this.sessionId = sessionId; }
public TezTask() { this(DagUtils.getInstance()); }
/** * Constructor. We do not automatically connect, because we only want to * load tez classes when the user has tez installed. */ public TezSessionState(String sessionId) { this(DagUtils.getInstance()); this.sessionId = sessionId; }
public TezTask() { this(DagUtils.getInstance()); }
ShimLoader.getHadoopShims(); URL hiveurl = new URL("jar:" + DagUtils.getInstance().getExecJarPathLocal(conf) + "!/"); JarURLConnection hiveconn = (JarURLConnection)hiveurl.openConnection(); JarFile hivejar = hiveconn.getJarFile();
ShimLoader.getHadoopShims(); URL hiveurl = new URL("jar:"+DagUtils.getInstance().getExecJarPathLocal()+"!/"); JarURLConnection hiveconn = (JarURLConnection)hiveurl.openConnection(); JarFile hivejar = hiveconn.getJarFile();
dag.setCredentials(job.getCredentials()); DagUtils utils = DagUtils.getInstance(); Context ctx = new Context(job); MapWork mapWork = (MapWork) work.getAllWork().get(0);
dag.setCredentials(job.getCredentials()); DagUtils utils = DagUtils.getInstance(); Context ctx = new Context(job); MapWork mapWork = (MapWork) work.getAllWork().get(0);
@Test public void testCredentialsNotOverwritten() throws Exception { final UserGroupInformation testUser = UserGroupInformation.createUserForTesting("test_user", new String[0]); final DagUtils dagUtils = DagUtils.getInstance(); Credentials originalCredentials = new Credentials(); final Text testTokenAlias = new Text("my_test_token"); @SuppressWarnings("unchecked") Token<? extends TokenIdentifier> testToken = mock(Token.class); originalCredentials.addToken(testTokenAlias, testToken); Credentials testUserCredentials = new Credentials(); testUser.addCredentials(testUserCredentials); final BaseWork work = mock(BaseWork.class); final DAG dag = DAG.create("test_credentials_dag"); dag.setCredentials(originalCredentials); testUser.doAs(new PrivilegedExceptionAction<Void>() { @Override public Void run() throws Exception { dagUtils.addCredentials(work, dag); return null; } }); Token<? extends TokenIdentifier> actualToken = dag.getCredentials().getToken(testTokenAlias); assertEquals(testToken, actualToken); }
jc = DagUtils.getInstance().createConfiguration(conf); } catch (IOException e) { throw new HiveException(e);
jc = DagUtils.getInstance().createConfiguration(conf); } catch (IOException e) { throw new HiveException(e);
/** * Constructor. We do not automatically connect, because we only want to * load tez classes when the user has tez installed. */ public TezSessionState(String sessionId) { this(DagUtils.getInstance()); this.sessionId = sessionId; }
public TezTask() { this(DagUtils.getInstance()); }
ShimLoader.getHadoopShims(); URL hiveurl = new URL("jar:"+DagUtils.getInstance().getExecJarPathLocal()+"!/"); JarURLConnection hiveconn = (JarURLConnection)hiveurl.openConnection(); JarFile hivejar = hiveconn.getJarFile();