This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 740e937 HBASE-24056 Improve the layout of our proto files in
hbase-protocol-shaded module (#1377)
740e937 is described below
commit 740e9372105b7d31721e3f7eea6b2b2e85d55f84
Author: Semen Komissarov <[email protected]>
AuthorDate: Mon Apr 6 05:22:08 2020 +0300
HBASE-24056 Improve the layout of our proto files in hbase-protocol-shaded
module (#1377)
proto files layout:
protobuf/client - client to server messages, client rpc service and protos,
used in hbase-client exclusively;
protobuf/rest - hbase-rest messages;
protobuf/rpc - rpc and post-rpc tracing messages;
protobuf/server/coprocessor - coprocessor rpc services;
protobuf/server/coprocessor/example - coprocessors rpc services examples
from hbase-examples;
protobuf/server/io - filesystem and hbase-server/io protos;
protobuf/server/maser - master rpc services and messages;
protobuf/server/region - region rpc services and messages (except client
rpc service, which is in Client.proto);
protobuf/server/rsgroup - rsgroup protos;
protobuf/server/zookeeper - protos for zookeeper and ones used exclusively
in hbase-zookeeper module;
protobuf/server - protos used across other server protos;
protobuf/test - protos used in tests;
protobuf/ - protos used across other protos, exclusive for hbase-mapreduce
and hbase-backup, other protos.
Signed-off-by: Jan Hentschel <[email protected]>
Signed-off-by: Duo Zhang <[email protected]>
---
.../regionserver/TestServerCustomProtocol.java | 80 +++++++++++-----------
.../coprocessor/example/RowCountEndpoint.java | 22 +++---
hbase-protocol-shaded/README.txt | 15 ++++
.../src/main/protobuf/{ => client}/Client.proto | 4 +-
.../main/protobuf/{ => client}/Comparator.proto | 0
.../main/protobuf/{ => client}/Encryption.proto | 0
.../src/main/protobuf/{ => client}/Filter.proto | 2 +-
.../src/main/protobuf/{ => rest}/CellMessage.proto | 0
.../main/protobuf/{ => rest}/CellSetMessage.proto | 2 +-
.../protobuf/{ => rest}/ColumnSchemaMessage.proto | 0
.../{ => rest}/NamespacePropertiesMessage.proto | 0
.../protobuf/{ => rest}/NamespacesMessage.proto | 2 +-
.../main/protobuf/{ => rest}/ScannerMessage.proto | 0
.../{ => rest}/StorageClusterStatusMessage.proto | 0
.../protobuf/{ => rest}/TableInfoMessage.proto | 0
.../protobuf/{ => rest}/TableListMessage.proto | 0
.../protobuf/{ => rest}/TableSchemaMessage.proto | 4 +-
.../main/protobuf/{ => rest}/VersionMessage.proto | 0
.../src/main/protobuf/{ => rpc}/RPC.proto | 2 +-
.../src/main/protobuf/{ => rpc}/Tracing.proto | 4 +-
.../src/main/protobuf/{ => server}/ClusterId.proto | 0
.../main/protobuf/{ => server}/ClusterStatus.proto | 4 +-
.../main/protobuf/{ => server}/ErrorHandling.proto | 0
.../src/main/protobuf/{ => server}/Procedure.proto | 2 +-
.../src/main/protobuf/{ => server}/Quota.proto | 0
.../src/main/protobuf/{ => server}/Snapshot.proto | 4 +-
.../protobuf/{ => server}/SnapshotCleanup.proto | 0
.../{ => server/coprocessor}/AccessControl.proto | 0
.../{ => server/coprocessor}/Aggregate.proto | 2 +-
.../{ => server/coprocessor}/Authentication.proto | 0
.../protobuf/{ => server/coprocessor}/Export.proto | 2 +-
.../coprocessor}/MultiRowMutation.proto | 2 +-
.../{ => server/coprocessor}/RowProcessor.proto | 0
.../coprocessor}/VisibilityLabels.proto | 4 +-
.../coprocessor/examples}/BulkDelete.proto | 2 +-
.../coprocessor/examples}/RefreshHFiles.proto | 0
.../coprocessor/examples/RowCount.proto} | 2 +-
.../{ => server/io}/BucketCacheEntry.proto | 0
.../src/main/protobuf/{ => server/io}/FS.proto | 0
.../src/main/protobuf/{ => server/io}/HFile.proto | 0
.../protobuf/{ => server/master}/LockService.proto | 2 +-
.../main/protobuf/{ => server/master}/Master.proto | 20 +++---
.../{ => server/master}/MasterProcedure.proto | 8 +--
.../{ => server/master}/RegionServerStatus.proto | 4 +-
.../protobuf/{ => server/master}/Replication.proto | 0
.../main/protobuf/{ => server/region}/Admin.proto | 8 +--
.../protobuf/{ => server/region}/TooSlowLog.proto | 0
.../main/protobuf/{ => server/region}/WAL.proto | 0
.../protobuf/{ => server/rsgroup}/RSGroup.proto | 0
.../{ => server/rsgroup}/RSGroupAdmin.proto | 2 +-
.../{ => server/zookeeper}/LoadBalancer.proto | 0
.../{ => server/zookeeper}/RegionNormalizer.proto | 0
.../{ => server/zookeeper}/ZooKeeper.proto | 2 +-
.../ColumnAggregationNullResponseProtocol.proto | 0
.../coprocessor}/ColumnAggregationProtocol.proto | 0
.../ColumnAggregationWithErrorsProtocol.proto | 0
.../coprocessor}/DummyRegionServerEndpoint.proto | 0
.../coprocessor}/IncrementCounterProcessor.proto | 0
.../{ => test/coprocessor}/PingProtocol.proto | 0
.../protobuf/{ => test/ipc}/TestProcedure.proto | 0
.../src/main/protobuf/{ => test/ipc}/test.proto | 0
.../protobuf/{ => test/ipc}/test_rpc_service.proto | 2 +-
62 files changed, 113 insertions(+), 96 deletions(-)
diff --git
a/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/regionserver/TestServerCustomProtocol.java
b/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/regionserver/TestServerCustomProtocol.java
index f8e90de..22d3f13 100644
---
a/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/regionserver/TestServerCustomProtocol.java
+++
b/hbase-endpoint/src/test/java/org/apache/hadoop/hbase/regionserver/TestServerCustomProtocol.java
@@ -56,7 +56,6 @@ import
org.apache.hbase.thirdparty.com.google.protobuf.RpcController;
import org.apache.hbase.thirdparty.com.google.protobuf.Service;
import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;
-import
org.apache.hadoop.hbase.shaded.coprocessor.protobuf.generated.PingProtos;
import
org.apache.hadoop.hbase.shaded.coprocessor.protobuf.generated.PingProtos.CountRequest;
import
org.apache.hadoop.hbase.shaded.coprocessor.protobuf.generated.PingProtos.CountResponse;
import
org.apache.hadoop.hbase.shaded.coprocessor.protobuf.generated.PingProtos.HelloRequest;
@@ -67,6 +66,7 @@ import
org.apache.hadoop.hbase.shaded.coprocessor.protobuf.generated.PingProtos.
import
org.apache.hadoop.hbase.shaded.coprocessor.protobuf.generated.PingProtos.NoopResponse;
import
org.apache.hadoop.hbase.shaded.coprocessor.protobuf.generated.PingProtos.PingRequest;
import
org.apache.hadoop.hbase.shaded.coprocessor.protobuf.generated.PingProtos.PingResponse;
+import
org.apache.hadoop.hbase.shaded.coprocessor.protobuf.generated.PingProtos.PingService;
@Category({RegionServerTests.class, MediumTests.class})
public class TestServerCustomProtocol {
@@ -80,7 +80,7 @@ public class TestServerCustomProtocol {
static final String HELLO = "Hello, ";
/* Test protocol implementation */
- public static class PingHandler extends PingProtos.PingService implements
RegionCoprocessor {
+ public static class PingHandler extends PingService implements
RegionCoprocessor {
private int counter = 0;
@Override
@@ -202,14 +202,14 @@ public class TestServerCustomProtocol {
LOG.info("Who are you");
hello(table, NOBODY, null);
LOG.info(NOBODY);
- Map<byte [], Integer> intResults =
table.coprocessorService(PingProtos.PingService.class,
+ Map<byte [], Integer> intResults =
table.coprocessorService(PingService.class,
null, null,
- new Batch.Call<PingProtos.PingService, Integer>() {
+ new Batch.Call<PingService, Integer>() {
@Override
- public Integer call(PingProtos.PingService instance) throws
IOException {
- CoprocessorRpcUtils.BlockingRpcCallback<PingProtos.CountResponse>
rpcCallback =
+ public Integer call(PingService instance) throws IOException {
+ CoprocessorRpcUtils.BlockingRpcCallback<CountResponse> rpcCallback =
new CoprocessorRpcUtils.BlockingRpcCallback<>();
- instance.count(null, PingProtos.CountRequest.newBuilder().build(),
rpcCallback);
+ instance.count(null, CountRequest.newBuilder().build(), rpcCallback);
return rpcCallback.get().getCount();
}
});
@@ -219,15 +219,15 @@ public class TestServerCustomProtocol {
count = e.getValue();
}
final int diff = 5;
- intResults = table.coprocessorService(PingProtos.PingService.class,
+ intResults = table.coprocessorService(PingService.class,
null, null,
- new Batch.Call<PingProtos.PingService, Integer>() {
+ new Batch.Call<PingService, Integer>() {
@Override
- public Integer call(PingProtos.PingService instance) throws
IOException {
-
CoprocessorRpcUtils.BlockingRpcCallback<PingProtos.IncrementCountResponse>
rpcCallback =
+ public Integer call(PingService instance) throws IOException {
+ CoprocessorRpcUtils.BlockingRpcCallback<IncrementCountResponse>
rpcCallback =
new CoprocessorRpcUtils.BlockingRpcCallback<>();
instance.increment(null,
-
PingProtos.IncrementCountRequest.newBuilder().setDiff(diff).build(),
+ IncrementCountRequest.newBuilder().setDiff(diff).build(),
rpcCallback);
return rpcCallback.get().getCount();
}
@@ -256,19 +256,19 @@ public class TestServerCustomProtocol {
private Map<byte [], String> hello(final Table table, final String send,
final byte [] start,
final byte [] end) throws ServiceException, Throwable {
- return table.coprocessorService(PingProtos.PingService.class,
+ return table.coprocessorService(PingService.class,
start, end,
- new Batch.Call<PingProtos.PingService, String>() {
+ new Batch.Call<PingService, String>() {
@Override
- public String call(PingProtos.PingService instance) throws
IOException {
- CoprocessorRpcUtils.BlockingRpcCallback<PingProtos.HelloResponse>
rpcCallback =
+ public String call(PingService instance) throws IOException {
+ CoprocessorRpcUtils.BlockingRpcCallback<HelloResponse> rpcCallback
=
new CoprocessorRpcUtils.BlockingRpcCallback<>();
- PingProtos.HelloRequest.Builder builder =
PingProtos.HelloRequest.newBuilder();
+ HelloRequest.Builder builder = HelloRequest.newBuilder();
if (send != null) {
builder.setName(send);
}
instance.hello(null, builder.build(), rpcCallback);
- PingProtos.HelloResponse r = rpcCallback.get();
+ HelloResponse r = rpcCallback.get();
return r != null && r.hasResponse()? r.getResponse(): null;
}
});
@@ -276,18 +276,18 @@ public class TestServerCustomProtocol {
private Map<byte [], String> compoundOfHelloAndPing(final Table table, final
byte [] start,
final byte [] end) throws ServiceException, Throwable {
- return table.coprocessorService(PingProtos.PingService.class,
+ return table.coprocessorService(PingService.class,
start, end,
- new Batch.Call<PingProtos.PingService, String>() {
+ new Batch.Call<PingService, String>() {
@Override
- public String call(PingProtos.PingService instance) throws
IOException {
- CoprocessorRpcUtils.BlockingRpcCallback<PingProtos.HelloResponse>
rpcCallback =
+ public String call(PingService instance) throws IOException {
+ CoprocessorRpcUtils.BlockingRpcCallback<HelloResponse> rpcCallback
=
new CoprocessorRpcUtils.BlockingRpcCallback<>();
- PingProtos.HelloRequest.Builder builder =
PingProtos.HelloRequest.newBuilder();
+ HelloRequest.Builder builder = HelloRequest.newBuilder();
// Call ping on same instance. Use result calling hello on same
instance.
builder.setName(doPing(instance));
instance.hello(null, builder.build(), rpcCallback);
- PingProtos.HelloResponse r = rpcCallback.get();
+ HelloResponse r = rpcCallback.get();
return r != null && r.hasResponse()? r.getResponse(): null;
}
});
@@ -295,13 +295,13 @@ public class TestServerCustomProtocol {
private Map<byte [], String> noop(final Table table, final byte [] start,
final byte [] end)
throws ServiceException, Throwable {
- return table.coprocessorService(PingProtos.PingService.class, start, end,
- new Batch.Call<PingProtos.PingService, String>() {
+ return table.coprocessorService(PingService.class, start, end,
+ new Batch.Call<PingService, String>() {
@Override
- public String call(PingProtos.PingService instance) throws
IOException {
- CoprocessorRpcUtils.BlockingRpcCallback<PingProtos.NoopResponse>
rpcCallback =
+ public String call(PingService instance) throws IOException {
+ CoprocessorRpcUtils.BlockingRpcCallback<NoopResponse> rpcCallback =
new CoprocessorRpcUtils.BlockingRpcCallback<>();
- PingProtos.NoopRequest.Builder builder =
PingProtos.NoopRequest.newBuilder();
+ NoopRequest.Builder builder = NoopRequest.newBuilder();
instance.noop(null, builder.build(), rpcCallback);
rpcCallback.get();
// Looks like null is expected when void. That is what the test
below is looking for
@@ -314,14 +314,14 @@ public class TestServerCustomProtocol {
public void testSingleMethod() throws Throwable {
try (Table table = util.getConnection().getTable(TEST_TABLE);
RegionLocator locator =
util.getConnection().getRegionLocator(TEST_TABLE)) {
- Map<byte [], String> results =
table.coprocessorService(PingProtos.PingService.class,
+ Map<byte [], String> results =
table.coprocessorService(PingService.class,
null, ROW_A,
- new Batch.Call<PingProtos.PingService, String>() {
+ new Batch.Call<PingService, String>() {
@Override
- public String call(PingProtos.PingService instance) throws
IOException {
- CoprocessorRpcUtils.BlockingRpcCallback<PingProtos.PingResponse>
rpcCallback =
+ public String call(PingService instance) throws IOException {
+ CoprocessorRpcUtils.BlockingRpcCallback<PingResponse> rpcCallback =
new CoprocessorRpcUtils.BlockingRpcCallback<>();
- instance.ping(null, PingProtos.PingRequest.newBuilder().build(),
rpcCallback);
+ instance.ping(null, PingRequest.newBuilder().build(), rpcCallback);
return rpcCallback.get().getPong();
}
});
@@ -404,19 +404,19 @@ public class TestServerCustomProtocol {
private Map<byte [], String> ping(final Table table, final byte [] start,
final byte [] end)
throws ServiceException, Throwable {
- return table.coprocessorService(PingProtos.PingService.class, start, end,
- new Batch.Call<PingProtos.PingService, String>() {
+ return table.coprocessorService(PingService.class, start, end,
+ new Batch.Call<PingService, String>() {
@Override
- public String call(PingProtos.PingService instance) throws IOException
{
+ public String call(PingService instance) throws IOException {
return doPing(instance);
}
});
}
- private static String doPing(PingProtos.PingService instance) throws
IOException {
- CoprocessorRpcUtils.BlockingRpcCallback<PingProtos.PingResponse>
rpcCallback =
+ private static String doPing(PingService instance) throws IOException {
+ CoprocessorRpcUtils.BlockingRpcCallback<PingResponse> rpcCallback =
new CoprocessorRpcUtils.BlockingRpcCallback<>();
- instance.ping(null, PingProtos.PingRequest.newBuilder().build(),
rpcCallback);
+ instance.ping(null, PingRequest.newBuilder().build(), rpcCallback);
return rpcCallback.get().getPong();
}
diff --git
a/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/RowCountEndpoint.java
b/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/RowCountEndpoint.java
index f5ce522..19467d4 100644
---
a/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/RowCountEndpoint.java
+++
b/hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/RowCountEndpoint.java
@@ -39,7 +39,9 @@ import
org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback;
import org.apache.hbase.thirdparty.com.google.protobuf.RpcController;
import org.apache.hbase.thirdparty.com.google.protobuf.Service;
-import
org.apache.hadoop.hbase.shaded.coprocessor.example.generated.ExampleProtos;
+import
org.apache.hadoop.hbase.shaded.coprocessor.example.generated.RowCountProtos.CountRequest;
+import
org.apache.hadoop.hbase.shaded.coprocessor.example.generated.RowCountProtos.CountResponse;
+import
org.apache.hadoop.hbase.shaded.coprocessor.example.generated.RowCountProtos.RowCountService;
/**
* Sample coprocessor endpoint exposing a Service interface for counting rows
and key values.
@@ -50,7 +52,7 @@ import
org.apache.hadoop.hbase.shaded.coprocessor.example.generated.ExampleProto
* </p>
*/
@InterfaceAudience.Private
-public class RowCountEndpoint extends ExampleProtos.RowCountService implements
RegionCoprocessor {
+public class RowCountEndpoint extends RowCountService implements
RegionCoprocessor {
private RegionCoprocessorEnvironment env;
public RowCountEndpoint() {
@@ -68,11 +70,11 @@ public class RowCountEndpoint extends
ExampleProtos.RowCountService implements R
* Returns a count of the rows in the region where this coprocessor is
loaded.
*/
@Override
- public void getRowCount(RpcController controller, ExampleProtos.CountRequest
request,
- RpcCallback<ExampleProtos.CountResponse> done) {
+ public void getRowCount(RpcController controller, CountRequest request,
+ RpcCallback<CountResponse> done) {
Scan scan = new Scan();
scan.setFilter(new FirstKeyOnlyFilter());
- ExampleProtos.CountResponse response = null;
+ CountResponse response = null;
InternalScanner scanner = null;
try {
scanner = env.getRegion().getScanner(scan);
@@ -92,7 +94,7 @@ public class RowCountEndpoint extends
ExampleProtos.RowCountService implements R
results.clear();
} while (hasMore);
- response = ExampleProtos.CountResponse.newBuilder()
+ response = CountResponse.newBuilder()
.setCount(count).build();
} catch (IOException ioe) {
CoprocessorRpcUtils.setControllerException(controller, ioe);
@@ -110,9 +112,9 @@ public class RowCountEndpoint extends
ExampleProtos.RowCountService implements R
* Returns a count of all KeyValues in the region where this coprocessor is
loaded.
*/
@Override
- public void getKeyValueCount(RpcController controller,
ExampleProtos.CountRequest request,
- RpcCallback<ExampleProtos.CountResponse> done) {
- ExampleProtos.CountResponse response = null;
+ public void getKeyValueCount(RpcController controller, CountRequest request,
+ RpcCallback<CountResponse> done) {
+ CountResponse response = null;
InternalScanner scanner = null;
try {
scanner = env.getRegion().getScanner(new Scan());
@@ -127,7 +129,7 @@ public class RowCountEndpoint extends
ExampleProtos.RowCountService implements R
results.clear();
} while (hasMore);
- response = ExampleProtos.CountResponse.newBuilder()
+ response = CountResponse.newBuilder()
.setCount(count).build();
} catch (IOException ioe) {
CoprocessorRpcUtils.setControllerException(controller, ioe);
diff --git a/hbase-protocol-shaded/README.txt b/hbase-protocol-shaded/README.txt
index b0030fa..88596e0 100644
--- a/hbase-protocol-shaded/README.txt
+++ b/hbase-protocol-shaded/README.txt
@@ -4,3 +4,18 @@ overlap with protos that are used by coprocessor endpoints
a different name, the generated classes are relocated
-- i.e. shaded -- to a new location; they are moved from
org.apache.hadoop.hbase.* to org.apache.hadoop.hbase.shaded.
+
+proto files layout:
+protobuf/client - client to server messages, client rpc service and protos,
used in hbase-client exclusively;
+protobuf/rest - hbase-rest messages;
+protobuf/rpc - rpc and post-rpc tracing messages;
+protobuf/server/coprocessor - coprocessor rpc services;
+protobuf/server/coprocessor/example - coprocessors rpc services examples from
hbase-examples;
+protobuf/server/io - filesystem and hbase-server/io protos;
+protobuf/server/maser - master rpc services and messages;
+protobuf/server/region - region rpc services and messages (except client rpc
service, which is in Client.proto);
+protobuf/server/rsgroup - rsgroup protos;
+protobuf/server/zookeeper - protos for zookeeper and ones used exclusively in
hbase-zookeeper module;
+protobuf/server - protos used across other server protos;
+protobuf/test - protos used in tests;
+protobuf/ - protos used across other protos, exclusive for hbase-mapreduce and
hbase-backup, other protos.
diff --git a/hbase-protocol-shaded/src/main/protobuf/Client.proto
b/hbase-protocol-shaded/src/main/protobuf/client/Client.proto
similarity index 99%
rename from hbase-protocol-shaded/src/main/protobuf/Client.proto
rename to hbase-protocol-shaded/src/main/protobuf/client/Client.proto
index 810aaaa..fbb0769 100644
--- a/hbase-protocol-shaded/src/main/protobuf/Client.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/client/Client.proto
@@ -26,9 +26,9 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "HBase.proto";
-import "Filter.proto";
+import "client/Filter.proto";
import "Cell.proto";
-import "Comparator.proto";
+import "client/Comparator.proto";
import "MapReduce.proto";
/**
diff --git a/hbase-protocol-shaded/src/main/protobuf/Comparator.proto
b/hbase-protocol-shaded/src/main/protobuf/client/Comparator.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/Comparator.proto
rename to hbase-protocol-shaded/src/main/protobuf/client/Comparator.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/Encryption.proto
b/hbase-protocol-shaded/src/main/protobuf/client/Encryption.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/Encryption.proto
rename to hbase-protocol-shaded/src/main/protobuf/client/Encryption.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/Filter.proto
b/hbase-protocol-shaded/src/main/protobuf/client/Filter.proto
similarity index 99%
rename from hbase-protocol-shaded/src/main/protobuf/Filter.proto
rename to hbase-protocol-shaded/src/main/protobuf/client/Filter.proto
index b0d6da6..a35047d 100644
--- a/hbase-protocol-shaded/src/main/protobuf/Filter.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/client/Filter.proto
@@ -27,7 +27,7 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "HBase.proto";
-import "Comparator.proto";
+import "client/Comparator.proto";
message Filter {
required string name = 1;
diff --git a/hbase-protocol-shaded/src/main/protobuf/CellMessage.proto
b/hbase-protocol-shaded/src/main/protobuf/rest/CellMessage.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/CellMessage.proto
rename to hbase-protocol-shaded/src/main/protobuf/rest/CellMessage.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/CellSetMessage.proto
b/hbase-protocol-shaded/src/main/protobuf/rest/CellSetMessage.proto
similarity index 96%
rename from hbase-protocol-shaded/src/main/protobuf/CellSetMessage.proto
rename to hbase-protocol-shaded/src/main/protobuf/rest/CellSetMessage.proto
index 0e41181..68a6b05 100644
--- a/hbase-protocol-shaded/src/main/protobuf/CellSetMessage.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/rest/CellSetMessage.proto
@@ -18,7 +18,7 @@
syntax = "proto2";
package org.apache.hadoop.hbase.shaded.rest.protobuf.generated;
-import "CellMessage.proto";
+import "rest/CellMessage.proto";
message CellSet {
message Row {
diff --git a/hbase-protocol-shaded/src/main/protobuf/ColumnSchemaMessage.proto
b/hbase-protocol-shaded/src/main/protobuf/rest/ColumnSchemaMessage.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/ColumnSchemaMessage.proto
rename to hbase-protocol-shaded/src/main/protobuf/rest/ColumnSchemaMessage.proto
diff --git
a/hbase-protocol-shaded/src/main/protobuf/NamespacePropertiesMessage.proto
b/hbase-protocol-shaded/src/main/protobuf/rest/NamespacePropertiesMessage.proto
similarity index 100%
rename from
hbase-protocol-shaded/src/main/protobuf/NamespacePropertiesMessage.proto
rename to
hbase-protocol-shaded/src/main/protobuf/rest/NamespacePropertiesMessage.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/NamespacesMessage.proto
b/hbase-protocol-shaded/src/main/protobuf/rest/NamespacesMessage.proto
similarity index 96%
rename from hbase-protocol-shaded/src/main/protobuf/NamespacesMessage.proto
rename to hbase-protocol-shaded/src/main/protobuf/rest/NamespacesMessage.proto
index 6627e0d..229a1f6 100644
--- a/hbase-protocol-shaded/src/main/protobuf/NamespacesMessage.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/rest/NamespacesMessage.proto
@@ -19,5 +19,5 @@ syntax = "proto2";
package org.apache.hadoop.hbase.shaded.rest.protobuf.generated;
message Namespaces {
- repeated string namespace = 1;
+ repeated string namespace = 1;
}
diff --git a/hbase-protocol-shaded/src/main/protobuf/ScannerMessage.proto
b/hbase-protocol-shaded/src/main/protobuf/rest/ScannerMessage.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/ScannerMessage.proto
rename to hbase-protocol-shaded/src/main/protobuf/rest/ScannerMessage.proto
diff --git
a/hbase-protocol-shaded/src/main/protobuf/StorageClusterStatusMessage.proto
b/hbase-protocol-shaded/src/main/protobuf/rest/StorageClusterStatusMessage.proto
similarity index 100%
rename from
hbase-protocol-shaded/src/main/protobuf/StorageClusterStatusMessage.proto
rename to
hbase-protocol-shaded/src/main/protobuf/rest/StorageClusterStatusMessage.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/TableInfoMessage.proto
b/hbase-protocol-shaded/src/main/protobuf/rest/TableInfoMessage.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/TableInfoMessage.proto
rename to hbase-protocol-shaded/src/main/protobuf/rest/TableInfoMessage.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/TableListMessage.proto
b/hbase-protocol-shaded/src/main/protobuf/rest/TableListMessage.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/TableListMessage.proto
rename to hbase-protocol-shaded/src/main/protobuf/rest/TableListMessage.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/TableSchemaMessage.proto
b/hbase-protocol-shaded/src/main/protobuf/rest/TableSchemaMessage.proto
similarity index 96%
rename from hbase-protocol-shaded/src/main/protobuf/TableSchemaMessage.proto
rename to hbase-protocol-shaded/src/main/protobuf/rest/TableSchemaMessage.proto
index 3edc2b8..6135716 100644
--- a/hbase-protocol-shaded/src/main/protobuf/TableSchemaMessage.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/rest/TableSchemaMessage.proto
@@ -16,7 +16,7 @@
* limitations under the License.
*/
syntax = "proto2";
-import "ColumnSchemaMessage.proto";
+import "rest/ColumnSchemaMessage.proto";
package org.apache.hadoop.hbase.shaded.rest.protobuf.generated;
@@ -25,7 +25,7 @@ message TableSchema {
message Attribute {
required string name = 1;
required string value = 2;
- }
+ }
repeated Attribute attrs = 2;
repeated ColumnSchema columns = 3;
// optional helpful encodings of commonly used attributes
diff --git a/hbase-protocol-shaded/src/main/protobuf/VersionMessage.proto
b/hbase-protocol-shaded/src/main/protobuf/rest/VersionMessage.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/VersionMessage.proto
rename to hbase-protocol-shaded/src/main/protobuf/rest/VersionMessage.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/RPC.proto
b/hbase-protocol-shaded/src/main/protobuf/rpc/RPC.proto
similarity index 99%
rename from hbase-protocol-shaded/src/main/protobuf/RPC.proto
rename to hbase-protocol-shaded/src/main/protobuf/rpc/RPC.proto
index 1ccf6e8..7ef3eaf 100644
--- a/hbase-protocol-shaded/src/main/protobuf/RPC.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/rpc/RPC.proto
@@ -18,7 +18,7 @@
syntax = "proto2";
package hbase.pb;
-import "Tracing.proto";
+import "rpc/Tracing.proto";
import "HBase.proto";
option java_package = "org.apache.hadoop.hbase.shaded.protobuf.generated";
diff --git a/hbase-protocol-shaded/src/main/protobuf/Tracing.proto
b/hbase-protocol-shaded/src/main/protobuf/rpc/Tracing.proto
similarity index 95%
rename from hbase-protocol-shaded/src/main/protobuf/Tracing.proto
rename to hbase-protocol-shaded/src/main/protobuf/rpc/Tracing.proto
index 64ead84..de605d1 100644
--- a/hbase-protocol-shaded/src/main/protobuf/Tracing.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/rpc/Tracing.proto
@@ -24,9 +24,9 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
//Used to pass through the information necessary to continue
-//a trace after an RPC is made. All we need is the traceid
+//a trace after an RPC is made. All we need is the traceid
//(so we know the overarching trace this message is a part of), and
-//the id of the current span when this message was sent, so we know
+//the id of the current span when this message was sent, so we know
//what span caused the new span we will create when this message is received.
message RPCTInfo {
optional int64 trace_id = 1;
diff --git a/hbase-protocol-shaded/src/main/protobuf/ClusterId.proto
b/hbase-protocol-shaded/src/main/protobuf/server/ClusterId.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/ClusterId.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/ClusterId.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/ClusterStatus.proto
b/hbase-protocol-shaded/src/main/protobuf/server/ClusterStatus.proto
similarity index 99%
rename from hbase-protocol-shaded/src/main/protobuf/ClusterStatus.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/ClusterStatus.proto
index 8799926..c25d60c 100644
--- a/hbase-protocol-shaded/src/main/protobuf/ClusterStatus.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/server/ClusterStatus.proto
@@ -25,8 +25,8 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "HBase.proto";
-import "ClusterId.proto";
-import "FS.proto";
+import "server/ClusterId.proto";
+import "server/io/FS.proto";
message RegionState {
required RegionInfo region_info = 1;
diff --git a/hbase-protocol-shaded/src/main/protobuf/ErrorHandling.proto
b/hbase-protocol-shaded/src/main/protobuf/server/ErrorHandling.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/ErrorHandling.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/ErrorHandling.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/Procedure.proto
b/hbase-protocol-shaded/src/main/protobuf/server/Procedure.proto
similarity index 99%
rename from hbase-protocol-shaded/src/main/protobuf/Procedure.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/Procedure.proto
index c413307..8336b56 100644
--- a/hbase-protocol-shaded/src/main/protobuf/Procedure.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/server/Procedure.proto
@@ -25,7 +25,7 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "google/protobuf/any.proto";
-import "ErrorHandling.proto";
+import "server/ErrorHandling.proto";
enum ProcedureState {
INITIALIZING = 1; // Procedure in construction, not yet added to the
executor
diff --git a/hbase-protocol-shaded/src/main/protobuf/Quota.proto
b/hbase-protocol-shaded/src/main/protobuf/server/Quota.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/Quota.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/Quota.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/Snapshot.proto
b/hbase-protocol-shaded/src/main/protobuf/server/Snapshot.proto
similarity index 96%
rename from hbase-protocol-shaded/src/main/protobuf/Snapshot.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/Snapshot.proto
index 5faa7ab..0239d0c 100644
--- a/hbase-protocol-shaded/src/main/protobuf/Snapshot.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/server/Snapshot.proto
@@ -24,9 +24,9 @@ option java_generic_services = true;
option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
-import "AccessControl.proto";
-import "FS.proto";
import "HBase.proto";
+import "server/io/FS.proto";
+import "server/coprocessor/AccessControl.proto";
/**
* Description of the snapshot to take
diff --git a/hbase-protocol-shaded/src/main/protobuf/SnapshotCleanup.proto
b/hbase-protocol-shaded/src/main/protobuf/server/SnapshotCleanup.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/SnapshotCleanup.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/SnapshotCleanup.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/AccessControl.proto
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/AccessControl.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/AccessControl.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/coprocessor/AccessControl.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/Aggregate.proto
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/Aggregate.proto
similarity index 98%
rename from hbase-protocol-shaded/src/main/protobuf/Aggregate.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/coprocessor/Aggregate.proto
index 3f0e165..f76eff5 100644
--- a/hbase-protocol-shaded/src/main/protobuf/Aggregate.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/Aggregate.proto
@@ -24,7 +24,7 @@ option java_generic_services = true;
option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
-import "Client.proto";
+import "client/Client.proto";
message AggregateRequest {
/** The request passed to the AggregateService consists of three parts
diff --git a/hbase-protocol-shaded/src/main/protobuf/Authentication.proto
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/Authentication.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/Authentication.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/coprocessor/Authentication.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/Export.proto
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/Export.proto
similarity index 98%
rename from hbase-protocol-shaded/src/main/protobuf/Export.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/coprocessor/Export.proto
index 309e390..be8bbda 100644
--- a/hbase-protocol-shaded/src/main/protobuf/Export.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/Export.proto
@@ -24,7 +24,7 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
option java_generic_services = true;
-import "Client.proto";
+import "client/Client.proto";
service ExportService {
rpc export (ExportRequest) returns (ExportResponse);
diff --git a/hbase-protocol-shaded/src/main/protobuf/MultiRowMutation.proto
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/MultiRowMutation.proto
similarity index 98%
rename from hbase-protocol-shaded/src/main/protobuf/MultiRowMutation.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/coprocessor/MultiRowMutation.proto
index 2baa55a..bc015e1 100644
--- a/hbase-protocol-shaded/src/main/protobuf/MultiRowMutation.proto
+++
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/MultiRowMutation.proto
@@ -18,7 +18,7 @@
syntax = "proto2";
package hbase.pb;
-import "Client.proto";
+import "client/Client.proto";
import "HBase.proto";
option java_package = "org.apache.hadoop.hbase.shaded.protobuf.generated";
option java_outer_classname = "MultiRowMutationProtos";
diff --git a/hbase-protocol-shaded/src/main/protobuf/RowProcessor.proto
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/RowProcessor.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/RowProcessor.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/coprocessor/RowProcessor.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/VisibilityLabels.proto
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/VisibilityLabels.proto
similarity index 98%
rename from hbase-protocol-shaded/src/main/protobuf/VisibilityLabels.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/coprocessor/VisibilityLabels.proto
index bbbba77..baa58fe 100644
--- a/hbase-protocol-shaded/src/main/protobuf/VisibilityLabels.proto
+++
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/VisibilityLabels.proto
@@ -24,7 +24,7 @@ option java_generic_services = true;
option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
-import "Client.proto";
+import "client/Client.proto";
message VisibilityLabelsRequest {
repeated VisibilityLabel visLabel = 1;
@@ -81,4 +81,4 @@ service VisibilityLabelsService {
returns (GetAuthsResponse);
rpc listLabels(ListLabelsRequest)
returns (ListLabelsResponse);
-}
\ No newline at end of file
+}
diff --git a/hbase-protocol-shaded/src/main/protobuf/BulkDelete.proto
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/examples/BulkDelete.proto
similarity index 98%
rename from hbase-protocol-shaded/src/main/protobuf/BulkDelete.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/coprocessor/examples/BulkDelete.proto
index fc42df7..678afb9 100644
--- a/hbase-protocol-shaded/src/main/protobuf/BulkDelete.proto
+++
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/examples/BulkDelete.proto
@@ -24,7 +24,7 @@ option java_generic_services = true;
option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
-import "Client.proto";
+import "client/Client.proto";
message BulkDeleteRequest {
required Scan scan = 1;
diff --git a/hbase-protocol-shaded/src/main/protobuf/RefreshHFiles.proto
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/examples/RefreshHFiles.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/RefreshHFiles.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/coprocessor/examples/RefreshHFiles.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/Examples.proto
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/examples/RowCount.proto
similarity index 96%
rename from hbase-protocol-shaded/src/main/protobuf/Examples.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/coprocessor/examples/RowCount.proto
index c1f5839..8c6e82b 100644
--- a/hbase-protocol-shaded/src/main/protobuf/Examples.proto
+++
b/hbase-protocol-shaded/src/main/protobuf/server/coprocessor/examples/RowCount.proto
@@ -19,7 +19,7 @@ syntax = "proto2";
package hbase.pb;
option java_package =
"org.apache.hadoop.hbase.shaded.coprocessor.example.generated";
-option java_outer_classname = "ExampleProtos";
+option java_outer_classname = "RowCountProtos";
option java_generic_services = true;
option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
diff --git a/hbase-protocol-shaded/src/main/protobuf/BucketCacheEntry.proto
b/hbase-protocol-shaded/src/main/protobuf/server/io/BucketCacheEntry.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/BucketCacheEntry.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/io/BucketCacheEntry.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/FS.proto
b/hbase-protocol-shaded/src/main/protobuf/server/io/FS.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/FS.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/io/FS.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/HFile.proto
b/hbase-protocol-shaded/src/main/protobuf/server/io/HFile.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/HFile.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/io/HFile.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/LockService.proto
b/hbase-protocol-shaded/src/main/protobuf/server/master/LockService.proto
similarity index 98%
rename from hbase-protocol-shaded/src/main/protobuf/LockService.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/master/LockService.proto
index 0675070..7b5de98 100644
--- a/hbase-protocol-shaded/src/main/protobuf/LockService.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/server/master/LockService.proto
@@ -26,7 +26,7 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "HBase.proto";
-import "Procedure.proto";
+import "server/Procedure.proto";
enum LockType {
EXCLUSIVE = 1;
diff --git a/hbase-protocol-shaded/src/main/protobuf/Master.proto
b/hbase-protocol-shaded/src/main/protobuf/server/master/Master.proto
similarity index 98%
rename from hbase-protocol-shaded/src/main/protobuf/Master.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/master/Master.proto
index 60eacda..665907a 100644
--- a/hbase-protocol-shaded/src/main/protobuf/Master.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/server/master/Master.proto
@@ -28,16 +28,16 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "HBase.proto";
-import "Client.proto";
-import "ClusterStatus.proto";
-import "ErrorHandling.proto";
-import "LockService.proto";
-import "Procedure.proto";
-import "Quota.proto";
-import "Replication.proto";
-import "Snapshot.proto";
-import "AccessControl.proto";
-import "RSGroupAdmin.proto";
+import "client/Client.proto";
+import "server/Quota.proto";
+import "server/Snapshot.proto";
+import "server/Procedure.proto";
+import "server/ClusterStatus.proto";
+import "server/ErrorHandling.proto";
+import "server/master/LockService.proto";
+import "server/master/Replication.proto";
+import "server/rsgroup/RSGroupAdmin.proto";
+import "server/coprocessor/AccessControl.proto";
/* Column-level protobufs */
diff --git a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto
b/hbase-protocol-shaded/src/main/protobuf/server/master/MasterProcedure.proto
similarity index 99%
rename from hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/master/MasterProcedure.proto
index 381e03d..5171e66 100644
--- a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto
+++
b/hbase-protocol-shaded/src/main/protobuf/server/master/MasterProcedure.proto
@@ -25,10 +25,10 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "HBase.proto";
-import "RPC.proto";
-import "Snapshot.proto";
-import "Replication.proto";
-import "RegionServerStatus.proto";
+import "rpc/RPC.proto";
+import "server/Snapshot.proto";
+import "server/master/Replication.proto";
+import "server/master/RegionServerStatus.proto";
// ============================================================================
// WARNING - Compatibility rules
diff --git a/hbase-protocol-shaded/src/main/protobuf/RegionServerStatus.proto
b/hbase-protocol-shaded/src/main/protobuf/server/master/RegionServerStatus.proto
similarity index 98%
rename from hbase-protocol-shaded/src/main/protobuf/RegionServerStatus.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/master/RegionServerStatus.proto
index 0137cb1..c894a77 100644
--- a/hbase-protocol-shaded/src/main/protobuf/RegionServerStatus.proto
+++
b/hbase-protocol-shaded/src/main/protobuf/server/master/RegionServerStatus.proto
@@ -27,8 +27,8 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "HBase.proto";
-import "ClusterStatus.proto";
-import "ErrorHandling.proto";
+import "server/ClusterStatus.proto";
+import "server/ErrorHandling.proto";
message RegionServerStartupRequest {
/** Port number this regionserver is up on */
diff --git a/hbase-protocol-shaded/src/main/protobuf/Replication.proto
b/hbase-protocol-shaded/src/main/protobuf/server/master/Replication.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/Replication.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/master/Replication.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/Admin.proto
b/hbase-protocol-shaded/src/main/protobuf/server/region/Admin.proto
similarity index 98%
rename from hbase-protocol-shaded/src/main/protobuf/Admin.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/region/Admin.proto
index 8dd5516..adeaca4 100644
--- a/hbase-protocol-shaded/src/main/protobuf/Admin.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/server/region/Admin.proto
@@ -25,11 +25,11 @@ option java_generic_services = true;
option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
-import "ClusterStatus.proto";
import "HBase.proto";
-import "WAL.proto";
-import "Quota.proto";
-import "TooSlowLog.proto";
+import "server/Quota.proto";
+import "server/ClusterStatus.proto";
+import "server/region/WAL.proto";
+import "server/region/TooSlowLog.proto";
message GetRegionInfoRequest {
required RegionSpecifier region = 1;
diff --git a/hbase-protocol-shaded/src/main/protobuf/TooSlowLog.proto
b/hbase-protocol-shaded/src/main/protobuf/server/region/TooSlowLog.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/TooSlowLog.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/region/TooSlowLog.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/WAL.proto
b/hbase-protocol-shaded/src/main/protobuf/server/region/WAL.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/WAL.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/region/WAL.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/RSGroup.proto
b/hbase-protocol-shaded/src/main/protobuf/server/rsgroup/RSGroup.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/RSGroup.proto
rename to hbase-protocol-shaded/src/main/protobuf/server/rsgroup/RSGroup.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/RSGroupAdmin.proto
b/hbase-protocol-shaded/src/main/protobuf/server/rsgroup/RSGroupAdmin.proto
similarity index 99%
rename from hbase-protocol-shaded/src/main/protobuf/RSGroupAdmin.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/rsgroup/RSGroupAdmin.proto
index 6c522c6..e279e31 100644
--- a/hbase-protocol-shaded/src/main/protobuf/RSGroupAdmin.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/server/rsgroup/RSGroupAdmin.proto
@@ -25,7 +25,7 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "HBase.proto";
-import "RSGroup.proto";
+import "server/rsgroup/RSGroup.proto";
/** Group level protobufs */
diff --git a/hbase-protocol-shaded/src/main/protobuf/LoadBalancer.proto
b/hbase-protocol-shaded/src/main/protobuf/server/zookeeper/LoadBalancer.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/LoadBalancer.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/zookeeper/LoadBalancer.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/RegionNormalizer.proto
b/hbase-protocol-shaded/src/main/protobuf/server/zookeeper/RegionNormalizer.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/RegionNormalizer.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/zookeeper/RegionNormalizer.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto
b/hbase-protocol-shaded/src/main/protobuf/server/zookeeper/ZooKeeper.proto
similarity index 98%
rename from hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto
rename to
hbase-protocol-shaded/src/main/protobuf/server/zookeeper/ZooKeeper.proto
index 383388b..17fa31f 100644
--- a/hbase-protocol-shaded/src/main/protobuf/ZooKeeper.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/server/zookeeper/ZooKeeper.proto
@@ -28,7 +28,7 @@ option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "HBase.proto";
-import "ClusterStatus.proto";
+import "server/ClusterStatus.proto";
/**
* Content of the meta-region-server znode.
diff --git
a/hbase-protocol-shaded/src/main/protobuf/ColumnAggregationNullResponseProtocol.proto
b/hbase-protocol-shaded/src/main/protobuf/test/coprocessor/ColumnAggregationNullResponseProtocol.proto
similarity index 100%
rename from
hbase-protocol-shaded/src/main/protobuf/ColumnAggregationNullResponseProtocol.proto
rename to
hbase-protocol-shaded/src/main/protobuf/test/coprocessor/ColumnAggregationNullResponseProtocol.proto
diff --git
a/hbase-protocol-shaded/src/main/protobuf/ColumnAggregationProtocol.proto
b/hbase-protocol-shaded/src/main/protobuf/test/coprocessor/ColumnAggregationProtocol.proto
similarity index 100%
rename from
hbase-protocol-shaded/src/main/protobuf/ColumnAggregationProtocol.proto
rename to
hbase-protocol-shaded/src/main/protobuf/test/coprocessor/ColumnAggregationProtocol.proto
diff --git
a/hbase-protocol-shaded/src/main/protobuf/ColumnAggregationWithErrorsProtocol.proto
b/hbase-protocol-shaded/src/main/protobuf/test/coprocessor/ColumnAggregationWithErrorsProtocol.proto
similarity index 100%
rename from
hbase-protocol-shaded/src/main/protobuf/ColumnAggregationWithErrorsProtocol.proto
rename to
hbase-protocol-shaded/src/main/protobuf/test/coprocessor/ColumnAggregationWithErrorsProtocol.proto
diff --git
a/hbase-protocol-shaded/src/main/protobuf/DummyRegionServerEndpoint.proto
b/hbase-protocol-shaded/src/main/protobuf/test/coprocessor/DummyRegionServerEndpoint.proto
similarity index 100%
rename from
hbase-protocol-shaded/src/main/protobuf/DummyRegionServerEndpoint.proto
rename to
hbase-protocol-shaded/src/main/protobuf/test/coprocessor/DummyRegionServerEndpoint.proto
diff --git
a/hbase-protocol-shaded/src/main/protobuf/IncrementCounterProcessor.proto
b/hbase-protocol-shaded/src/main/protobuf/test/coprocessor/IncrementCounterProcessor.proto
similarity index 100%
rename from
hbase-protocol-shaded/src/main/protobuf/IncrementCounterProcessor.proto
rename to
hbase-protocol-shaded/src/main/protobuf/test/coprocessor/IncrementCounterProcessor.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/PingProtocol.proto
b/hbase-protocol-shaded/src/main/protobuf/test/coprocessor/PingProtocol.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/PingProtocol.proto
rename to
hbase-protocol-shaded/src/main/protobuf/test/coprocessor/PingProtocol.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/TestProcedure.proto
b/hbase-protocol-shaded/src/main/protobuf/test/ipc/TestProcedure.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/TestProcedure.proto
rename to hbase-protocol-shaded/src/main/protobuf/test/ipc/TestProcedure.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/test.proto
b/hbase-protocol-shaded/src/main/protobuf/test/ipc/test.proto
similarity index 100%
rename from hbase-protocol-shaded/src/main/protobuf/test.proto
rename to hbase-protocol-shaded/src/main/protobuf/test/ipc/test.proto
diff --git a/hbase-protocol-shaded/src/main/protobuf/test_rpc_service.proto
b/hbase-protocol-shaded/src/main/protobuf/test/ipc/test_rpc_service.proto
similarity index 97%
rename from hbase-protocol-shaded/src/main/protobuf/test_rpc_service.proto
rename to
hbase-protocol-shaded/src/main/protobuf/test/ipc/test_rpc_service.proto
index 03ac385..2dcf1d8 100644
--- a/hbase-protocol-shaded/src/main/protobuf/test_rpc_service.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/test/ipc/test_rpc_service.proto
@@ -21,7 +21,7 @@ option java_outer_classname = "TestRpcServiceProtos";
option java_generic_services = true;
option java_generate_equals_and_hash = true;
-import "test.proto";
+import "test/ipc/test.proto";
/**