(String filename, PigContext context)
| 776 | } |
| 777 | |
| 778 | public static String generateURI(String filename, PigContext context) |
| 779 | throws IOException { |
| 780 | if(Util.WINDOWS){ |
| 781 | filename = filename.replace('\\','/'); |
| 782 | } |
| 783 | if (context.getExecType() == ExecType.MAPREDUCE || context.getExecType().name().equals("TEZ") || |
| 784 | context.getExecType().name().equals("SPARK")) { |
| 785 | return FileLocalizer.hadoopify(filename, context); |
| 786 | } else if (context.getExecType().isLocal()) { |
| 787 | return filename; |
| 788 | } else { |
| 789 | throw new IllegalStateException("ExecType: " + context.getExecType()); |
| 790 | } |
| 791 | } |
| 792 | |
| 793 | public static Object getPigConstant(String pigConstantAsString) throws ParserException { |
| 794 | QueryParserDriver queryParser = new QueryParserDriver( new PigContext(), |
no test coverage detected