From 9b9c494df57fd3d78a332fab4af85fa39f4d22c9 Mon Sep 17 00:00:00 2001 From: Hari Shreedharan Date: Thu, 12 Nov 2015 15:38:00 -0800 Subject: [PATCH] SQOOP-2669. Sqoop2: Drop Links and Jobs servlet (Jarcec via Hari) --- .../apache/sqoop/server/SqoopJettyServer.java | 2 - .../apache/sqoop/server/v1/JobsServlet.java | 49 ------------------- .../apache/sqoop/server/v1/LinksServlet.java | 49 ------------------- 3 files changed, 100 deletions(-) delete mode 100644 server/src/main/java/org/apache/sqoop/server/v1/JobsServlet.java delete mode 100644 server/src/main/java/org/apache/sqoop/server/v1/LinksServlet.java diff --git a/server/src/main/java/org/apache/sqoop/server/SqoopJettyServer.java b/server/src/main/java/org/apache/sqoop/server/SqoopJettyServer.java index 3c46b1a2..2c4cb7a1 100644 --- a/server/src/main/java/org/apache/sqoop/server/SqoopJettyServer.java +++ b/server/src/main/java/org/apache/sqoop/server/SqoopJettyServer.java @@ -108,9 +108,7 @@ private static ServletContextHandler createServletContextHandler() { context.addServlet(ConnectorServlet.class, "/v1/connector/*"); context.addServlet(DriverServlet.class, "/v1/driver/*"); context.addServlet(JobServlet.class, "/v1/job/*"); - context.addServlet(JobsServlet.class, "/v1/jobs/*"); context.addServlet(LinkServlet.class, "/v1/link/*"); - context.addServlet(LinksServlet.class, "/v1/links/*"); context.addServlet(SubmissionsServlet.class, "/v1/submissions/*"); context.addServlet(VersionServlet.class, "/version"); context.addFilter(SqoopAuthenticationFilter.class, "/*", EnumSet.allOf(DispatcherType.class)); diff --git a/server/src/main/java/org/apache/sqoop/server/v1/JobsServlet.java b/server/src/main/java/org/apache/sqoop/server/v1/JobsServlet.java deleted file mode 100644 index 97366cd5..00000000 --- a/server/src/main/java/org/apache/sqoop/server/v1/JobsServlet.java +++ /dev/null @@ -1,49 +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 org.apache.sqoop.server.v1; - -import org.apache.sqoop.handler.JobRequestHandler; -import org.apache.sqoop.json.JsonBean; -import org.apache.sqoop.server.RequestContext; -import org.apache.sqoop.server.RequestHandler; -import org.apache.sqoop.server.SqoopProtocolServlet; - - -/** - * Displays all or jobs per connector in sqoop - * - * GET /v1/jobs - * Return details about every jobs that exists in the sqoop system - * GET /v1/jobs?cname= - * Return details about job(s) for a given connector name {cname} -*/ -@SuppressWarnings("serial") -public class JobsServlet extends SqoopProtocolServlet { - private static final long serialVersionUID = 1L; - - private RequestHandler jobRequestHandler; - - public JobsServlet() { - jobRequestHandler = new JobRequestHandler(); - } - - @Override - protected JsonBean handleGetRequest(RequestContext ctx) throws Exception { - return jobRequestHandler.handleEvent(ctx); - } -} diff --git a/server/src/main/java/org/apache/sqoop/server/v1/LinksServlet.java b/server/src/main/java/org/apache/sqoop/server/v1/LinksServlet.java deleted file mode 100644 index d2ae0f70..00000000 --- a/server/src/main/java/org/apache/sqoop/server/v1/LinksServlet.java +++ /dev/null @@ -1,49 +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 org.apache.sqoop.server.v1; - -import org.apache.sqoop.handler.LinkRequestHandler; -import org.apache.sqoop.json.JsonBean; -import org.apache.sqoop.server.RequestContext; -import org.apache.sqoop.server.RequestHandler; -import org.apache.sqoop.server.SqoopProtocolServlet; - -/** - * Displays all or links per connector in sqoop - * - * GET /v1/links - * Return details about every link that exists in the sqoop system - * GET /v1/links?cname= - * Return details about link(s) for a given connector name {cname} -*/ -@SuppressWarnings("serial") -public class LinksServlet extends SqoopProtocolServlet { - private static final long serialVersionUID = 1L; - - private RequestHandler linkRequestHandler; - - public LinksServlet() { - linkRequestHandler = new LinkRequestHandler(); - } - - @Override - protected JsonBean handleGetRequest(RequestContext ctx) throws Exception { - return linkRequestHandler.handleEvent(ctx); - } - -}