Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move safe mode manager to abstract master
- Loading branch information
Showing
13 changed files
with
107 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
core/server/common/src/main/java/alluxio/master/MasterContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,47 @@ | |||
/* | |||
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0 | |||
* (the "License"). You may not use this work except in compliance with the License, which is | |||
* available at www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | |||
* either express or implied, as more fully set forth in the License. | |||
* | |||
* See the NOTICE file distributed with this work for information regarding copyright ownership. | |||
*/ | |||
|
|||
package alluxio.master; | |||
|
|||
import alluxio.master.journal.JournalSystem; | |||
|
|||
import com.google.common.base.Preconditions; | |||
|
|||
/** | |||
* Stores context information for Alluxio masters. | |||
*/ | |||
public final class MasterContext { | |||
private final JournalSystem mJournalSystem; | |||
private final SafeModeManager mSafeModeManager; | |||
|
|||
/** | |||
* @param journalSystem the journal system to use for tracking master operations | |||
* @param safeModeManager the manager for master safe mode | |||
*/ | |||
public MasterContext(JournalSystem journalSystem, SafeModeManager safeModeManager) { | |||
mJournalSystem = Preconditions.checkNotNull(journalSystem, "journalSystem"); | |||
mSafeModeManager = Preconditions.checkNotNull(safeModeManager, "safeModeManager"); | |||
} | |||
|
|||
/** | |||
* @return the journal system to use for tracking master operations | |||
*/ | |||
public JournalSystem getJournalSystem() { | |||
return mJournalSystem; | |||
} | |||
|
|||
/** | |||
* @return the manager for master safe mode | |||
*/ | |||
public SafeModeManager getmSafeModeManager() { | |||
return mSafeModeManager; | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.