public static DelegationTokenIdentifier extractIdentifier ( final Token < ? extends DelegationTokenIdentifier > token ) throws IOException { checkArgument ( token != null , "null token" ) ; DelegationTokenIdentifier identifier ; // harden up decode beyond what Token does itself try { identifier = token . decodeIdentifier ( ) ; } catch ( RuntimeException e ) { Throwable cause = e . getCause ( ) ; if ( cause != null ) { // its a wrapping around class instantiation. throw new DelegationTokenIOException ( "Decoding GCS token " + cause , cause ) ; } throw e ; } if ( identifier == null ) { throw new DelegationTokenIOException ( "Failed to unmarshall token " + token ) ; } return identifier ; }
From a token get the session token identifier .