HBASE-9603 IsRestoreSnapshotDoneResponse has wrong default causing restoreSnapshot() to be async

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1525169 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
mbertozzi 2013-09-20 22:56:54 +00:00
parent db22b2b6d9
commit 3bf837c884
3 changed files with 85 additions and 84 deletions

View File

@ -2922,7 +2922,8 @@ public class HBaseAdmin implements Abortable, Closeable {
final IsRestoreSnapshotDoneRequest request = IsRestoreSnapshotDoneRequest.newBuilder() final IsRestoreSnapshotDoneRequest request = IsRestoreSnapshotDoneRequest.newBuilder()
.setSnapshot(snapshot).build(); .setSnapshot(snapshot).build();
IsRestoreSnapshotDoneResponse done = IsRestoreSnapshotDoneResponse.newBuilder().buildPartial(); IsRestoreSnapshotDoneResponse done = IsRestoreSnapshotDoneResponse.newBuilder()
.setDone(false).buildPartial();
final long maxPauseTime = 5000; final long maxPauseTime = 5000;
int tries = 0; int tries = 0;
while (!done.getDone()) { while (!done.getDone()) {

View File

@ -31649,13 +31649,13 @@ public final class MasterAdminProtos {
public interface IsRestoreSnapshotDoneResponseOrBuilder public interface IsRestoreSnapshotDoneResponseOrBuilder
extends com.google.protobuf.MessageOrBuilder { extends com.google.protobuf.MessageOrBuilder {
// optional bool done = 1 [default = true]; // optional bool done = 1 [default = false];
/** /**
* <code>optional bool done = 1 [default = true];</code> * <code>optional bool done = 1 [default = false];</code>
*/ */
boolean hasDone(); boolean hasDone();
/** /**
* <code>optional bool done = 1 [default = true];</code> * <code>optional bool done = 1 [default = false];</code>
*/ */
boolean getDone(); boolean getDone();
} }
@ -31755,24 +31755,24 @@ public final class MasterAdminProtos {
} }
private int bitField0_; private int bitField0_;
// optional bool done = 1 [default = true]; // optional bool done = 1 [default = false];
public static final int DONE_FIELD_NUMBER = 1; public static final int DONE_FIELD_NUMBER = 1;
private boolean done_; private boolean done_;
/** /**
* <code>optional bool done = 1 [default = true];</code> * <code>optional bool done = 1 [default = false];</code>
*/ */
public boolean hasDone() { public boolean hasDone() {
return ((bitField0_ & 0x00000001) == 0x00000001); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>optional bool done = 1 [default = true];</code> * <code>optional bool done = 1 [default = false];</code>
*/ */
public boolean getDone() { public boolean getDone() {
return done_; return done_;
} }
private void initFields() { private void initFields() {
done_ = true; done_ = false;
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
public final boolean isInitialized() { public final boolean isInitialized() {
@ -31956,7 +31956,7 @@ public final class MasterAdminProtos {
public Builder clear() { public Builder clear() {
super.clear(); super.clear();
done_ = true; done_ = false;
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
return this; return this;
} }
@ -32036,22 +32036,22 @@ public final class MasterAdminProtos {
} }
private int bitField0_; private int bitField0_;
// optional bool done = 1 [default = true]; // optional bool done = 1 [default = false];
private boolean done_ = true; private boolean done_ ;
/** /**
* <code>optional bool done = 1 [default = true];</code> * <code>optional bool done = 1 [default = false];</code>
*/ */
public boolean hasDone() { public boolean hasDone() {
return ((bitField0_ & 0x00000001) == 0x00000001); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>optional bool done = 1 [default = true];</code> * <code>optional bool done = 1 [default = false];</code>
*/ */
public boolean getDone() { public boolean getDone() {
return done_; return done_;
} }
/** /**
* <code>optional bool done = 1 [default = true];</code> * <code>optional bool done = 1 [default = false];</code>
*/ */
public Builder setDone(boolean value) { public Builder setDone(boolean value) {
bitField0_ |= 0x00000001; bitField0_ |= 0x00000001;
@ -32060,11 +32060,11 @@ public final class MasterAdminProtos {
return this; return this;
} }
/** /**
* <code>optional bool done = 1 [default = true];</code> * <code>optional bool done = 1 [default = false];</code>
*/ */
public Builder clearDone() { public Builder clearDone() {
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
done_ = true; done_ = false;
onChanged(); onChanged();
return this; return this;
} }
@ -35474,73 +35474,73 @@ public final class MasterAdminProtos {
"IsSnapshotDoneResponse\022\023\n\004done\030\001 \001(\010:\005fa" + "IsSnapshotDoneResponse\022\023\n\004done\030\001 \001(\010:\005fa" +
"lse\022&\n\010snapshot\030\002 \001(\0132\024.SnapshotDescript" + "lse\022&\n\010snapshot\030\002 \001(\0132\024.SnapshotDescript" +
"ion\"F\n\034IsRestoreSnapshotDoneRequest\022&\n\010s" + "ion\"F\n\034IsRestoreSnapshotDoneRequest\022&\n\010s" +
"napshot\030\001 \001(\0132\024.SnapshotDescription\"3\n\035I" + "napshot\030\001 \001(\0132\024.SnapshotDescription\"4\n\035I" +
"sRestoreSnapshotDoneResponse\022\022\n\004done\030\001 \001" + "sRestoreSnapshotDoneResponse\022\023\n\004done\030\001 \001" +
"(\010:\004true2\275\023\n\022MasterAdminService\0222\n\tAddCo" + "(\010:\005false2\275\023\n\022MasterAdminService\0222\n\tAddC" +
"lumn\022\021.AddColumnRequest\032\022.AddColumnRespo" + "olumn\022\021.AddColumnRequest\032\022.AddColumnResp" +
"nse\022;\n\014DeleteColumn\022\024.DeleteColumnReques" + "onse\022;\n\014DeleteColumn\022\024.DeleteColumnReque" +
"t\032\025.DeleteColumnResponse\022;\n\014ModifyColumn" + "st\032\025.DeleteColumnResponse\022;\n\014ModifyColum" +
"\022\024.ModifyColumnRequest\032\025.ModifyColumnRes", "n\022\024.ModifyColumnRequest\032\025.ModifyColumnRe",
"ponse\0225\n\nMoveRegion\022\022.MoveRegionRequest\032" + "sponse\0225\n\nMoveRegion\022\022.MoveRegionRequest" +
"\023.MoveRegionResponse\022Y\n\026DispatchMergingR" + "\032\023.MoveRegionResponse\022Y\n\026DispatchMerging" +
"egions\022\036.DispatchMergingRegionsRequest\032\037" + "Regions\022\036.DispatchMergingRegionsRequest\032" +
".DispatchMergingRegionsResponse\022;\n\014Assig" + "\037.DispatchMergingRegionsResponse\022;\n\014Assi" +
"nRegion\022\024.AssignRegionRequest\032\025.AssignRe" + "gnRegion\022\024.AssignRegionRequest\032\025.AssignR" +
"gionResponse\022A\n\016UnassignRegion\022\026.Unassig" + "egionResponse\022A\n\016UnassignRegion\022\026.Unassi" +
"nRegionRequest\032\027.UnassignRegionResponse\022" + "gnRegionRequest\032\027.UnassignRegionResponse" +
">\n\rOfflineRegion\022\025.OfflineRegionRequest\032" + "\022>\n\rOfflineRegion\022\025.OfflineRegionRequest" +
"\026.OfflineRegionResponse\0228\n\013DeleteTable\022\023" + "\032\026.OfflineRegionResponse\0228\n\013DeleteTable\022" +
".DeleteTableRequest\032\024.DeleteTableRespons", "\023.DeleteTableRequest\032\024.DeleteTableRespon",
"e\0228\n\013EnableTable\022\023.EnableTableRequest\032\024." + "se\0228\n\013EnableTable\022\023.EnableTableRequest\032\024" +
"EnableTableResponse\022;\n\014DisableTable\022\024.Di" + ".EnableTableResponse\022;\n\014DisableTable\022\024.D" +
"sableTableRequest\032\025.DisableTableResponse" + "isableTableRequest\032\025.DisableTableRespons" +
"\0228\n\013ModifyTable\022\023.ModifyTableRequest\032\024.M" + "e\0228\n\013ModifyTable\022\023.ModifyTableRequest\032\024." +
"odifyTableResponse\0228\n\013CreateTable\022\023.Crea" + "ModifyTableResponse\0228\n\013CreateTable\022\023.Cre" +
"teTableRequest\032\024.CreateTableResponse\022/\n\010" + "ateTableRequest\032\024.CreateTableResponse\022/\n" +
"Shutdown\022\020.ShutdownRequest\032\021.ShutdownRes" + "\010Shutdown\022\020.ShutdownRequest\032\021.ShutdownRe" +
"ponse\0225\n\nStopMaster\022\022.StopMasterRequest\032" + "sponse\0225\n\nStopMaster\022\022.StopMasterRequest" +
"\023.StopMasterResponse\022,\n\007Balance\022\017.Balanc" + "\032\023.StopMasterResponse\022,\n\007Balance\022\017.Balan" +
"eRequest\032\020.BalanceResponse\022M\n\022SetBalance", "ceRequest\032\020.BalanceResponse\022M\n\022SetBalanc",
"rRunning\022\032.SetBalancerRunningRequest\032\033.S" + "erRunning\022\032.SetBalancerRunningRequest\032\033." +
"etBalancerRunningResponse\022A\n\016RunCatalogS" + "SetBalancerRunningResponse\022A\n\016RunCatalog" +
"can\022\026.RunCatalogScanRequest\032\027.RunCatalog" + "Scan\022\026.RunCatalogScanRequest\032\027.RunCatalo" +
"ScanResponse\022S\n\024EnableCatalogJanitor\022\034.E" + "gScanResponse\022S\n\024EnableCatalogJanitor\022\034." +
"nableCatalogJanitorRequest\032\035.EnableCatal" + "EnableCatalogJanitorRequest\032\035.EnableCata" +
"ogJanitorResponse\022\\\n\027IsCatalogJanitorEna" + "logJanitorResponse\022\\\n\027IsCatalogJanitorEn" +
"bled\022\037.IsCatalogJanitorEnabledRequest\032 ." + "abled\022\037.IsCatalogJanitorEnabledRequest\032 " +
"IsCatalogJanitorEnabledResponse\022L\n\021ExecM" + ".IsCatalogJanitorEnabledResponse\022L\n\021Exec" +
"asterService\022\032.CoprocessorServiceRequest" + "MasterService\022\032.CoprocessorServiceReques" +
"\032\033.CoprocessorServiceResponse\022/\n\010Snapsho", "t\032\033.CoprocessorServiceResponse\022/\n\010Snapsh",
"t\022\020.SnapshotRequest\032\021.SnapshotResponse\022V" + "ot\022\020.SnapshotRequest\032\021.SnapshotResponse\022" +
"\n\025GetCompletedSnapshots\022\035.GetCompletedSn" + "V\n\025GetCompletedSnapshots\022\035.GetCompletedS" +
"apshotsRequest\032\036.GetCompletedSnapshotsRe" + "napshotsRequest\032\036.GetCompletedSnapshotsR" +
"sponse\022A\n\016DeleteSnapshot\022\026.DeleteSnapsho" + "esponse\022A\n\016DeleteSnapshot\022\026.DeleteSnapsh" +
"tRequest\032\027.DeleteSnapshotResponse\022A\n\016IsS" + "otRequest\032\027.DeleteSnapshotResponse\022A\n\016Is" +
"napshotDone\022\026.IsSnapshotDoneRequest\032\027.Is" + "SnapshotDone\022\026.IsSnapshotDoneRequest\032\027.I" +
"SnapshotDoneResponse\022D\n\017RestoreSnapshot\022" + "sSnapshotDoneResponse\022D\n\017RestoreSnapshot" +
"\027.RestoreSnapshotRequest\032\030.RestoreSnapsh" + "\022\027.RestoreSnapshotRequest\032\030.RestoreSnaps" +
"otResponse\022V\n\025IsRestoreSnapshotDone\022\035.Is" + "hotResponse\022V\n\025IsRestoreSnapshotDone\022\035.I" +
"RestoreSnapshotDoneRequest\032\036.IsRestoreSn", "sRestoreSnapshotDoneRequest\032\036.IsRestoreS",
"apshotDoneResponse\022D\n\017IsMasterRunning\022\027." + "napshotDoneResponse\022D\n\017IsMasterRunning\022\027" +
"IsMasterRunningRequest\032\030.IsMasterRunning" + ".IsMasterRunningRequest\032\030.IsMasterRunnin" +
"Response\022D\n\017ModifyNamespace\022\027.ModifyName" + "gResponse\022D\n\017ModifyNamespace\022\027.ModifyNam" +
"spaceRequest\032\030.ModifyNamespaceResponse\022D" + "espaceRequest\032\030.ModifyNamespaceResponse\022" +
"\n\017CreateNamespace\022\027.CreateNamespaceReque" + "D\n\017CreateNamespace\022\027.CreateNamespaceRequ" +
"st\032\030.CreateNamespaceResponse\022D\n\017DeleteNa" + "est\032\030.CreateNamespaceResponse\022D\n\017DeleteN" +
"mespace\022\027.DeleteNamespaceRequest\032\030.Delet" + "amespace\022\027.DeleteNamespaceRequest\032\030.Dele" +
"eNamespaceResponse\022Y\n\026GetNamespaceDescri" + "teNamespaceResponse\022Y\n\026GetNamespaceDescr" +
"ptor\022\036.GetNamespaceDescriptorRequest\032\037.G" + "iptor\022\036.GetNamespaceDescriptorRequest\032\037." +
"etNamespaceDescriptorResponse\022_\n\030ListNam", "GetNamespaceDescriptorResponse\022_\n\030ListNa",
"espaceDescriptors\022 .ListNamespaceDescrip" + "mespaceDescriptors\022 .ListNamespaceDescri" +
"torsRequest\032!.ListNamespaceDescriptorsRe" + "ptorsRequest\032!.ListNamespaceDescriptorsR" +
"sponse\022t\n\037ListTableDescriptorsByNamespac" + "esponse\022t\n\037ListTableDescriptorsByNamespa" +
"e\022\'.ListTableDescriptorsByNamespaceReque" + "ce\022\'.ListTableDescriptorsByNamespaceRequ" +
"st\032(.ListTableDescriptorsByNamespaceResp" + "est\032(.ListTableDescriptorsByNamespaceRes" +
"onse\022b\n\031ListTableNamesByNamespace\022!.List" + "ponse\022b\n\031ListTableNamesByNamespace\022!.Lis" +
"TableNamesByNamespaceRequest\032\".ListTable" + "tTableNamesByNamespaceRequest\032\".ListTabl" +
"NamesByNamespaceResponseBG\n*org.apache.h" + "eNamesByNamespaceResponseBG\n*org.apache." +
"adoop.hbase.protobuf.generatedB\021MasterAd" + "hadoop.hbase.protobuf.generatedB\021MasterA" +
"minProtosH\001\210\001\001\240\001\001" "dminProtosH\001\210\001\001\240\001\001"
}; };
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {

View File

@ -291,7 +291,7 @@ message IsRestoreSnapshotDoneRequest {
} }
message IsRestoreSnapshotDoneResponse { message IsRestoreSnapshotDoneResponse {
optional bool done = 1 [default = true]; optional bool done = 1 [default = false];
} }
service MasterAdminService { service MasterAdminService {