Skip to content

Commit

Permalink
HBASE-22186 Removed remaining usages of SnapshotDescriptionUtils.SNAP…
Browse files Browse the repository at this point in the history
…SHOT_TIMEOUT_MILLIS_KEY and SnapshotDescriptionUtils.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT
  • Loading branch information
HorizonNet committed Apr 16, 2019
1 parent cd61bcc commit 20f72f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1169,8 +1169,9 @@ public void initialize(MasterServices master, MetricsMaster metricsMaster) throw
// 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,28 +124,11 @@ public CompletedSnaphotDirectoriesFilter(FileSystem fs) {
/** 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
}
Expand All @@ -165,7 +148,7 @@ public static long getMaxMasterTimeout(Configuration conf, SnapshotDescription.T
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));
}

/**
Expand Down

0 comments on commit 20f72f5

Please sign in to comment.