http://git-wip-us.apache.org/repos/asf/sqoop/blob/ed9c5143/spi/src/main/java/org/apache/sqoop/job/etl/Loader.java ---------------------------------------------------------------------- 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 index 024be94..0b32314 100644 --- a/spi/src/main/java/org/apache/sqoop/job/etl/Loader.java +++ b/spi/src/main/java/org/apache/sqoop/job/etl/Loader.java @@ -17,9 +17,6 @@ */ package org.apache.sqoop.job.etl; -import org.apache.sqoop.common.ImmutableContext; -import org.apache.sqoop.job.io.DataReader; - /** * This allows connector to load data into a target system. */ @@ -28,15 +25,13 @@ public abstract class Loader<ConnectionConfiguration, JobConfiguration> { /** * Load data to target. * - * @param context Context object + * @param context Loader context object * @param connectionConfiguration Connection configuration * @param jobConfiguration Job configuration - * @param reader Data reader object * @throws Exception */ - public abstract void load(ImmutableContext context, + public abstract void load(LoaderContext context, ConnectionConfiguration connectionConfiguration, - JobConfiguration jobConfiguration, - DataReader reader) throws Exception; + JobConfiguration jobConfiguration) throws Exception; }
http://git-wip-us.apache.org/repos/asf/sqoop/blob/ed9c5143/spi/src/main/java/org/apache/sqoop/job/etl/Partitioner.java ---------------------------------------------------------------------- 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 index bfb4bf2..f977233 100644 --- a/spi/src/main/java/org/apache/sqoop/job/etl/Partitioner.java +++ b/spi/src/main/java/org/apache/sqoop/job/etl/Partitioner.java @@ -17,8 +17,6 @@ */ package org.apache.sqoop.job.etl; -import org.apache.sqoop.common.ImmutableContext; - import java.util.List; /** @@ -27,8 +25,17 @@ import java.util.List; */ public abstract class Partitioner<ConnectionConfiguration, JobConfiguration> { - public abstract List<Partition> getPartitions(ImmutableContext context, - long maxPartitions, + /** + * Partition input data into partitions. + * + * Each partition will be then processed in separate extractor. + * + * @param context Partitioner context object + * @param connectionConfiguration Connection configuration + * @param jobConfiguration Job configuration + * @return + */ + public abstract List<Partition> getPartitions(PartitionerContext context, ConnectionConfiguration connectionConfiguration, JobConfiguration jobConfiguration); http://git-wip-us.apache.org/repos/asf/sqoop/blob/ed9c5143/spi/src/main/java/org/apache/sqoop/job/io/DataReader.java ---------------------------------------------------------------------- diff --git a/spi/src/main/java/org/apache/sqoop/job/io/DataReader.java b/spi/src/main/java/org/apache/sqoop/job/io/DataReader.java deleted file mode 100644 index a50f591..0000000 --- a/spi/src/main/java/org/apache/sqoop/job/io/DataReader.java +++ /dev/null @@ -1,34 +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.job.io; - -/** - * An intermediate layer for passing data from the MR framework - * to the ETL framework. - */ -public abstract class DataReader { - - public abstract Object[] readArrayRecord() throws Exception; - - public abstract String readCsvRecord() throws Exception; - - public abstract Object readContent(int type) throws Exception; - - public abstract void setFieldDelimiter(char fieldDelimiter); - -} http://git-wip-us.apache.org/repos/asf/sqoop/blob/ed9c5143/spi/src/main/java/org/apache/sqoop/job/io/DataWriter.java ---------------------------------------------------------------------- diff --git a/spi/src/main/java/org/apache/sqoop/job/io/DataWriter.java b/spi/src/main/java/org/apache/sqoop/job/io/DataWriter.java deleted file mode 100644 index 30a0c7c..0000000 --- a/spi/src/main/java/org/apache/sqoop/job/io/DataWriter.java +++ /dev/null @@ -1,34 +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.job.io; - -/** - * An intermediate layer for passing data from the ETL framework - * to the MR framework. - */ -public abstract class DataWriter { - - public abstract void writeArrayRecord(Object[] array); - - public abstract void writeCsvRecord(String csv); - - public abstract void writeContent(Object content, int type); - - public abstract void setFieldDelimiter(char fieldDelimiter); - -}
