Skip to content

Commit 050b287

Browse files
authored
Revert "HBASE-27028 Add a shell command for flushing master local region (apache#4457)"
This reverts commit 958ecc3.
1 parent 4f504a7 commit 050b287

21 files changed

Lines changed: 8 additions & 220 deletions

File tree

hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,9 +2539,4 @@ default BalanceResponse balanceRSGroup(String groupName) throws IOException {
25392539
*/
25402540
List<LogEntry> getLogEntries(Set<ServerName> serverNames, String logType, ServerType serverType,
25412541
int limit, Map<String, Object> filterParams) throws IOException;
2542-
2543-
/**
2544-
* Flush master local region
2545-
*/
2546-
void flushMasterStore() throws IOException;
25472542
}

hbase-client/src/main/java/org/apache/hadoop/hbase/client/AdminOverAsyncAdmin.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,9 +1078,4 @@ public List<LogEntry> getLogEntries(Set<ServerName> serverNames, String logType,
10781078
ServerType serverType, int limit, Map<String, Object> filterParams) throws IOException {
10791079
return get(admin.getLogEntries(serverNames, logType, serverType, limit, filterParams));
10801080
}
1081-
1082-
@Override
1083-
public void flushMasterStore() throws IOException {
1084-
get(admin.flushMasterStore());
1085-
}
10861081
}

hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,9 +1785,4 @@ default CompletableFuture<BalanceResponse> balanceRSGroup(String groupName) {
17851785
*/
17861786
CompletableFuture<List<LogEntry>> getLogEntries(Set<ServerName> serverNames, String logType,
17871787
ServerType serverType, int limit, Map<String, Object> filterParams);
1788-
1789-
/**
1790-
* Flush master local region
1791-
*/
1792-
CompletableFuture<Void> flushMasterStore();
17931788
}

hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncHBaseAdmin.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -949,9 +949,4 @@ public CompletableFuture<List<LogEntry>> getLogEntries(Set<ServerName> serverNam
949949
String logType, ServerType serverType, int limit, Map<String, Object> filterParams) {
950950
return wrap(rawAdmin.getLogEntries(serverNames, logType, serverType, limit, filterParams));
951951
}
952-
953-
@Override
954-
public CompletableFuture<Void> flushMasterStore() {
955-
return wrap(rawAdmin.flushMasterStore());
956-
}
957952
}

hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@
178178
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.EnableTableResponse;
179179
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ExecProcedureRequest;
180180
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ExecProcedureResponse;
181-
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.FlushMasterStoreRequest;
182-
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.FlushMasterStoreResponse;
183181
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetClusterStatusRequest;
184182
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetClusterStatusResponse;
185183
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetCompletedSnapshotsRequest;
@@ -4282,14 +4280,4 @@ public CompletableFuture<List<LogEntry>> getLogEntries(Set<ServerName> serverNam
42824280
return CompletableFuture.completedFuture(Collections.emptyList());
42834281
}
42844282
}
4285-
4286-
@Override
4287-
public CompletableFuture<Void> flushMasterStore() {
4288-
FlushMasterStoreRequest.Builder request = FlushMasterStoreRequest.newBuilder();
4289-
return this.<Void> newMasterCaller()
4290-
.action(((controller, stub) -> this.<FlushMasterStoreRequest, FlushMasterStoreResponse,
4291-
Void> call(controller, stub, request.build(),
4292-
(s, c, req, done) -> s.flushMasterStore(c, req, done), resp -> null)))
4293-
.call();
4294-
}
42954283
}

hbase-protocol-shaded/src/main/protobuf/server/master/Master.proto

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -758,9 +758,6 @@ message ModifyColumnStoreFileTrackerResponse {
758758
optional uint64 proc_id = 1;
759759
}
760760

761-
message FlushMasterStoreRequest {}
762-
message FlushMasterStoreResponse {}
763-
764761
service MasterService {
765762
/** Used by the client to get the number of regions that have received the updated schema */
766763
rpc GetSchemaAlterStatus(GetSchemaAlterStatusRequest)
@@ -1200,9 +1197,6 @@ service MasterService {
12001197

12011198
rpc ModifyColumnStoreFileTracker(ModifyColumnStoreFileTrackerRequest)
12021199
returns(ModifyColumnStoreFileTrackerResponse);
1203-
1204-
rpc FlushMasterStore(FlushMasterStoreRequest)
1205-
returns(FlushMasterStoreResponse);
12061200
}
12071201

12081202
// HBCK Service definitions.

hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,22 +1000,6 @@ default void postTableFlush(final ObserverContext<MasterCoprocessorEnvironment>
10001000
final TableName tableName) throws IOException {
10011001
}
10021002

1003-
/**
1004-
* Called before the master local region memstore is flushed to disk.
1005-
* @param ctx the environment to interact with the framework and master
1006-
*/
1007-
default void preMasterStoreFlush(final ObserverContext<MasterCoprocessorEnvironment> ctx)
1008-
throws IOException {
1009-
}
1010-
1011-
/**
1012-
* Called after the master local region memstore is flushed to disk.
1013-
* @param ctx the environment to interact with the framework and master
1014-
*/
1015-
default void postMasterStoreFlush(final ObserverContext<MasterCoprocessorEnvironment> ctx)
1016-
throws IOException {
1017-
}
1018-
10191003
/**
10201004
* Called before the quota for the user is stored.
10211005
* @param ctx the environment to interact with the framework and master

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4225,26 +4225,6 @@ public List<HRegionLocation> getMetaLocations() {
42254225
return metaRegionLocationCache.getMetaRegionLocations();
42264226
}
42274227

4228-
@Override
4229-
public void flushMasterStore() throws IOException {
4230-
LOG.info("Force flush master local region.");
4231-
if (this.cpHost != null) {
4232-
try {
4233-
cpHost.preMasterStoreFlush();
4234-
} catch (IOException ioe) {
4235-
LOG.error("Error invoking master coprocessor preMasterStoreFlush()", ioe);
4236-
}
4237-
}
4238-
masterRegion.flush(true);
4239-
if (this.cpHost != null) {
4240-
try {
4241-
cpHost.postMasterStoreFlush();
4242-
} catch (IOException ioe) {
4243-
LOG.error("Error invoking master coprocessor postMasterStoreFlush()", ioe);
4244-
}
4245-
}
4246-
}
4247-
42484228
public Collection<ServerName> getLiveRegionServers() {
42494229
return regionServerTracker.getRegionServers();
42504230
}

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,24 +1218,6 @@ public void call(MasterObserver observer) throws IOException {
12181218
});
12191219
}
12201220

1221-
public void preMasterStoreFlush() throws IOException {
1222-
execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {
1223-
@Override
1224-
public void call(MasterObserver observer) throws IOException {
1225-
observer.preMasterStoreFlush(this);
1226-
}
1227-
});
1228-
}
1229-
1230-
public void postMasterStoreFlush() throws IOException {
1231-
execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {
1232-
@Override
1233-
public void call(MasterObserver observer) throws IOException {
1234-
observer.postMasterStoreFlush(this);
1235-
}
1236-
});
1237-
}
1238-
12391221
public void preSetUserQuota(final String user, final GlobalQuotaSettings quotas)
12401222
throws IOException {
12411223
execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@
230230
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ExecProcedureResponse;
231231
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.FixMetaRequest;
232232
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.FixMetaResponse;
233-
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.FlushMasterStoreRequest;
234-
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.FlushMasterStoreResponse;
235233
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetClusterStatusRequest;
236234
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetClusterStatusResponse;
237235
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetCompletedSnapshotsRequest;
@@ -3471,16 +3469,4 @@ public ReplicateWALEntryResponse replicateToReplica(RpcController controller,
34713469
ReplicateWALEntryRequest request) throws ServiceException {
34723470
throw new ServiceException(new DoNotRetryIOException("Unsupported method on master"));
34733471
}
3474-
3475-
@Override
3476-
public FlushMasterStoreResponse flushMasterStore(RpcController controller,
3477-
FlushMasterStoreRequest request) throws ServiceException {
3478-
rpcPreCheck("flushMasterStore");
3479-
try {
3480-
server.flushMasterStore();
3481-
} catch (IOException ioe) {
3482-
throw new ServiceException(ioe);
3483-
}
3484-
return FlushMasterStoreResponse.newBuilder().build();
3485-
}
34863472
}

0 commit comments

Comments
 (0)