()
| 101 | } |
| 102 | |
| 103 | @Before |
| 104 | public void setUp() throws Exception{ |
| 105 | Logger logger = Logger.getLogger(ColumnPruneVisitor.class); |
| 106 | logger.removeAllAppenders(); |
| 107 | logger.setLevel(Level.INFO); |
| 108 | SimpleLayout layout = new SimpleLayout(); |
| 109 | logFile = File.createTempFile("log", ""); |
| 110 | FileAppender appender = new FileAppender(layout, logFile.toString(), false, false, 0); |
| 111 | logger.addAppender(appender); |
| 112 | |
| 113 | pigServer = new PigServer(Util.getLocalTestMode()); |
| 114 | tmpFile1 = File.createTempFile("prune", "txt"); |
| 115 | PrintStream ps = new PrintStream(new FileOutputStream(tmpFile1)); |
| 116 | ps.println("1\t2\t3"); |
| 117 | ps.println("2\t5\t2"); |
| 118 | ps.close(); |
| 119 | |
| 120 | tmpFile2 = File.createTempFile("prune", "txt"); |
| 121 | ps = new PrintStream(new FileOutputStream(tmpFile2)); |
| 122 | ps.println("1\t1"); |
| 123 | ps.println("2\t2"); |
| 124 | ps.close(); |
| 125 | |
| 126 | tmpFile3 = File.createTempFile("prune", "txt"); |
| 127 | ps = new PrintStream(new FileOutputStream(tmpFile3)); |
| 128 | ps.println("1\t[key1#1,key2#2]"); |
| 129 | ps.println("2\t[key1#2,key2#4]"); |
| 130 | ps.close(); |
| 131 | |
| 132 | tmpFile4 = File.createTempFile("prune", "txt"); |
| 133 | ps = new PrintStream(new FileOutputStream(tmpFile4)); |
| 134 | ps.println("1\t2\t3"); |
| 135 | ps.println("1\t2\t3"); |
| 136 | ps.close(); |
| 137 | |
| 138 | tmpFile5 = File.createTempFile("prune", "txt"); |
| 139 | ps = new PrintStream(new FileOutputStream(tmpFile5)); |
| 140 | ps.println("1\t2\t3\t4"); |
| 141 | ps.println("2\t3\t4\t5"); |
| 142 | ps.close(); |
| 143 | |
| 144 | tmpFile6 = File.createTempFile("prune", "txt"); |
| 145 | ps = new PrintStream(new FileOutputStream(tmpFile6)); |
| 146 | ps.println("\t2\t3"); |
| 147 | ps.println("2\t3\t4"); |
| 148 | ps.close(); |
| 149 | |
| 150 | tmpFile7 = File.createTempFile("prune", "txt"); |
| 151 | ps = new PrintStream(new FileOutputStream(tmpFile7)); |
| 152 | ps.println("1\t1\t1"); |
| 153 | ps.println("2\t2\t2"); |
| 154 | ps.close(); |
| 155 | |
| 156 | tmpFile8 = File.createTempFile("prune", "txt"); |
| 157 | ps = new PrintStream(new FileOutputStream(tmpFile8)); |
| 158 | ps.println("1\t2\t3\t4"); |
| 159 | ps.println("2\t5\t2\t3"); |
| 160 | ps.close(); |
nothing calls this directly
no test coverage detected