Revert "PHOENIX-4141 Addendum to fix test failure"

This reverts commit e0b1b4a01058f2f736711cf0bfe1805e04f782d3.


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

Branch: refs/heads/4.x-HBase-1.2
Commit: d2d8d9a102523bfeb7b8b8d6e5efad2d88d7e92b
Parents: d7b910f
Author: Samarth Jain <[email protected]>
Authored: Sat Sep 2 15:46:13 2017 -0700
Committer: Samarth Jain <[email protected]>
Committed: Sat Sep 2 15:46:13 2017 -0700

----------------------------------------------------------------------
 .../end2end/TableSnapshotReadsMapReduceIT.java      | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d2d8d9a1/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableSnapshotReadsMapReduceIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableSnapshotReadsMapReduceIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableSnapshotReadsMapReduceIT.java
index 39d97a1..591f028 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableSnapshotReadsMapReduceIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TableSnapshotReadsMapReduceIT.java
@@ -65,7 +65,6 @@ public class TableSnapshotReadsMapReduceIT extends 
ParallelStatsDisabledIT {
 
     private static List<List<Object>> result;
     private String tableName;
-
     private MyClock clock;
 
     @Before
@@ -91,7 +90,7 @@ public class TableSnapshotReadsMapReduceIT extends 
ParallelStatsDisabledIT {
         // configure Phoenix M/R job to read snapshot
         final Configuration conf = getUtility().getConfiguration();
         Job job = Job.getInstance(conf);
-        Path tmpDir = getUtility().getRandomDir();
+        Path tmpDir = getUtility().getDataTestDirOnTestFS(SNAPSHOT_NAME);
 
         PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, 
SNAPSHOT_NAME, tableName,
             tmpDir, null, FIELD1, FIELD2, FIELD3);
@@ -111,7 +110,7 @@ public class TableSnapshotReadsMapReduceIT extends 
ParallelStatsDisabledIT {
         // configure Phoenix M/R job to read snapshot
         final Configuration conf = getUtility().getConfiguration();
         Job job = Job.getInstance(conf);
-        Path tmpDir = getUtility().getRandomDir();
+        Path tmpDir = getUtility().getDataTestDirOnTestFS(SNAPSHOT_NAME);
         PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, 
SNAPSHOT_NAME, tableName,
             tmpDir, FIELD3 + " > 0001", FIELD1, FIELD2, FIELD3);
 
@@ -131,7 +130,7 @@ public class TableSnapshotReadsMapReduceIT extends 
ParallelStatsDisabledIT {
         // configure Phoenix M/R job to read snapshot
         final Configuration conf = getUtility().getConfiguration();
         Job job = Job.getInstance(conf);
-        Path tmpDir = getUtility().getRandomDir();
+        Path tmpDir = getUtility().getDataTestDirOnTestFS(SNAPSHOT_NAME);
         // Running limit with order by on non pk column
         String inputQuery = "SELECT * FROM " + tableName + " ORDER BY FIELD2 
LIMIT 1";
         PhoenixMapReduceUtil.setInput(job, PhoenixIndexDBWritable.class, 
SNAPSHOT_NAME, tableName,
@@ -157,7 +156,6 @@ public class TableSnapshotReadsMapReduceIT extends 
ParallelStatsDisabledIT {
             // verify the result, should match the values at the corresponding 
timestamp
             Properties props = new Properties();
             props.setProperty("CurrentSCN", Long.toString(clock.time));
-
             StringBuilder selectQuery = new StringBuilder("SELECT * FROM " + 
tableName);
             if (condition != null) {
                 selectQuery.append(" WHERE " + condition);
@@ -180,7 +178,7 @@ public class TableSnapshotReadsMapReduceIT extends 
ParallelStatsDisabledIT {
             }
 
             assertFalse(
-                "Should only have stored" + result.size() + "rows in the table 
for the timestamp!",
+                "Should only have stored " + result.size() + "rows in the 
table for the timestamp!",
                 rs.next());
         } finally {
             deleteSnapshotAndTable(tableName);
@@ -242,10 +240,6 @@ public class TableSnapshotReadsMapReduceIT extends 
ParallelStatsDisabledIT {
         Connection conn = DriverManager.getConnection(getUrl());
         HBaseAdmin admin = 
conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin();
         admin.deleteSnapshot(SNAPSHOT_NAME);
-
-        conn.createStatement().execute("DROP TABLE " + tableName);
-        conn.close();
-
     }
 
     public static class TableSnapshotMapper extends
@@ -263,4 +257,4 @@ public class TableSnapshotReadsMapReduceIT extends 
ParallelStatsDisabledIT {
         }
     }
 
-}
\ No newline at end of file
+}

Reply via email to