mirror of
https://github.com/apache/sqoop.git
synced 2025-05-19 02:10:54 +08:00
configure surefire plugin to avoid creating temp file on .
git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1153054 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8a9d85391c
commit
4353f6b8d7
8
pom.xml
8
pom.xml
@ -196,6 +196,14 @@ limitations under the License.
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.9</version>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<test.build.data>${project.build.outputDirectory}</test.build.data>
|
||||
<java.io.tmpdir>${project.build.outputDirectory}</java.io.tmpdir>
|
||||
<sqoop.src.dir>${project.build.outputDirectory}</sqoop.src.dir>
|
||||
<sqoop.test.import.rootDir>${project.build.outputDirectory}</sqoop.test.import.rootDir>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
@ -42,7 +42,7 @@ public class AppendUtils {
|
||||
|
||||
private static final SimpleDateFormat DATE_FORM = new SimpleDateFormat(
|
||||
"ddHHmmssSSS");
|
||||
private static final String TEMP_IMPORT_ROOT = "_sqoop";
|
||||
private static final String TEMP_IMPORT_ROOT = System.getProperty( "sqoop.test.import.rootDir", "_sqoop");
|
||||
|
||||
private static final int PARTITION_DIGITS = 5;
|
||||
private static final String FILEPART_SEPARATOR = "-";
|
||||
|
@ -22,6 +22,7 @@
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.fs.FileSystem;
|
||||
import org.apache.hadoop.fs.Path;
|
||||
@ -57,6 +58,8 @@ public void testFailedImportDueToIOException() throws IOException {
|
||||
|
||||
Configuration conf = new Configuration();
|
||||
|
||||
LogFactory.getLog( getClass() ).info( " getWarehouseDir() " + getWarehouseDir() );
|
||||
|
||||
// Make the output dir exist so we know the job will fail via IOException.
|
||||
Path outputPath = new Path(new Path(getWarehouseDir()), getTableName());
|
||||
FileSystem fs = FileSystem.getLocal(conf);
|
||||
|
Loading…
Reference in New Issue
Block a user