Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.conf.HiveConfForTest;
import org.apache.hadoop.hive.metastore.api.MetaException;
import org.apache.hadoop.hive.metastore.handler.BaseHandler;
import org.apache.hadoop.hive.ql.DriverFactory;
import org.apache.hadoop.hive.ql.IDriver;
import org.apache.hadoop.hive.ql.metadata.Hive;
Expand Down Expand Up @@ -55,8 +56,7 @@ public class TestMetastoreVersion {

@Before
public void setUp() throws Exception {

Field defDb = HMSHandler.class.getDeclaredField("currentUrl");
Field defDb = BaseHandler.class.getDeclaredField("currentUrl");
defDb.setAccessible(true);
defDb.set(null, null);
// reset defaults
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.Optional;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hive.metastore.handler.BaseHandler;
import org.apache.hadoop.hive.metastore.txn.TxnStore;
import org.apache.hadoop.hive.metastore.txn.TxnUtils;

Expand All @@ -38,7 +39,7 @@ public final class HMSHandlerContext {
private TxnStore txnStore;

// Thread local HMSHandler used during shutdown to notify meta listeners
private HMSHandler hmsHandler;
private BaseHandler hmsHandler;

// Thread local configuration is needed as many threads could make changes
// to the conf using the connection hook
Expand All @@ -61,7 +62,7 @@ public static Optional<RawStore> getRawStore() {
return Optional.ofNullable(context.get().rawStore);
}

public static Optional<HMSHandler> getHMSHandler() {
public static Optional<BaseHandler> getHMSHandler() {
return Optional.ofNullable(context.get().hmsHandler);
}

Expand Down Expand Up @@ -96,7 +97,7 @@ public static void setTxnStore(TxnStore txnStore) {
context.get().txnStore = txnStore;
}

public static void setHMSHandler(HMSHandler hmsHandler) {
public static void setHMSHandler(BaseHandler hmsHandler) {
context.get().hmsHandler = hmsHandler;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static boolean updateConnectionURL(Configuration originalConf, Configuration act
return false;
}

static String getConnectionURL(Configuration conf) {
public static String getConnectionURL(Configuration conf) {
return MetastoreConf.getVar(conf, ConfVars.CONNECT_URL_KEY, "");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore;
import org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Iface;
import org.apache.hadoop.hive.metastore.handler.BaseHandler;
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.TSocket;
Expand Down Expand Up @@ -56,6 +57,6 @@ protected void setIpAddress(final TProtocol in) {
}

protected void setIpAddress(final Socket inSocket) {
HMSHandler.setThreadLocalIpAddress(inSocket.getInetAddress().getHostAddress());
BaseHandler.setThreadLocalIpAddress(inSocket.getInetAddress().getHostAddress());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public final class TransactionalValidationListener extends MetaStorePreEventList

private final Set<String> supportedCatalogs = new HashSet<String>();

TransactionalValidationListener(Configuration conf) {
public TransactionalValidationListener(Configuration conf) {
super(conf);
supportedCatalogs.add("hive");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@

import com.google.common.annotations.VisibleForTesting;

import static org.apache.hadoop.hive.metastore.HMSHandler.getPartValsFromName;
import static org.apache.hadoop.hive.metastore.utils.MetaStoreServerUtils.findStaleColumns;
import static org.apache.hadoop.hive.metastore.utils.MetaStoreServerUtils.getPartValsFromName;
import static org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.getDefaultCatalog;
import static org.apache.hadoop.hive.metastore.utils.StringUtils.normalizeIdentifier;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@
import java.util.stream.Collectors;

import static org.apache.hadoop.hive.common.StatsSetupConst.COLUMN_STATS_ACCURATE;
import static org.apache.hadoop.hive.metastore.HMSHandler.getPartValsFromName;
import static org.apache.hadoop.hive.metastore.directsql.MetastoreDirectSqlUtils.extractSqlClob;
import static org.apache.hadoop.hive.metastore.directsql.MetastoreDirectSqlUtils.extractSqlInt;
import static org.apache.hadoop.hive.metastore.directsql.MetastoreDirectSqlUtils.extractSqlLong;
import static org.apache.hadoop.hive.metastore.directsql.MetastoreDirectSqlUtils.getModelIdentity;
import static org.apache.hadoop.hive.metastore.utils.MetaStoreServerUtils.getPartValsFromName;

/**
* This class contains the optimizations for MetaStore that rely on direct SQL access to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.apache.hadoop.hive.metastore.HMSHandler.getPartValsFromName;
import static org.apache.hadoop.hive.metastore.utils.MetaStoreServerUtils.canUpdateStats;
import static org.apache.hadoop.hive.metastore.utils.MetaStoreServerUtils.getPartValsFromName;
import static org.apache.hadoop.hive.metastore.utils.MetaStoreServerUtils.updatePartitionStatsFast;
import static org.apache.hadoop.hive.metastore.utils.MetaStoreServerUtils.validatePartitionNameCharacters;
import static org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.getDefaultCatalog;
Expand Down
Loading
Loading