@Override public String toString() { return "SessionHandle [" + getHandleIdentifier() + "]"; } }
public UUID getSessionId() { return getHandleIdentifier().getPublicId(); }
@Override public void setOperationLogSessionDir(File operationLogRootDir) { if (!operationLogRootDir.exists()) { LOG.warn("The operation log root directory is removed, recreating:" + operationLogRootDir.getAbsolutePath()); if (!operationLogRootDir.mkdirs()) { LOG.warn("Unable to create operation log root directory: " + operationLogRootDir.getAbsolutePath()); } } if (!operationLogRootDir.canWrite()) { LOG.warn("The operation log root directory is not writable: " + operationLogRootDir.getAbsolutePath()); } sessionLogDir = new File(operationLogRootDir, sessionHandle.getHandleIdentifier().toString()); isOperationLogEnabled = true; if (!sessionLogDir.exists()) { if (!sessionLogDir.mkdir()) { LOG.warn("Unable to create operation log session directory: " + sessionLogDir.getAbsolutePath()); isOperationLogEnabled = false; } } if (isOperationLogEnabled) { LOG.info("Operation log session directory is created: " + sessionLogDir.getAbsolutePath()); } }
public TSessionHandle toTSessionHandle() { TSessionHandle tSessionHandle = new TSessionHandle(); tSessionHandle.setSessionId(getHandleIdentifier().toTHandleIdentifier()); return tSessionHandle; }
public HiveSessionImpl(SessionHandle sessionHandle, TProtocolVersion protocol, String username, String password, HiveConf serverConf, String ipAddress, final List<String> forwardedAddresses) { this.username = username; this.password = password; creationTime = System.currentTimeMillis(); this.sessionHandle = sessionHandle != null ? sessionHandle : new SessionHandle(protocol); this.sessionConf = new HiveConf(serverConf); this.ipAddress = ipAddress; this.forwardedAddresses = forwardedAddresses; this.operationLock = serverConf.getBoolVar( ConfVars.HIVE_SERVER2_PARALLEL_OPS_IN_SESSION) ? null : new Semaphore(1); try { // In non-impersonation mode, map scheduler queue to current user // if fair scheduler is configured. if (! sessionConf.getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS) && sessionConf.getBoolVar(ConfVars.HIVE_SERVER2_MAP_FAIR_SCHEDULER_QUEUE)) { ShimLoader.getHadoopShims().refreshDefaultQueue(sessionConf, username); } } catch (IOException e) { LOG.warn("Error setting scheduler queue: " + e, e); } // Set an explicit session name to control the download directory name sessionConf.set(ConfVars.HIVESESSIONID.varname, this.sessionHandle.getHandleIdentifier().toString()); // Use thrift transportable formatter sessionConf.set(SerDeUtils.LIST_SINK_OUTPUT_FORMATTER, ThriftFormatter.class.getName()); sessionConf.setInt(SerDeUtils.LIST_SINK_OUTPUT_PROTOCOL, protocol.getValue()); }
@Override public String toString() { return "SessionHandle [" + getHandleIdentifier() + "]"; } }
@Override public String toString() { return "SessionHandle [" + getHandleIdentifier() + "]"; } }
@Override public String toString() { return "SessionHandle [" + getHandleIdentifier() + "]"; } }
@Override public String toString() { return "SessionHandle [" + getHandleIdentifier() + "]"; } }
@Override public String toString() { return "SessionHandle [" + getHandleIdentifier() + "]"; } }
public UUID getSessionId() { return getHandleIdentifier().getPublicId(); }
public UUID getSessionId() { return getHandleIdentifier().getPublicId(); }
public UUID getSessionId() { return getHandleIdentifier().getPublicId(); }
public UUID getSessionId() { return getHandleIdentifier().getPublicId(); }
@Override public String toString() { return getSessionHandle().getHandleIdentifier().toString(); }
public TSessionHandle toTSessionHandle() { TSessionHandle tSessionHandle = new TSessionHandle(); tSessionHandle.setSessionId(getHandleIdentifier().toTHandleIdentifier()); return tSessionHandle; }
public TSessionHandle toTSessionHandle() { TSessionHandle tSessionHandle = new TSessionHandle(); tSessionHandle.setSessionId(getHandleIdentifier().toTHandleIdentifier()); return tSessionHandle; }
public TSessionHandle toTSessionHandle() { TSessionHandle tSessionHandle = new TSessionHandle(); tSessionHandle.setSessionId(getHandleIdentifier().toTHandleIdentifier()); return tSessionHandle; }
public TSessionHandle toTSessionHandle() { TSessionHandle tSessionHandle = new TSessionHandle(); tSessionHandle.setSessionId(getHandleIdentifier().toTHandleIdentifier()); return tSessionHandle; }
public TSessionHandle toTSessionHandle() { TSessionHandle tSessionHandle = new TSessionHandle(); tSessionHandle.setSessionId(getHandleIdentifier().toTHandleIdentifier()); return tSessionHandle; }