Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.ql.lockmgr.HiveTxnManager;
import org.apache.hadoop.hive.ql.plan.HiveOperation;
import org.apache.hadoop.hive.ql.session.LineageState;
import org.apache.hadoop.hive.ql.session.SessionState;
import org.apache.hadoop.mapreduce.MRJobConfig;
import org.apache.tez.dag.api.TezConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The class to store query level info such as queryId. Multiple queries can run
* in the same session, so SessionState is to hold common session related info, and
* each QueryState is to hold query related info.
*/
public class QueryState {
private static final Logger LOG = LoggerFactory.getLogger(QueryState.class);
/**
* current configuration.
*/
private final HiveConf queryConf;
/**
* type of the command.
*/
private HiveOperation commandType;
/**
* Per-query Lineage state to track what happens in the query
*/
private LineageState lineageState = new LineageState();
/**
* transaction manager used in the query.
*/
private HiveTxnManager txnManager;
/**
* Holds the number of rows affected for insert queries.
*/
private long numModifiedRows = 0;
static public final String USERID_TAG = "userid";
/**
* map of resources involved in the query.
*/
private final Map resourceMap = new HashMap<>();
/**
* Cache of HMS requests/responses utilized by SessionHiveMetaStoreClient.
*/
private Map