sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject sqoop git commit: SQOOP-2857: Sqoop2: toParquetTest fails frequently on the pre-commit hook
Date Mon, 21 Mar 2016 17:44:01 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 b1ababa7a -> 7ad7c2705


SQOOP-2857: Sqoop2: toParquetTest fails frequently on the pre-commit hook

(Abraham Fine via Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/7ad7c270
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/7ad7c270
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/7ad7c270

Branch: refs/heads/sqoop2
Commit: 7ad7c2705147ffa2c30946949b614a5c481d9016
Parents: b1ababa
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Mon Mar 21 10:43:31 2016 -0700
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Mon Mar 21 10:43:57 2016 -0700

----------------------------------------------------------------------
 .../sqoop/integration/connector/hdfs/ParquetTest.java     | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/7ad7c270/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/ParquetTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/ParquetTest.java
b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/ParquetTest.java
index 222c493..d55563d 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/ParquetTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/hdfs/ParquetTest.java
@@ -73,16 +73,24 @@ public class ParquetTest extends SqoopTestCase {
     fillHdfsLink(hdfsConnection);
     saveLink(hdfsConnection);
 
+    hdfsClient.mkdirs(new Path(HdfsUtils.joinPathFragments
+      (getMapreduceDirectory(), "TO")));
+
     // Job creation
     MJob job = getClient().createJob(rdbmsConnection.getName(), hdfsConnection.getName());
 
 
+
+
     // Set rdbms "FROM" config
     fillRdbmsFromConfig(job, "id");
 
     // Fill the hdfs "TO" config
     fillHdfsToConfig(job, ToFormat.PARQUET_FILE);
 
+    job.getToJobConfig().getStringInput("toJobConfig.outputDirectory")
+      .setValue(HdfsUtils.joinPathFragments(getMapreduceDirectory(), "TO"));
+
     saveJob(job);
     executeJob(job);
 
@@ -97,7 +105,7 @@ public class ParquetTest extends SqoopTestCase {
 
     List<String> notFound = new LinkedList<>();
 
-    Path[] files = HdfsUtils.getOutputMapreduceFiles(hdfsClient, getMapreduceDirectory());
+    Path[] files = HdfsUtils.getOutputMapreduceFiles(hdfsClient, HdfsUtils.joinPathFragments(getMapreduceDirectory(),
"TO"));
     for (Path file : files) {
       ParquetReader<GenericRecord> avroParquetReader = AvroParquetReader.builder(file).build();
       GenericRecord record;


Mime
View raw message