3939import java .util .concurrent .TimeUnit ;
4040import java .util .concurrent .TimeoutException ;
4141import java .util .concurrent .atomic .AtomicReference ;
42- import javax .security .auth .login .LoginException ;
4342
4443import org .apache .commons .codec .digest .DigestUtils ;
4544import org .apache .commons .io .FilenameUtils ;
@@ -236,7 +235,7 @@ public static String makeSessionId() {
236235 return UUID .randomUUID ().toString ();
237236 }
238237
239- public void open () throws IOException , LoginException , URISyntaxException , TezException {
238+ public void open () throws IOException , URISyntaxException , TezException {
240239 String [] noFiles = null ;
241240 open (noFiles );
242241 }
@@ -246,24 +245,24 @@ public void open() throws IOException, LoginException, URISyntaxException, TezEx
246245 * submit multiple DAGs against a session (as long as they are executed serially).
247246 */
248247 public void open (String [] additionalFilesNotFromConf )
249- throws IOException , LoginException , URISyntaxException , TezException {
248+ throws IOException , URISyntaxException , TezException {
250249 openInternal (additionalFilesNotFromConf , false , null , null );
251250 }
252251
253252
254253 public void open (HiveResources resources )
255- throws LoginException , IOException , URISyntaxException , TezException {
254+ throws IOException , URISyntaxException , TezException {
256255 openInternal (null , false , null , resources );
257256 }
258257
259258 public void beginOpen (String [] additionalFiles , LogHelper console )
260- throws IOException , LoginException , URISyntaxException , TezException {
259+ throws IOException , URISyntaxException , TezException {
261260 openInternal (additionalFiles , true , console , null );
262261 }
263262
264263 protected void openInternal (String [] additionalFilesNotFromConf ,
265264 boolean isAsync , LogHelper console , HiveResources resources )
266- throws IOException , LoginException , URISyntaxException , TezException {
265+ throws IOException , URISyntaxException , TezException {
267266 // TODO Why is the queue name set again. It has already been setup via setQueueName. Do only one of the two.
268267 String confQueueName = conf .get (TezConfiguration .TEZ_QUEUE_NAME );
269268 if (queueName != null && !queueName .equals (confQueueName )) {
@@ -634,7 +633,7 @@ private void setupSessionAcls(Configuration tezConf, HiveConf hiveConf) throws
634633
635634 /** This is called in openInternal and in TezTask.updateSession to localize conf resources. */
636635 public void ensureLocalResources (Configuration conf , String [] newFilesNotFromConf )
637- throws IOException , LoginException , URISyntaxException , TezException {
636+ throws IOException , URISyntaxException , TezException {
638637 if (resources == null ) {
639638 throw new AssertionError ("Ensure called on an unitialized (or closed) session " + sessionId );
640639 }
@@ -820,12 +819,11 @@ private Path createTezDir(String sessionId, String suffix) throws IOException {
820819 * @param localJarPath Local path to the jar to be localized.
821820 * @return LocalResource corresponding to the localized hive exec resource.
822821 * @throws IOException when any file system related call fails.
823- * @throws LoginException when we are unable to determine the user.
824822 * @throws URISyntaxException when current jar location cannot be determined.
825823 */
826824 @ VisibleForTesting
827825 LocalResource createJarLocalResource (String localJarPath )
828- throws IOException , LoginException , IllegalArgumentException {
826+ throws IOException , IllegalArgumentException {
829827 // TODO Reduce the number of lookups that happen here. This shouldn't go to HDFS for each call.
830828 // The hiveJarDir can be determined once per client.
831829 FileStatus destDirStatus = utils .getHiveJarDirectory (conf );
@@ -854,19 +852,7 @@ private String getKey(final FileStatus fileStatus) {
854852 return fileStatus .getPath () + ":" + fileStatus .getLen () + ":" + fileStatus .getModificationTime ();
855853 }
856854
857- private void addJarLRByClassName (String className , final Map <String , LocalResource > lrMap ) throws
858- IOException , LoginException {
859- Class <?> clazz ;
860- try {
861- clazz = Class .forName (className );
862- } catch (ClassNotFoundException e ) {
863- throw new IOException ("Cannot find " + className + " in classpath" , e );
864- }
865- addJarLRByClass (clazz , lrMap );
866- }
867-
868- private void addJarLRByClass (Class <?> clazz , final Map <String , LocalResource > lrMap ) throws IOException ,
869- LoginException {
855+ private void addJarLRByClass (Class <?> clazz , final Map <String , LocalResource > lrMap ) throws IOException {
870856 String jarPath = Utilities .jarFinderGetJar (clazz );
871857 if (jarPath == null ) {
872858 throw new IOException ("Can't find jar for: " + clazz );
0 commit comments