5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-09 15:52:05 +08:00

SQOOP-2669. Sqoop2: Drop Links and Jobs servlet

(Jarcec via Hari)
This commit is contained in:
Hari Shreedharan 2015-11-12 15:38:00 -08:00
parent 6dde896158
commit 9b9c494df5
3 changed files with 0 additions and 100 deletions

View File

@ -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));

View File

@ -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);
}
}

View File

@ -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);
}
}