bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhai...@apache.org
Subject [bookkeeper] branch branch-4.6 updated: ISSUE #739: Move the implementation of http services to be under server package
Date Fri, 17 Nov 2017 03:52:19 GMT
This is an automated email from the ASF dual-hosted git repository.

zhaijia pushed a commit to branch branch-4.6
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/branch-4.6 by this push:
     new 21d5b38  ISSUE #739: Move the implementation of http services to be under server
package
21d5b38 is described below

commit 21d5b38acd09a4c409f061e168dfddc61bee930d
Author: Sijie Guo <sijie@apache.org>
AuthorDate: Fri Nov 17 11:51:38 2017 +0800

    ISSUE #739: Move the implementation of http services to be under server package
    
    Descriptions of the changes in this PR:
    
    bookkeeper-http module provides the framework for http admin rest api. it is using 'org.apache.bookkeeper.http'
and 'org.apache.bookkeeper.http.service. the http package inbookkeeper-server` is reusing
these two packages. it is not good for two modules sharing same package name, it is going
to be confusing javadoc.
    
    Author: Sijie Guo <sijie@apache.org>
    
    Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Jia Zhai <None>
    
    This closes #740 from sijie/http_impl, closes #739
    
    (cherry picked from commit 2b660b1e06a9b0deac011d0d6b8a2e990bf974b9)
    Signed-off-by: Jia Zhai <zhaijia@apache.org>
---
 .../org/apache/bookkeeper/http/package-info.java   | 20 -----------------
 .../bookkeeper/replication/AutoRecoveryMain.java   |  2 +-
 .../java/org/apache/bookkeeper/server/Main.java    |  2 +-
 .../{ => server}/http/BKHttpServiceProvider.java   | 26 +++++++++++++++++-----
 .../bookkeeper/server/http/package-info.java       | 22 ++++++++++++++++++
 .../http/service}/ConfigurationService.java        |  7 +++---
 .../http/service}/DecommissionService.java         |  7 +++---
 .../http/service}/DeleteLedgerService.java         |  7 +++---
 .../http/service}/ExpandStorageService.java        |  8 +++----
 .../http/service}/GetLastLogMarkService.java       |  7 +++---
 .../http/service}/GetLedgerMetaService.java        |  7 +++---
 .../http/service}/ListBookieInfoService.java       |  7 +++---
 .../http/service}/ListBookiesService.java          |  7 +++---
 .../http/service}/ListDiskFilesService.java        |  7 +++---
 .../http/service}/ListLedgerService.java           |  7 +++---
 .../service}/ListUnderReplicatedLedgerService.java |  7 +++---
 .../service}/LostBookieRecoveryDelayService.java   |  7 +++---
 .../http/service}/ReadLedgerEntryService.java      |  7 +++---
 .../http/service}/RecoveryBookieService.java       |  7 +++---
 .../http/service}/TriggerAuditService.java         |  7 +++---
 .../http/service}/WhoIsAuditorService.java         |  7 +++---
 .../server/http/service/package-info.java          | 23 +++++++++++++++++++
 .../bookkeeper/server/service/HttpService.java     |  3 ++-
 .../{ => server}/http/TestHttpService.java         | 10 +++------
 24 files changed, 121 insertions(+), 100 deletions(-)

diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/package-info.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/package-info.java
deleted file mode 100644
index d472519..0000000
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/package-info.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-/**
- * Package for bookkeeper http service.
- */
-package org.apache.bookkeeper.http;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/AutoRecoveryMain.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/AutoRecoveryMain.java
index 5caac6f..c818c62 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/AutoRecoveryMain.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/AutoRecoveryMain.java
@@ -30,7 +30,7 @@ import org.apache.bookkeeper.bookie.Bookie;
 import org.apache.bookkeeper.bookie.BookieCriticalThread;
 import org.apache.bookkeeper.bookie.ExitCode;
 import org.apache.bookkeeper.conf.ServerConfiguration;
-import org.apache.bookkeeper.http.BKHttpServiceProvider;
+import org.apache.bookkeeper.server.http.BKHttpServiceProvider;
 import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.HttpServerLoader;
 import org.apache.bookkeeper.replication.ReplicationException.CompatibilityException;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/Main.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/Main.java
index 9ba9d71..c2f7b8e 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/Main.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/Main.java
@@ -32,9 +32,9 @@ import org.apache.bookkeeper.common.component.ComponentStarter;
 import org.apache.bookkeeper.common.component.LifecycleComponent;
 import org.apache.bookkeeper.common.component.LifecycleComponentStack;
 import org.apache.bookkeeper.conf.ServerConfiguration;
-import org.apache.bookkeeper.http.BKHttpServiceProvider;
 import org.apache.bookkeeper.server.component.ServerLifecycleComponent;
 import org.apache.bookkeeper.server.conf.BookieConfiguration;
+import org.apache.bookkeeper.server.http.BKHttpServiceProvider;
 import org.apache.bookkeeper.server.service.AutoRecoveryService;
 import org.apache.bookkeeper.server.service.BookieService;
 import org.apache.bookkeeper.server.service.HttpService;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/BKHttpServiceProvider.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/BKHttpServiceProvider.java
similarity index 83%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/BKHttpServiceProvider.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/BKHttpServiceProvider.java
index 38eb007..a733c50 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/BKHttpServiceProvider.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/BKHttpServiceProvider.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,9 +15,8 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http;
 
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import java.io.IOException;
@@ -30,12 +28,30 @@ import org.apache.bookkeeper.client.BKException;
 import org.apache.bookkeeper.client.BookKeeperAdmin;
 import org.apache.bookkeeper.conf.ClientConfiguration;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer.ApiType;
+import org.apache.bookkeeper.http.HttpServiceProvider;
 import org.apache.bookkeeper.http.service.ErrorHttpService;
 import org.apache.bookkeeper.http.service.HeartbeatService;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.proto.BookieServer;
 import org.apache.bookkeeper.replication.Auditor;
 import org.apache.bookkeeper.replication.AutoRecoveryMain;
+import org.apache.bookkeeper.server.http.service.ConfigurationService;
+import org.apache.bookkeeper.server.http.service.DecommissionService;
+import org.apache.bookkeeper.server.http.service.DeleteLedgerService;
+import org.apache.bookkeeper.server.http.service.ExpandStorageService;
+import org.apache.bookkeeper.server.http.service.GetLastLogMarkService;
+import org.apache.bookkeeper.server.http.service.GetLedgerMetaService;
+import org.apache.bookkeeper.server.http.service.ListBookieInfoService;
+import org.apache.bookkeeper.server.http.service.ListBookiesService;
+import org.apache.bookkeeper.server.http.service.ListDiskFilesService;
+import org.apache.bookkeeper.server.http.service.ListLedgerService;
+import org.apache.bookkeeper.server.http.service.ListUnderReplicatedLedgerService;
+import org.apache.bookkeeper.server.http.service.LostBookieRecoveryDelayService;
+import org.apache.bookkeeper.server.http.service.ReadLedgerEntryService;
+import org.apache.bookkeeper.server.http.service.RecoveryBookieService;
+import org.apache.bookkeeper.server.http.service.TriggerAuditService;
+import org.apache.bookkeeper.server.http.service.WhoIsAuditorService;
 import org.apache.bookkeeper.zookeeper.ZooKeeperClient;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.ZooKeeper;
@@ -139,7 +155,7 @@ public class BKHttpServiceProvider implements HttpServiceProvider {
     }
 
     @Override
-    public HttpEndpointService provideHttpEndpointService(HttpServer.ApiType type) {
+    public HttpEndpointService provideHttpEndpointService(ApiType type) {
         ServerConfiguration configuration = getServerConf();
         if (configuration == null) {
             return new ErrorHttpService();
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/package-info.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/package-info.java
new file mode 100644
index 0000000..ce29915
--- /dev/null
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Package for bookkeeper http service.
+ */
+package org.apache.bookkeeper.server.http;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ConfigurationService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ConfigurationService.java
similarity index 97%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ConfigurationService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ConfigurationService.java
index a7f3407..0a8e8a3 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ConfigurationService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ConfigurationService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,9 +15,8 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import java.util.HashMap;
@@ -26,6 +24,7 @@ import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/DecommissionService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/DecommissionService.java
similarity index 97%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/DecommissionService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/DecommissionService.java
index 428c007..dd3f764 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/DecommissionService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/DecommissionService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,15 +15,15 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import java.util.HashMap;
 import java.util.concurrent.ExecutorService;
 import org.apache.bookkeeper.client.BookKeeperAdmin;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/DeleteLedgerService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/DeleteLedgerService.java
similarity index 97%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/DeleteLedgerService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/DeleteLedgerService.java
index 334aeed..6b25e1e 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/DeleteLedgerService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/DeleteLedgerService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,15 +15,15 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import java.util.Map;
 import org.apache.bookkeeper.client.BookKeeper;
 import org.apache.bookkeeper.conf.ClientConfiguration;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ExpandStorageService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ExpandStorageService.java
similarity index 97%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ExpandStorageService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ExpandStorageService.java
index cd87a24..9ff5411 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ExpandStorageService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ExpandStorageService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,14 +15,12 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
 import java.io.File;
-import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
 import org.apache.bookkeeper.bookie.Bookie;
@@ -31,6 +28,7 @@ import org.apache.bookkeeper.bookie.BookieException;
 import org.apache.bookkeeper.conf.ServerConfiguration;
 import org.apache.bookkeeper.discover.RegistrationManager;
 import org.apache.bookkeeper.discover.ZKRegistrationManager;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/GetLastLogMarkService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/GetLastLogMarkService.java
similarity index 97%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/GetLastLogMarkService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/GetLastLogMarkService.java
index 7d699da..92ad78d 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/GetLastLogMarkService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/GetLastLogMarkService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,9 +15,8 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
@@ -30,6 +28,7 @@ import org.apache.bookkeeper.bookie.Journal;
 import org.apache.bookkeeper.bookie.LedgerDirsManager;
 import org.apache.bookkeeper.bookie.LogMark;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/GetLedgerMetaService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/GetLedgerMetaService.java
similarity index 97%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/GetLedgerMetaService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/GetLedgerMetaService.java
index db0bb62..43889d3 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/GetLedgerMetaService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/GetLedgerMetaService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,9 +15,8 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import static com.google.common.base.Charsets.UTF_8;
 
@@ -27,6 +25,7 @@ import com.google.common.collect.Maps;
 import java.util.Map;
 import org.apache.bookkeeper.client.LedgerMetadata;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListBookieInfoService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListBookieInfoService.java
similarity index 98%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListBookieInfoService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListBookieInfoService.java
index 083ee8b..d0979c7 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListBookieInfoService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListBookieInfoService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,9 +15,8 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
@@ -30,6 +28,7 @@ import org.apache.bookkeeper.client.BookKeeper;
 import org.apache.bookkeeper.client.BookieInfoReader;
 import org.apache.bookkeeper.conf.ClientConfiguration;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListBookiesService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListBookiesService.java
similarity index 97%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListBookiesService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListBookiesService.java
index f7e5fe4..f0275a1 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListBookiesService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListBookiesService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,9 +15,8 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
@@ -27,6 +25,7 @@ import java.util.Collection;
 import java.util.Map;
 import org.apache.bookkeeper.client.BookKeeperAdmin;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListDiskFilesService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListDiskFilesService.java
similarity index 98%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListDiskFilesService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListDiskFilesService.java
index 72871b5..d557f98 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListDiskFilesService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListDiskFilesService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,9 +15,8 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import static org.apache.bookkeeper.bookie.BookieShell.listFilesAndSort;
 
@@ -28,6 +26,7 @@ import java.io.File;
 import java.util.List;
 import java.util.Map;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListLedgerService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListLedgerService.java
similarity index 98%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListLedgerService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListLedgerService.java
index b500c18..75d9629 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListLedgerService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListLedgerService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,9 +15,8 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import static com.google.common.base.Charsets.UTF_8;
 
@@ -32,6 +30,7 @@ import java.util.Map;
 import org.apache.bookkeeper.client.BKException;
 import org.apache.bookkeeper.client.LedgerMetadata;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListUnderReplicatedLedgerService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListUnderReplicatedLedgerService.java
similarity index 98%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListUnderReplicatedLedgerService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListUnderReplicatedLedgerService.java
index 01d5853..01929bb 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ListUnderReplicatedLedgerService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ListUnderReplicatedLedgerService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,9 +15,8 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
@@ -27,6 +25,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.function.Predicate;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/LostBookieRecoveryDelayService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/LostBookieRecoveryDelayService.java
similarity index 97%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/LostBookieRecoveryDelayService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/LostBookieRecoveryDelayService.java
index 0098e07..1a2ed61 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/LostBookieRecoveryDelayService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/LostBookieRecoveryDelayService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,14 +15,14 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import java.util.HashMap;
 import org.apache.bookkeeper.client.BookKeeperAdmin;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ReadLedgerEntryService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ReadLedgerEntryService.java
similarity index 98%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ReadLedgerEntryService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ReadLedgerEntryService.java
index a380f19..7454bc3 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/ReadLedgerEntryService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/ReadLedgerEntryService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,9 +15,8 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import static com.google.common.base.Charsets.US_ASCII;
 
@@ -29,6 +27,7 @@ import java.util.Map;
 import org.apache.bookkeeper.client.BookKeeperAdmin;
 import org.apache.bookkeeper.client.LedgerEntry;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/RecoveryBookieService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/RecoveryBookieService.java
similarity index 98%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/RecoveryBookieService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/RecoveryBookieService.java
index cfbb921..ecce428 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/RecoveryBookieService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/RecoveryBookieService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,9 +15,8 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import java.util.List;
@@ -27,6 +25,7 @@ import org.apache.bookkeeper.bookie.Cookie;
 import org.apache.bookkeeper.client.BookKeeperAdmin;
 import org.apache.bookkeeper.conf.ServerConfiguration;
 import org.apache.bookkeeper.discover.RegistrationManager;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/TriggerAuditService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/TriggerAuditService.java
similarity index 96%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/TriggerAuditService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/TriggerAuditService.java
index 3f6ed8a..30b580e 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/TriggerAuditService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/TriggerAuditService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,13 +15,13 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import org.apache.bookkeeper.client.BookKeeperAdmin;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/WhoIsAuditorService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/WhoIsAuditorService.java
similarity index 97%
rename from bookkeeper-server/src/main/java/org/apache/bookkeeper/http/WhoIsAuditorService.java
rename to bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/WhoIsAuditorService.java
index 2e4837c..baf9f80 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/http/WhoIsAuditorService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/WhoIsAuditorService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,12 +15,12 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http.service;
 
 import com.google.common.base.Preconditions;
 import org.apache.bookkeeper.conf.ServerConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/package-info.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/package-info.java
new file mode 100644
index 0000000..5dce07c
--- /dev/null
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Define the services running in bookkeeper admin http server.
+ */
+package org.apache.bookkeeper.server.http.service;
\ No newline at end of file
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/service/HttpService.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/service/HttpService.java
index 3f81377..8a86ffa 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/service/HttpService.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/service/HttpService.java
@@ -21,11 +21,12 @@ package org.apache.bookkeeper.server.service;
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import java.io.IOException;
-import org.apache.bookkeeper.http.BKHttpServiceProvider;
+
 import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.HttpServerLoader;
 import org.apache.bookkeeper.server.component.ServerLifecycleComponent;
 import org.apache.bookkeeper.server.conf.BookieConfiguration;
+import org.apache.bookkeeper.server.http.BKHttpServiceProvider;
 import org.apache.bookkeeper.stats.StatsLogger;
 
 /**
diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/http/TestHttpService.java
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/server/http/TestHttpService.java
similarity index 99%
rename from bookkeeper-server/src/test/java/org/apache/bookkeeper/http/TestHttpService.java
rename to bookkeeper-server/src/test/java/org/apache/bookkeeper/server/http/TestHttpService.java
index 5be680f..62fe6de 100644
--- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/http/TestHttpService.java
+++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/server/http/TestHttpService.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -16,35 +15,32 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.bookkeeper.http;
+package org.apache.bookkeeper.server.http;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import com.google.common.base.Stopwatch;
 import com.google.common.collect.Maps;
 import java.io.File;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.TimeUnit;
 import org.apache.bookkeeper.client.BookKeeper;
 import org.apache.bookkeeper.client.LedgerHandle;
 import org.apache.bookkeeper.client.LedgerHandleAdapter;
 import org.apache.bookkeeper.client.LedgerMetadata;
 import org.apache.bookkeeper.conf.ServerConfiguration;
 import org.apache.bookkeeper.conf.TestBKConfiguration;
+import org.apache.bookkeeper.http.HttpServer;
 import org.apache.bookkeeper.http.service.HttpEndpointService;
 import org.apache.bookkeeper.http.service.HttpServiceRequest;
 import org.apache.bookkeeper.http.service.HttpServiceResponse;
 import org.apache.bookkeeper.meta.LedgerManager;
 import org.apache.bookkeeper.meta.LedgerManagerFactory;
 import org.apache.bookkeeper.meta.LedgerUnderreplicationManager;
-import org.apache.bookkeeper.metastore.InMemoryMetaStore;
 import org.apache.bookkeeper.net.BookieSocketAddress;
 import org.apache.bookkeeper.replication.AuditorElector;
 import org.apache.bookkeeper.test.BookKeeperClusterTestCase;

-- 
To stop receiving notification emails like this one, please contact
['"commits@bookkeeper.apache.org" <commits@bookkeeper.apache.org>'].

Mime
View raw message