HBASE-22186 Removed remaining usages of SnapshotDescriptionUtils.SNAPSHOT_TIMEOUT_MILLIS_KEY and SnapshotDescriptionUtils.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT

This commit is contained in:
Jan Hentschel 2019-04-08 09:32:19 +02:00
parent cd61bcc01e
commit 20f72f5e25
2 changed files with 4 additions and 20 deletions

View File

@ -1169,8 +1169,9 @@ public class SnapshotManager extends MasterProcedureManager implements Stoppable
// get the configuration for the coordinator
Configuration conf = master.getConfiguration();
long wakeFrequency = conf.getInt(SNAPSHOT_WAKE_MILLIS_KEY, SNAPSHOT_WAKE_MILLIS_DEFAULT);
long timeoutMillis = Math.max(conf.getLong(SnapshotDescriptionUtils.SNAPSHOT_TIMEOUT_MILLIS_KEY,
SnapshotDescriptionUtils.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT),
long timeoutMillis = Math.max(
conf.getLong(SnapshotDescriptionUtils.MASTER_SNAPSHOT_TIMEOUT_MILLIS,
SnapshotDescriptionUtils.DEFAULT_MAX_WAIT_TIME),
conf.getLong(SnapshotDescriptionUtils.MASTER_SNAPSHOT_TIMEOUT_MILLIS,
SnapshotDescriptionUtils.DEFAULT_MAX_WAIT_TIME));
int opThreads = conf.getInt(SNAPSHOT_POOL_THREADS_KEY, SNAPSHOT_POOL_THREADS_DEFAULT);

View File

@ -124,28 +124,11 @@ public final class SnapshotDescriptionUtils {
/** Default value if no start time is specified */
public static final long NO_SNAPSHOT_START_TIME_SPECIFIED = 0;
public static final String MASTER_SNAPSHOT_TIMEOUT_MILLIS = "hbase.snapshot.master.timeout.millis";
/** By default, wait 300 seconds for a snapshot to complete */
public static final long DEFAULT_MAX_WAIT_TIME = 60000 * 5 ;
/**
* By default, check to see if the snapshot is complete (ms)
* @deprecated Use {@link #DEFAULT_MAX_WAIT_TIME} instead.
* */
@Deprecated
public static final int SNAPSHOT_TIMEOUT_MILLIS_DEFAULT = 60000 * 5;
/**
* Conf key for # of ms elapsed before injecting a snapshot timeout error when waiting for
* completion.
* @deprecated Use {@link #MASTER_SNAPSHOT_TIMEOUT_MILLIS} instead.
*/
@Deprecated
public static final String SNAPSHOT_TIMEOUT_MILLIS_KEY = "hbase.snapshot.master.timeoutMillis";
private SnapshotDescriptionUtils() {
// private constructor for utility class
}
@ -165,7 +148,7 @@ public final class SnapshotDescriptionUtils {
confKey = MASTER_SNAPSHOT_TIMEOUT_MILLIS;
}
return Math.max(conf.getLong(confKey, defaultMaxWaitTime),
conf.getLong(SNAPSHOT_TIMEOUT_MILLIS_KEY, defaultMaxWaitTime));
conf.getLong(MASTER_SNAPSHOT_TIMEOUT_MILLIS, defaultMaxWaitTime));
}
/**