/** * Get a new <code>TUGIContainingTransport</code> instance, or reuse the * existing one if a <code>TUGIContainingTransport</code> has already been * created before using the given <code>TTransport</code> as an underlying * transport. This ensures that a given underlying transport instance * receives the same <code>TUGIContainingTransport</code>. */ @Override public TUGIContainingTransport getTransport(TTransport trans) { // UGI information is not available at connection setup time, it will be set later // via set_ugi() rpc. TUGIContainingTransport tugiTrans = transMap.get(trans); if (tugiTrans == null) { tugiTrans = new TUGIContainingTransport(trans); TUGIContainingTransport prev = transMap.putIfAbsent(trans, tugiTrans); if (prev != null) { return prev; } } return tugiTrans; } }
IllegalAccessException, InvocationTargetException{ UserGroupInformation clientUgi = ugiTrans.getClientUGI(); if( null != clientUgi){ throw new TException(new IllegalStateException("UGI is already set. Resetting is not " + List<String> principals = result.getSuccess(); ugiTrans.setClientUGI(shim.createRemoteUser(principals.remove(principals.size()-1), principals)); oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.REPLY, msg.seqid));
@Override protected void setIpAddress(final TProtocol in) { TUGIContainingTransport ugiTrans = (TUGIContainingTransport)in.getTransport(); Socket socket = ugiTrans.getSocket(); if (socket != null) { setIpAddress(socket); } } }
UserGroupInformation clientUgi = ugiTrans.getClientUGI(); if (null == clientUgi){
IllegalAccessException, InvocationTargetException{ UserGroupInformation clientUgi = ugiTrans.getClientUGI(); if( null != clientUgi){ throw new TException(new IllegalStateException("UGI is already set. Resetting is not " + List<String> principals = result.getSuccess(); ugiTrans.setClientUGI(UserGroupInformation.createRemoteUser(principals.remove(principals.size()-1))); oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.REPLY, msg.seqid)); result.write(oprot);
@Override protected void setIpAddress(final TProtocol in) { TUGIContainingTransport ugiTrans = (TUGIContainingTransport)in.getTransport(); Socket socket = ugiTrans.getSocket(); if (socket != null) { setIpAddress(socket); } } }
UserGroupInformation clientUgi = ugiTrans.getClientUGI(); if (null == clientUgi){
IllegalAccessException, InvocationTargetException{ UserGroupInformation clientUgi = ugiTrans.getClientUGI(); if( null != clientUgi){ throw new TException(new IllegalStateException("UGI is already set. Resetting is not " + List<String> principals = result.getSuccess(); ugiTrans.setClientUGI(UserGroupInformation.createRemoteUser(principals.remove(principals.size()-1))); oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.REPLY, msg.seqid)); result.write(oprot);
/** * Get a new <code>TUGIContainingTransport</code> instance, or reuse the * existing one if a <code>TUGIContainingTransport</code> has already been * created before using the given <code>TTransport</code> as an underlying * transport. This ensures that a given underlying transport instance * receives the same <code>TUGIContainingTransport</code>. */ @Override public TUGIContainingTransport getTransport(TTransport trans) { // UGI information is not available at connection setup time, it will be set later // via set_ugi() rpc. transMap.putIfAbsent(trans, new TUGIContainingTransport(trans)); return transMap.get(trans); } }
@Override protected void setIpAddress(final TProtocol in) { TUGIContainingTransport ugiTrans = (TUGIContainingTransport)in.getTransport(); Socket socket = ugiTrans.getSocket(); if (socket != null) { setIpAddress(socket); } } }
UserGroupInformation clientUgi = ugiTrans.getClientUGI(); if (null == clientUgi){
/** * Get a new <code>TUGIContainingTransport</code> instance, or reuse the * existing one if a <code>TUGIContainingTransport</code> has already been * created before using the given <code>TTransport</code> as an underlying * transport. This ensures that a given underlying transport instance * receives the same <code>TUGIContainingTransport</code>. */ @Override public TUGIContainingTransport getTransport(TTransport trans) { // UGI information is not available at connection setup time, it will be set later // via set_ugi() rpc. TUGIContainingTransport tugiTrans = transMap.get(trans); if (tugiTrans == null) { tugiTrans = new TUGIContainingTransport(trans); TUGIContainingTransport prev = transMap.putIfAbsent(trans, tugiTrans); if (prev != null) { return prev; } } return tugiTrans; } }
/** * Get a new <code>TUGIContainingTransport</code> instance, or reuse the * existing one if a <code>TUGIContainingTransport</code> has already been * created before using the given <code>TTransport</code> as an underlying * transport. This ensures that a given underlying transport instance * receives the same <code>TUGIContainingTransport</code>. */ @Override public TUGIContainingTransport getTransport(TTransport trans) { // UGI information is not available at connection setup time, it will be set later // via set_ugi() rpc. TUGIContainingTransport tugiTrans = transMap.get(trans); if (tugiTrans == null) { tugiTrans = new TUGIContainingTransport(trans); TUGIContainingTransport prev = transMap.putIfAbsent(trans, tugiTrans); if (prev != null) { return prev; } } return tugiTrans; } }
/** * Get a new <code>TUGIContainingTransport</code> instance, or reuse the * existing one if a <code>TUGIContainingTransport</code> has already been * created before using the given <code>TTransport</code> as an underlying * transport. This ensures that a given underlying transport instance * receives the same <code>TUGIContainingTransport</code>. */ @Override public TUGIContainingTransport getTransport(TTransport trans) { // UGI information is not available at connection setup time, it will be set later // via set_ugi() rpc. TUGIContainingTransport tugiTrans = transMap.get(trans); if (tugiTrans == null) { tugiTrans = new TUGIContainingTransport(trans); TUGIContainingTransport prev = transMap.putIfAbsent(trans, tugiTrans); if (prev != null) { return prev; } } return tugiTrans; } }