From b5d0e56aa09f80220a729fad136c8bb032fcddc2 Mon Sep 17 00:00:00 2001 From: Jarek Jarcec Cecho Date: Tue, 7 Aug 2012 12:24:55 +0000 Subject: [PATCH] SQOOP-531. Define connector execution lifecycle. (Bilung Lee via Jarek Jarcec Cecho) git-svn-id: https://svn.apache.org/repos/asf/sqoop/branches/sqoop2@1370203 13f79535-47bb-0310-9956-ffa450edef68 --- .../connector/jdbc/GenericJdbcConnector.java | 23 +++++++ .../jdbc/GenericJdbcExportDestroyer.java | 24 +++++++ .../jdbc/GenericJdbcExportInitializer.java | 24 +++++++ .../jdbc/GenericJdbcExportLoader.java | 24 +++++++ .../jdbc/GenericJdbcImportDestroyer.java | 24 +++++++ .../jdbc/GenericJdbcImportExtractor.java | 24 +++++++ .../jdbc/GenericJdbcImportInitializer.java | 24 +++++++ .../jdbc/GenericJdbcImportPartitioner.java | 24 +++++++ .../mysqljdbc/MySqlJdbcConnector.java | 14 +++++ .../sqoop/connector/spi/SqoopConnector.java | 13 ++++ .../org/apache/sqoop/job/etl/Destroyer.java | 26 ++++++++ .../org/apache/sqoop/job/etl/Exporter.java | 56 +++++++++++++++++ .../org/apache/sqoop/job/etl/Extractor.java | 26 ++++++++ .../org/apache/sqoop/job/etl/Importer.java | 62 +++++++++++++++++++ .../org/apache/sqoop/job/etl/Initializer.java | 26 ++++++++ .../java/org/apache/sqoop/job/etl/Loader.java | 25 ++++++++ .../org/apache/sqoop/job/etl/Partitioner.java | 26 ++++++++ 17 files changed, 465 insertions(+) create mode 100644 connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportDestroyer.java create mode 100644 connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportInitializer.java create mode 100644 connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportLoader.java create mode 100644 connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java create mode 100644 connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportExtractor.java create mode 100644 connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportInitializer.java create mode 100644 connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportPartitioner.java create mode 100644 spi/src/main/java/org/apache/sqoop/job/etl/Destroyer.java create mode 100644 spi/src/main/java/org/apache/sqoop/job/etl/Exporter.java create mode 100644 spi/src/main/java/org/apache/sqoop/job/etl/Extractor.java create mode 100644 spi/src/main/java/org/apache/sqoop/job/etl/Importer.java create mode 100644 spi/src/main/java/org/apache/sqoop/job/etl/Initializer.java create mode 100644 spi/src/main/java/org/apache/sqoop/job/etl/Loader.java create mode 100644 spi/src/main/java/org/apache/sqoop/job/etl/Partitioner.java diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java index 88fc7e54..c1adaea9 100644 --- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java +++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java @@ -22,6 +22,8 @@ import java.util.Locale; import java.util.ResourceBundle; +import org.apache.sqoop.job.etl.Exporter; +import org.apache.sqoop.job.etl.Importer; import org.apache.sqoop.model.MForm; import org.apache.sqoop.model.MInput; import org.apache.sqoop.model.MMapInput; @@ -33,6 +35,17 @@ public class GenericJdbcConnector implements SqoopConnector { private static final List CONNECTION_FORMS = new ArrayList(); private static final List JOB_FORMS = new ArrayList(); + private Importer IMPORTER = new Importer( + GenericJdbcImportInitializer.class, + GenericJdbcImportPartitioner.class, + GenericJdbcImportExtractor.class, + GenericJdbcImportDestroyer.class); + + private Exporter EXPORTER = new Exporter( + GenericJdbcExportInitializer.class, + GenericJdbcExportLoader.class, + GenericJdbcExportDestroyer.class); + static { // Build the connection form List> connFormInputs = new ArrayList>(); @@ -81,4 +94,14 @@ public List getJobForms() { return JOB_FORMS; } + @Override + public Importer getImporter() { + return IMPORTER; + } + + @Override + public Exporter getExporter() { + return EXPORTER; + } + } diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportDestroyer.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportDestroyer.java new file mode 100644 index 00000000..6a670bdf --- /dev/null +++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportDestroyer.java @@ -0,0 +1,24 @@ +/** + * 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.connector.jdbc; + +import org.apache.sqoop.job.etl.Destroyer; + +public class GenericJdbcExportDestroyer extends Destroyer { + +} diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportInitializer.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportInitializer.java new file mode 100644 index 00000000..6ee22249 --- /dev/null +++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportInitializer.java @@ -0,0 +1,24 @@ +/** + * 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.connector.jdbc; + +import org.apache.sqoop.job.etl.Initializer; + +public class GenericJdbcExportInitializer extends Initializer { + +} diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportLoader.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportLoader.java new file mode 100644 index 00000000..bb8a1f61 --- /dev/null +++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportLoader.java @@ -0,0 +1,24 @@ +/** + * 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.connector.jdbc; + +import org.apache.sqoop.job.etl.Loader; + +public class GenericJdbcExportLoader extends Loader { + +} diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java new file mode 100644 index 00000000..ac72529b --- /dev/null +++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java @@ -0,0 +1,24 @@ +/** + * 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.connector.jdbc; + +import org.apache.sqoop.job.etl.Destroyer; + +public class GenericJdbcImportDestroyer extends Destroyer { + +} diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportExtractor.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportExtractor.java new file mode 100644 index 00000000..29345166 --- /dev/null +++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportExtractor.java @@ -0,0 +1,24 @@ +/** + * 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.connector.jdbc; + +import org.apache.sqoop.job.etl.Extractor; + +public class GenericJdbcImportExtractor extends Extractor { + +} diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportInitializer.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportInitializer.java new file mode 100644 index 00000000..8d1cf61b --- /dev/null +++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportInitializer.java @@ -0,0 +1,24 @@ +/** + * 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.connector.jdbc; + +import org.apache.sqoop.job.etl.Initializer; + +public class GenericJdbcImportInitializer extends Initializer { + +} diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportPartitioner.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportPartitioner.java new file mode 100644 index 00000000..4113e74c --- /dev/null +++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportPartitioner.java @@ -0,0 +1,24 @@ +/** + * 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.connector.jdbc; + +import org.apache.sqoop.job.etl.Partitioner; + +public class GenericJdbcImportPartitioner extends Partitioner { + +} diff --git a/connector/connector-mysql-jdbc/src/main/java/org/apache/sqoop/connector/mysqljdbc/MySqlJdbcConnector.java b/connector/connector-mysql-jdbc/src/main/java/org/apache/sqoop/connector/mysqljdbc/MySqlJdbcConnector.java index 41e3e42a..bd5d5352 100644 --- a/connector/connector-mysql-jdbc/src/main/java/org/apache/sqoop/connector/mysqljdbc/MySqlJdbcConnector.java +++ b/connector/connector-mysql-jdbc/src/main/java/org/apache/sqoop/connector/mysqljdbc/MySqlJdbcConnector.java @@ -22,6 +22,8 @@ import java.util.Locale; import java.util.ResourceBundle; +import org.apache.sqoop.job.etl.Exporter; +import org.apache.sqoop.job.etl.Importer; import org.apache.sqoop.model.MForm; import org.apache.sqoop.connector.spi.SqoopConnector; @@ -46,4 +48,16 @@ public List getJobForms() { // TODO Auto-generated method stub return JOB_FORMS; } + + @Override + public Importer getImporter() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Exporter getExporter() { + // TODO Auto-generated method stub + return null; + } } diff --git a/spi/src/main/java/org/apache/sqoop/connector/spi/SqoopConnector.java b/spi/src/main/java/org/apache/sqoop/connector/spi/SqoopConnector.java index 43d7344a..0a71fcd0 100644 --- a/spi/src/main/java/org/apache/sqoop/connector/spi/SqoopConnector.java +++ b/spi/src/main/java/org/apache/sqoop/connector/spi/SqoopConnector.java @@ -21,6 +21,8 @@ import java.util.Locale; import java.util.ResourceBundle; +import org.apache.sqoop.job.etl.Exporter; +import org.apache.sqoop.job.etl.Importer; import org.apache.sqoop.model.MForm; /** @@ -46,4 +48,15 @@ public interface SqoopConnector { * by Sqoop to create a job object using this connector. */ public List getJobForms(); + + /** + * @return an Importer that provides classes for performing import. + */ + public Importer getImporter(); + + /** + * @return an Exporter that provides classes for performing export. + */ + public Exporter getExporter(); + } diff --git a/spi/src/main/java/org/apache/sqoop/job/etl/Destroyer.java b/spi/src/main/java/org/apache/sqoop/job/etl/Destroyer.java new file mode 100644 index 00000000..4f724b40 --- /dev/null +++ b/spi/src/main/java/org/apache/sqoop/job/etl/Destroyer.java @@ -0,0 +1,26 @@ +/** + * 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.job.etl; + +/** + * This allows connector to define work to complete execution, for example, + * resource cleaning. + */ +public abstract class Destroyer { + +} diff --git a/spi/src/main/java/org/apache/sqoop/job/etl/Exporter.java b/spi/src/main/java/org/apache/sqoop/job/etl/Exporter.java new file mode 100644 index 00000000..ef690bfd --- /dev/null +++ b/spi/src/main/java/org/apache/sqoop/job/etl/Exporter.java @@ -0,0 +1,56 @@ +/** + * 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.job.etl; + +/** + * This specifies classes that perform connector-defined steps + * within export execution: + * Initializer + * -> (framework-defined steps) + * -> Loader + * -> Destroyer + */ +public class Exporter { + + private Class initializer; + private Class loader; + private Class destroyer; + + public Exporter( + Class initializer, + Class loader, + Class destroyer + ) { + this.initializer = initializer; + this.loader = loader; + this.destroyer = destroyer; + } + + public Class getInitializer() { + return initializer; + } + + public Class getLoader() { + return loader; + } + + public Class getDestroyer() { + return destroyer; + } + +} diff --git a/spi/src/main/java/org/apache/sqoop/job/etl/Extractor.java b/spi/src/main/java/org/apache/sqoop/job/etl/Extractor.java new file mode 100644 index 00000000..27b56bf7 --- /dev/null +++ b/spi/src/main/java/org/apache/sqoop/job/etl/Extractor.java @@ -0,0 +1,26 @@ +/** + * 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.job.etl; + +/** + * This allows connector to extract data from a source system + * based on each partition. + */ +public abstract class Extractor { + +} diff --git a/spi/src/main/java/org/apache/sqoop/job/etl/Importer.java b/spi/src/main/java/org/apache/sqoop/job/etl/Importer.java new file mode 100644 index 00000000..f0a8d1af --- /dev/null +++ b/spi/src/main/java/org/apache/sqoop/job/etl/Importer.java @@ -0,0 +1,62 @@ +/** + * 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.job.etl; + +/** + * This specifies classes that perform connector-defined steps + * within import execution: + * Initializer + * -> Partitioner + * -> Extractor + * -> (framework-defined steps) + * -> Destroyer + */ +public class Importer { + + private Class initializer; + private Class partitioner; + private Class extractor; + private Class destroyer; + + public Importer(Class initializer, + Class partitioner, + Class extractor, + Class destroyer) { + this.initializer = initializer; + this.partitioner = partitioner; + this.extractor = extractor; + this.destroyer = destroyer; + } + + public Class getInitializer() { + return initializer; + } + + public Class getPartitioner() { + return partitioner; + } + + public Class getExtractor() { + return extractor; + } + + public Class getDestroyer() { + return destroyer; + } + +} diff --git a/spi/src/main/java/org/apache/sqoop/job/etl/Initializer.java b/spi/src/main/java/org/apache/sqoop/job/etl/Initializer.java new file mode 100644 index 00000000..e2b27764 --- /dev/null +++ b/spi/src/main/java/org/apache/sqoop/job/etl/Initializer.java @@ -0,0 +1,26 @@ +/** + * 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.job.etl; + +/** + * This allows connector to define initialization work for execution, + * for example, context configuration. + */ +public abstract class Initializer { + +} diff --git a/spi/src/main/java/org/apache/sqoop/job/etl/Loader.java b/spi/src/main/java/org/apache/sqoop/job/etl/Loader.java new file mode 100644 index 00000000..f0c52247 --- /dev/null +++ b/spi/src/main/java/org/apache/sqoop/job/etl/Loader.java @@ -0,0 +1,25 @@ +/** + * 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.job.etl; + +/** + * This allows connector to load data into a target system. + */ +public abstract class Loader { + +} diff --git a/spi/src/main/java/org/apache/sqoop/job/etl/Partitioner.java b/spi/src/main/java/org/apache/sqoop/job/etl/Partitioner.java new file mode 100644 index 00000000..560f4534 --- /dev/null +++ b/spi/src/main/java/org/apache/sqoop/job/etl/Partitioner.java @@ -0,0 +1,26 @@ +/** + * 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.job.etl; + +/** + * This allows connector to define how input data to be partitioned. + * The number of data partitions also determines the degree of parallelism. + */ +public abstract class Partitioner { + +}