()
| 57 | String fileName, tmpFile1; |
| 58 | |
| 59 | @Before |
| 60 | public void setUp() throws Exception{ |
| 61 | |
| 62 | System.out.println("Generating test data..."); |
| 63 | System.out.println("Default block size = " + defaultBlockSize); |
| 64 | System.out.println("Total no. of iterations to run for the test data = " + total); |
| 65 | |
| 66 | datFile = File.createTempFile("StoreTest", ".dat"); |
| 67 | |
| 68 | FileOutputStream dat = new FileOutputStream(datFile); |
| 69 | |
| 70 | Random rand = new Random(); |
| 71 | |
| 72 | for(int i = 0; i < max_rand; i++) { |
| 73 | COUNT[i] = 0; |
| 74 | } |
| 75 | |
| 76 | for(long i = 0; i < total; i++) { |
| 77 | Integer x = new Integer(rand.nextInt(max_rand)); |
| 78 | COUNT[x.intValue()]++; |
| 79 | dat.write((x.toString() + "\n").getBytes()); |
| 80 | } |
| 81 | |
| 82 | dat.close(); |
| 83 | |
| 84 | pig = new PigServer(ExecType.MAPREDUCE, cluster.getProperties()); |
| 85 | |
| 86 | fileName = "'" + FileLocalizer.hadoopify(datFile.toString(), pig.getPigContext()) + "'"; |
| 87 | tmpFile1 = "'" + FileLocalizer.getTemporaryPath(pig.getPigContext()).toString() + "'"; |
| 88 | |
| 89 | datFile.delete(); |
| 90 | } |
| 91 | |
| 92 | @After |
| 93 | public void tearDown() throws Exception { |
nothing calls this directly
no test coverage detected