Skip to content

Commit 4f6e514

Browse files
committed
same format
1 parent c07486e commit 4f6e514

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetastoreLeaseLeader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void setUp() throws Exception {
4444
MetastoreConf.setTimeVar(configuration, MetastoreConf.ConfVars.TXN_TIMEOUT, 1, TimeUnit.SECONDS);
4545
MetastoreConf.setTimeVar(configuration, MetastoreConf.ConfVars.LOCK_SLEEP_BETWEEN_RETRIES, 200, TimeUnit.MILLISECONDS);
4646
configuration.setBoolean(LeaseLeaderElection.METASTORE_RENEW_LEASE, false);
47-
configuration.setBoolean(LeaderElectionContext.LEADER_IN_TEST, true);
47+
configuration.setBoolean("metastore.leader.election.in.test", true);
4848
configuration.set("hive.txn.manager", "org.apache.hadoop.hive.ql.lockmgr.DbTxnManager");
4949

5050
setup(null, configuration);

itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetastoreLeaseNonLeader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void setUp() throws Exception {
5353
// start the non-leader hms now
5454
Configuration configuration = new Configuration(conf);
5555
MetastoreConf.setTimeVar(configuration, MetastoreConf.ConfVars.LOCK_SLEEP_BETWEEN_RETRIES, 1, TimeUnit.SECONDS);
56-
configuration.setBoolean(LeaderElectionContext.LEADER_IN_TEST, true);
56+
configuration.setBoolean("metastore.leader.election.in.test", true);
5757
setup(null, configuration);
5858
}
5959

standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/leader/LeaderElectionContext.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ public String getName() {
7777
// Collection of leader candidates
7878
private final List<LeaderElection> leaderElections = new ArrayList<>();
7979
// Property for testing, a single leader will be created
80-
public final static String LEADER_IN_TEST = "metastore.leader.election.in.test";
8180

8281
private LeaderElectionContext(String servHost, Configuration conf,
8382
Map<TTYPE, List<LeadershipStateListener>> listeners,
@@ -99,7 +98,7 @@ private LeaderElectionContext(String servHost, Configuration conf,
9998

10099
public void start() throws Exception {
101100
Map<TTYPE, List<LeadershipStateListener>> listenerMap = this.listeners;
102-
if (conf.getBoolean(LEADER_IN_TEST, false)) {
101+
if (conf.getBoolean("metastore.leader.election.in.test", false)) {
103102
Map<TTYPE, List<LeadershipStateListener>> newListeners = new HashMap<>();
104103
List<LeadershipStateListener> listeners = new ArrayList<>();
105104
listenerMap.forEach((k, v) -> listeners.addAll(v));

0 commit comments

Comments
 (0)