Skip to content

Commit 20f72f5

Browse files
committed
HBASE-22186 Removed remaining usages of SnapshotDescriptionUtils.SNAPSHOT_TIMEOUT_MILLIS_KEY and SnapshotDescriptionUtils.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT
1 parent cd61bcc commit 20f72f5

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,8 +1169,9 @@ public void initialize(MasterServices master, MetricsMaster metricsMaster) throw
11691169
// get the configuration for the coordinator
11701170
Configuration conf = master.getConfiguration();
11711171
long wakeFrequency = conf.getInt(SNAPSHOT_WAKE_MILLIS_KEY, SNAPSHOT_WAKE_MILLIS_DEFAULT);
1172-
long timeoutMillis = Math.max(conf.getLong(SnapshotDescriptionUtils.SNAPSHOT_TIMEOUT_MILLIS_KEY,
1173-
SnapshotDescriptionUtils.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT),
1172+
long timeoutMillis = Math.max(
1173+
conf.getLong(SnapshotDescriptionUtils.MASTER_SNAPSHOT_TIMEOUT_MILLIS,
1174+
SnapshotDescriptionUtils.DEFAULT_MAX_WAIT_TIME),
11741175
conf.getLong(SnapshotDescriptionUtils.MASTER_SNAPSHOT_TIMEOUT_MILLIS,
11751176
SnapshotDescriptionUtils.DEFAULT_MAX_WAIT_TIME));
11761177
int opThreads = conf.getInt(SNAPSHOT_POOL_THREADS_KEY, SNAPSHOT_POOL_THREADS_DEFAULT);

hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -124,28 +124,11 @@ public CompletedSnaphotDirectoriesFilter(FileSystem fs) {
124124
/** Default value if no start time is specified */
125125
public static final long NO_SNAPSHOT_START_TIME_SPECIFIED = 0;
126126

127-
128127
public static final String MASTER_SNAPSHOT_TIMEOUT_MILLIS = "hbase.snapshot.master.timeout.millis";
129128

130129
/** By default, wait 300 seconds for a snapshot to complete */
131130
public static final long DEFAULT_MAX_WAIT_TIME = 60000 * 5 ;
132131

133-
134-
/**
135-
* By default, check to see if the snapshot is complete (ms)
136-
* @deprecated Use {@link #DEFAULT_MAX_WAIT_TIME} instead.
137-
* */
138-
@Deprecated
139-
public static final int SNAPSHOT_TIMEOUT_MILLIS_DEFAULT = 60000 * 5;
140-
141-
/**
142-
* Conf key for # of ms elapsed before injecting a snapshot timeout error when waiting for
143-
* completion.
144-
* @deprecated Use {@link #MASTER_SNAPSHOT_TIMEOUT_MILLIS} instead.
145-
*/
146-
@Deprecated
147-
public static final String SNAPSHOT_TIMEOUT_MILLIS_KEY = "hbase.snapshot.master.timeoutMillis";
148-
149132
private SnapshotDescriptionUtils() {
150133
// private constructor for utility class
151134
}
@@ -165,7 +148,7 @@ public static long getMaxMasterTimeout(Configuration conf, SnapshotDescription.T
165148
confKey = MASTER_SNAPSHOT_TIMEOUT_MILLIS;
166149
}
167150
return Math.max(conf.getLong(confKey, defaultMaxWaitTime),
168-
conf.getLong(SNAPSHOT_TIMEOUT_MILLIS_KEY, defaultMaxWaitTime));
151+
conf.getLong(MASTER_SNAPSHOT_TIMEOUT_MILLIS, defaultMaxWaitTime));
169152
}
170153

171154
/**

0 commit comments

Comments
 (0)