mirror of
https://github.com/apache/sqoop.git
synced 2025-05-17 01:11:07 +08:00
SQOOP-532. Define intefaces for connector-defined execution classes.
(Bilung Lee via Jarek Jarcec Cecho) git-svn-id: https://svn.apache.org/repos/asf/sqoop/branches/sqoop2@1373132 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
30c8d02e43
commit
1a1c307364
27
spi/src/main/java/org/apache/sqoop/job/etl/Context.java
Normal file
27
spi/src/main/java/org/apache/sqoop/job/etl/Context.java
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The context for getting configuration values.
|
||||||
|
*/
|
||||||
|
public interface Context {
|
||||||
|
|
||||||
|
public String getString(String key);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The context for getting and setting configuration values.
|
||||||
|
*/
|
||||||
|
public interface MutableContext extends Context {
|
||||||
|
|
||||||
|
public void setString(String key, String value);
|
||||||
|
|
||||||
|
public void setFieldNames(String[] names);
|
||||||
|
|
||||||
|
}
|
38
spi/src/main/java/org/apache/sqoop/job/etl/Partition.java
Normal file
38
spi/src/main/java/org/apache/sqoop/job/etl/Partition.java
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
|
||||||
|
import java.io.DataInput;
|
||||||
|
import java.io.DataOutput;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A part of the input data partitioned by the Partitioner.
|
||||||
|
*/
|
||||||
|
public interface Partition {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserialize the fields of this partition from input.
|
||||||
|
*/
|
||||||
|
public void readFields(DataInput in);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize the fields of this partition to output.
|
||||||
|
*/
|
||||||
|
public void write(DataOutput out);
|
||||||
|
|
||||||
|
}
|
26
spi/src/main/java/org/apache/sqoop/job/io/DataReader.java
Normal file
26
spi/src/main/java/org/apache/sqoop/job/io/DataReader.java
Normal file
@ -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.io;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An intermediate layer for passing data from the MR framework
|
||||||
|
* to the ETL framework.
|
||||||
|
*/
|
||||||
|
public interface DataReader {
|
||||||
|
|
||||||
|
}
|
26
spi/src/main/java/org/apache/sqoop/job/io/DataWriter.java
Normal file
26
spi/src/main/java/org/apache/sqoop/job/io/DataWriter.java
Normal file
@ -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.io;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An intermediate layer for passing data from the ETL framework
|
||||||
|
* to the MR framework.
|
||||||
|
*/
|
||||||
|
public interface DataWriter {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user