Skip to content

Commit b6594e6

Browse files
committed
fix for javac
1 parent 2209b5a commit b6594e6

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis_snapshot/OmRatisCheckpointInstaller.java

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,106 @@ public final class OmRatisCheckpointInstaller {
5656
* without exposing private methods/fields.
5757
*/
5858
public interface Context {
59+
/**
60+
* Stops background services and pauses the state machine.
61+
*
62+
* @throws Exception if stopping services fails
63+
*/
5964
void stopBackgroundServicesAndPause() throws Exception;
6065

66+
/**
67+
* Starts background services.
68+
*
69+
* @throws Exception if starting services fails
70+
*/
6171
void startBackgroundServices() throws Exception;
6272

73+
/**
74+
* Gets the last applied term and index.
75+
*
76+
* @return last applied TermIndex
77+
*/
6378
TermIndex getLastAppliedTermIndex();
6479

80+
/**
81+
* Gets the current DB location.
82+
*
83+
* @return current DB directory
84+
*/
6585
File getCurrentDbLocation();
6686

87+
/**
88+
* Stops the RPC server.
89+
*/
6790
void stopRpcServer();
6891

92+
/**
93+
* Stops the metadata manager.
94+
*
95+
* @throws Exception if stopping metadata manager fails
96+
*/
6997
void stopMetadataManager() throws Exception;
7098

99+
/**
100+
* Closes the snapshot manager.
101+
*/
71102
void closeSnapshotManager();
72103

104+
/**
105+
* Reloads OM state with new checkpoint.
106+
*
107+
* @throws Exception if reloading state fails
108+
*/
73109
void reloadOMState() throws Exception;
74110

111+
/**
112+
* Sets transaction info.
113+
*
114+
* @param info transaction info to set
115+
*/
75116
void setTransactionInfo(TransactionInfo info);
76117

118+
/**
119+
* Unpauses the state machine.
120+
*
121+
* @param index transaction index
122+
* @param term term number
123+
*/
77124
void unpauseStateMachine(long index, long term);
78125

126+
/**
127+
* Restarts the RPC server.
128+
*
129+
* @throws Exception if restarting RPC server fails
130+
*/
79131
void restartRpcServer() throws Exception;
80132

133+
/**
134+
* Audits checkpoint installation.
135+
*
136+
* @param leaderId leader OM node ID
137+
* @param term term number
138+
* @param index transaction index
139+
*/
81140
void auditCheckpointInstall(String leaderId, long term, long index);
82141

142+
/**
143+
* Exits the system.
144+
*
145+
* @param code exit code
146+
* @param msg exit message
147+
* @param e exception that caused exit
148+
* @param log logger for logging
149+
* @throws IOException if exit operation fails
150+
*/
83151
void exitSystem(int code, String msg, Exception e, Logger log)
84152
throws IOException;
85153

154+
/**
155+
* Gets the Ratis log directory name.
156+
*
157+
* @return Ratis log directory name, or null if not set
158+
*/
86159
String getRatisLogDirName();
87160
}
88161

0 commit comments

Comments
 (0)